Server side misses notifications due to an outage when client buy subscriptions - App Store Server Notifications

37 views Asked by At

I'm using App Store Server Notifications V2

I'm implementing the subscription purchasing function in our app on iOS, everything seems to be fine, but I still have an issue that needs to be resolved, which is the case when the user purchases a subscription but the server side of the application If we crash, for example, how can I restore premium functionality for users?

In Apple's documentation, there are instructions that say you can recover missed notifications by calling "Get Notification History" but if I have solved this case from the Get Notification History API that Apple provides, how can I check if the subscription has been resolved.

And how to notify Apple that the subscription has been processed and remove it from the Get Notification History API?

Or is there any other better way to handle it? Please help me.

I'm newbiew, thank you everyone

1

There are 1 answers

2
AudioBubble On
  1. Queue notifications (Redis, RabbitMQ) to avoid loss during crashes.
  2. Regularly retrieve missed notifications (Get Notification History).
  3. Verify subscriptions (server-side or local storage if possible).
  4. Handle different notifications (new, renewal, cancel/refund).
  5. Optionally remove processed notifications (EndSession, use caution).
  6. Error handling, logging, and thorough testing are crucial.