App Store Server Notifications
Monitor In-App Purchase events in real time and learn of unreported external purchase tokens, with server notifications from the App Store.
Mentioned in
Overview
App Store Server Notifications is a server-to-server service that sends real-time notifications for In-App Purchase events, and notifications for unreported external purchase tokens. Use the data in the notifications to update your user-account database, and to monitor and respond to in-app purchase refunds. For notifications related to the External Purchase API, see externalPurchaseToken.
To receive server notifications from the App Store, provide your server’s HTTPS URL in App Store Connect. Opt in to receive notifications for the production environment and the sandbox environment. For more information, see Enabling App Store Server Notifications.
Your server is responsible for parsing, interpreting, and responding to all server-to-server notification posts. For more information, see Receiving App Store Server Notifications and Responding to App Store Server Notifications.
Process in-app purchase notifications
Notifications cover events in the in-app purchase life cycle, including purchases, subscription renewals, offer redemptions, refunds, and more. For a complete list of notification types, see notificationType for App Store Server Notifications V2.
Use the notification type, along with the transaction and subscription renewal information, to update a customer’s service or to present promotional offers according to your business logic.
Process external purchase token notifications
A notificationType of EXTERNAL_PURCHASE_TOKEN with an UNREPORTED subtype indicates that Apple generated an external purchase token for your app but hasn’t received a report for the token. The notification includes the token in the externalPurchaseToken field of the responseBodyV2DecodedPayload. Use the token information to report it to Apple, including if you don’t recognize the token in your system. To report tokens, with or without associated transactions, call the External Purchase Server API’s Send External Purchase Report endpoint.
For more information about token reporting requirements in the EU, Brazil, and Japan, see Using alternative payment options on the App Store in the European Union, Using alternative payment options on the App Store in Brazil, and Using alternative payment options on the App Store in Japan.
Test your server setup
To determine whether your server is receiving notifications, call the Request a Test Notification endpoint in the App Store Server API to ask the App Store server to send a notification with the notificationType TEST. Use the testNotificationToken you receive to call the Get Test Notification Status endpoint to learn how your server responds to the test notification.
The App Store server sends the TEST notification in the version 2 notification format, however, it sends it to your server regardless of whether you configure a version 1 or version 2 notification URL in App Store Connect. For more information about configuring your URL in App Store Connect, see Enter a URL for App Store server notifications.
Topics
Essentials
Enabling App Store Server NotificationsReceiving App Store Server NotificationsResponding to App Store Server NotificationsApp Store Server Notifications changelog