Need help with handling expired receipts from App Store

Hello All,

Our app implements in app purchase as follows,

The App is free to download and sign up, some features are available if monthly subscription is valid.

We have implemented server side validation (app side validation is not present) so app will perform the in app purchase and forward the receipt, received from App Store, to the server.

This functionality worked so far but recently we noticed that the App Store is sending invalid/expired receipt to the app, which in turn gets forwarded to the server.

Upon checking the receipt data, server finds out the receipt is already expired and so server disables the paid features.

We are trying to figure out process to enable user to resubscribe to the paid feature through app.

Not sure if we missed something but the document we found so far, mentions to block the features or provide grace period to the users but we were not able to locate any document which explains process to enable users to resubscribes.

Any pointer will be helpful.

Validating Receipts:

https://developer.apple.com/documentation/storekit/original_api_for_in-app_purchase/validating_receipts_with_the_app_store

Please let me know if you need any additional help. Thanks in advance.

Hello, a place where you could start with for grace period is here: https://developer.apple.com/documentation/appstorereceipts/responsebody/pending_renewal_info

You could also take a look at the expiration_intent field over here: https://developer.apple.com/documentation/appstorereceipts/expiration_intent

In the case that you want your application to provide an option to re-subscribe, you could look at the expiration fields in the receipt and show different dialogs based on why the subscription expired, as per the expiration_intent field.

I hope this helps, please ask with any follow-ups you may have.

I wonder if you are currently working in the sandbox. In the sandbox environment, auto-renewing subscriptions renew at an accelerated pace. I could easily understand that for a 1 mo subscription where it renews every 5 minutes for 5 times, that if you relaunch the app after a 30 minute delay, the transactionObserver would detect the renewals, but validation of the appStoreReceipt would show all expired subscriptions. In the production environment, auto-renewing subscription continuously renew, not like in the sandbox. The customer can stop renewals in their iTunes Account "Manage Subscription" panel.

In response to your concerns, take a look at the Apple Developer Article Handling Subscriptions Billing.

rich kubota developer technical support CoreOS/Hardware/MFI

Need help with handling expired receipts from App Store
 
 
Q