Pass App Store server notifications to Adapty from your backend
If your backend must keep its URL in App Store Connect, pass the App Store server notifications from your backend to Adapty unchanged. If your backend doesn’t need its URL in App Store Connect, set up forwarding to your backend in Adapty instead. That route needs no code.
Adapty handles the notifications from your backend as if Apple sent them directly. With Refund Saver, Adapty still answers the refund requests among them.
If your backend receives real-time developer notifications from Google Play through its own Pub/Sub topic, it needs no code to pass them to Adapty. Add a push subscription for Adapty to that topic.
To pass App Store server notifications to Adapty:
-
In Adapty, open the app you’re connecting: each Adapty app has its own notification URL. Go to App settings > iOS SDK. In the App Store server notifications section, copy the URL from the URL for App Store server notifications field.
-
In your backend, post each notification from Apple to the URL you copied. In each request:
- Keep the body from Apple unchanged:
{"signedPayload": "…"}. - Set the
Content-Type: application/jsonheader. - Don’t add an
Authorizationheader.
If Adapty also forwards notifications to your backend, don’t post those back to Adapty.
- Keep the body from Apple unchanged:
Here are examples for different programming languages:
A 200 response doesn’t confirm that Adapty could use the notification. Adapty answers before it decodes the signed payload. To confirm that notifications reach Adapty, make a sandbox purchase. Then make sure that the notifications status in the App Store server notifications section reads Active.