Empty "in_app" array in the Apple receipt

Our app is offering auto-renewable subscription products only. One of our customers told us that she was having a problem to purchase a monthly auto-renewable subscription in our app.


In our server database, we found the customer's transaction receipt's payload which was used to post to the Apple's receipt verification API (https://buy.itunes.apple.com/verifyReceipt). Then we tried to post the receipt's payload to the API. After that, in the information we received from the Apple through the API we found out that the key of "in_app" in the "receipt" is an empty array, indicating that there was no product in the receipt and causing the customer receiving the purchase error in the app from our server. Most of our customers were able to purchase the subscription, so this was a rare case.


The customer told us that she was never charged by the Appe store after the multiple attempts she had made to purchase the subscription product, meaning that she did not purchase the subscription product successfully.


Our questions are:

1) Is it possible a receipt's payload being generated without a successful purchase of an auto-renewable subscription product?

2) How is the receipt's payload generated and sent to our server?


Please advise.

Thank you.

Post not yet marked as solved Up vote post of Leong Kee Down vote post of Leong Kee
10k views

Replies

PBK,


Response - my response is correct. The specific details are as follows. The child uses their app to make the purchase. iOS working in combination with the App Store detects that this is an Ask-to-Buy scenario. The parent is queried to approve the purchase. When the parent approves the purchase on their device, the App Store processes the payment. This approval could take place many hours after the payment request submitted in the Ask-to-Buy scenario. The actual purchase is for the app running on the childs device. So the App Store sets up an incompleteTransaction for the child account. Note that in this case, the payment approval and the transaction completion are on different devices. This is different from the normal addPayment process where the payment request is submitted and processed immediately, and the response is returned to the application to the same device. In the Ask-to-Buy scenario, the App Store has no way to know whether the child application is active at the time of approval. Instead, it sets up the incompleteTransaction and awaits the transactionObserver in the child's app to query for the result.


rich kubota - rkubota@apple.com


developer technical support CoreOS/Hardware/MFI

Thanks.

Late reply, but maybe helpful anyway.
We have seen cases where in_app ends up empty during an Ask-To-Buy purchase of a consumable product.

In those cases it seems to be resolved by using SKReceiptRefreshRequest (https://developer.apple.com/documentation/storekit/skreceiptrefreshrequest in the app to refresh the receipt and try again.

Hi!


At what moment we should use SKReceiptRefreshRequest to get valid "in_app"?

Please, give me case, how you coud reproduce empty in_app array in receipt.

There will be no in_app array in the receipt if the user

1) has not pruchased any In App Products or

2) has only purchased consumable In App Products and has executed finishTransaction and then refreshed the receipt.