<!--
{
  "documentType" : "article",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/testing-app-store-server-notifications",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Testing App Store server notifications"
}
-->

# Testing App Store server notifications

Confirm that App Store Server Notifications service responds properly in the sandbox environment.

## Discussion

If you enabled notifications from the App Store for your app, test your logic for transactions in the sandbox environment. To determine if a notification for a subscription event occurred in the test environment, check whether the value of the `environment` field equals `Sandbox` in the <doc://com.apple.documentation/documentation/AppStoreServerNotifications/data> object of the App Store Server Notifications <doc://com.apple.documentation/documentation/AppStoreServerNotifications/responseBodyV2DecodedPayload> object.

For more information about the App Store Server Notifications service, see <doc://com.apple.documentation/documentation/AppStoreServerNotifications>. To ask the App Store to send test notifications, and to get a history of notifications sent to your server, see <doc://com.apple.documentation/documentation/AppStoreServerAPI/Request-a-Test-Notification> and <doc://com.apple.documentation/documentation/AppStoreServerAPI/Get-Notification-History> in the <doc://com.apple.documentation/documentation/AppStoreServerAPI>.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)