We are using server side validation of the payment like so -
For a particular user, we didn't get the transaction receipt at the server, due to which the receipt couldn't be verified. We are guessing something went wrong in steps 2 and 3. If there were connection problems at the time of sending receipt to server, the app retries again on subsequent app resume.
Now we have one missing transaction receipt and an angry user. How do you suggest we go forward? How can we prevent this in future? Are there any guidelines or best practices that we can follow to prevent such situation?
Thank you.
To validate purchases, you need to verify receipts on your server or the device. If you work with auto-renewable subscriptions, the App Store can also notify your server of key subscription events. To retrieve the receipt data ( appStoreReceiptURL) from the app on the device, use the appStoreReceiptURL = Bundle.main.appStoreReceiptURL
To provide access to your content, you need to pass a receipt through the receipt validation ( verifyReceipt) endpoint. Receipt is an encrypted file signed with an Apple certificate. To validate purchases, you need to verify receipts on your server or the device.
You should be familiar with in-App Purchases and StoreKit. Get access to the iOS Developer Center and App Store Connect. Consumable – are used once and are depleted. For example, coins. Non-Consumable – are used once, but do not expire. For example, a movie in a video app. Auto-Renewable Subscriptions – access to services with periodic payment.
Based on my experience, the likely issues are
The way to check for the second case is to look at your account and see if there is a matching purchase record. Unfortunately, the web site can be a bit difficult to review unless you have a low purchase volume.
The are two things you need in your code to correctly handle errors on your server or on, if it happens, Apple's end.
If the problem you are facing is with non-consumables/entitlements, then the second item is the way out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With