We are currently integrating In-App Purchases for our app and have configured App Store Server Notifications (v2) in the Sandbox environment.
During testing, we observed the following issue:
-
When a transaction is cancelled, declined, or pending (e.g., Ask to Buy flows or authorization pending),
-
No App Store Server Notification is sent to our webhook endpoint.
-
We only receive webhook events where the status is "purchased".
This becomes a critical problem for us because our backend must accurately track transaction states including failed and pending purchases, especially for wallet top-up use cases.
Additionally, we tried mocking failed transactions (via Xcode local environment and turning off In-App Purchases from Developer Settings) to simulate a technical failure scenario.
Even in these cases, no webhook notification was received when the purchase failed server-side.
-
Is it expected behavior in Sandbox that only successful transactions ("purchased") trigger webhooks?
-
Are failed or pending transactions suppressed in Sandbox intentionally?
-
Will webhook behavior be different in Production (i.e., will we receive webhook notifications for failures there)?
-
Is there any extra configuration or entitlement needed to fully test failure scenarios via webhooks in Sandbox?