My team and I are implementing In-App Purchases to our product and using auto-renewable subscriptions. We are testing our implementation via creating sandbox accounts and using TestFlight. We validate our receipts on our servers. When we make our initial purchase (with 0 transaction test accounts), the flow works fine. However, after we receive 6 renewal notifications server-side and see that the subscriptions has expired on the "Manage Subscriptions" section, we purchase it again, the transaction observer gets called immediately with the state SKPaymentTransactionState.purchased (without any StoreKit pop-ups asking password and etc.) and we send the receipt to our servers. At the validation process, we see that no new transactions are being registered thus can not authorize our users to use our services. Is this a normal behavior for sandbox? Will this work as expected on prod?
If you are purchasing a new subscription of one which has "expired" and your app is called back at the updatedTransactions delegate with the .purchased transaction state, access the appStoreReceiptURL, and validate the receipt - then find that there is no new transactions - this would be a bug report issue. However, when you review the validated results, do you check the contents of the "latest_receipt_info".
Also, are you assuming that the latest subscription info will be in the last entry of the in_app array or in the latest_receipt_info sections. This is a false assumption. There is no guarantee as to the positioning of the most recent transaction in the two sections.
If you use the "exclude-old-transactions": true key in the JSON request to the verifyReceipt interface, the contents of the latest_receipt_info will only include the most recent auto-renewing subscription transaction.
rich kubota developer technical support CoreOS/Hardware/MFI