<!--
{
  "availability" : [
    "App Store Server Notifications: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppStoreServerNotifications",
  "identifier" : "/documentation/AppStoreServerNotifications/environment",
  "metadataVersion" : "0.1.0",
  "role" : "Type",
  "symbol" : {
    "kind" : "Type",
    "modules" : [
      "App Store Server Notifications"
    ],
    "preciseIdentifier" : "data:store_s2s:environment"
  },
  "title" : "environment"
}
-->

# environment

The server environment, either sandbox or production.

```
string environment
```

## Discussion

You receive notifications in the sandbox environment when you opt in to receive notifications in the sandbox environment and test your app in the sandbox environment. TestFlight also uses the sandbox environment to send notifications. To opt in to receive notifications, see [Enter a URL for App Store Server Notifications](https://help.apple.com/app-store-connect/#/dev0067a330b). For more information about testing, see <doc://com.apple.documentation/documentation/StoreKit/testing-at-all-stages-of-development-with-xcode-and-the-sandbox>, and [Beta Testing Made Simple with TestFlight](https://developer.apple.com/testflight/).

---

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)