ask to buy / deferred transaction not getting finalized

I've got a problems with some few deferred payments not getting finalized. It happens in an app that's live for about 3 years. The problem is very rare and we're unable to reproduce it.

Example: a child want's to get an in app purchase and uses "ask to buy" to ask her parents. Her parents confirm the purchase and can see, that their credit card was billed. The state of the transaction initially is deferred (correct) but never gets updated to purchased or failed (in this case, as the IAP was bought, it should have changed to purchased).

Clicking restore purchases didn't change anything. Nor did reinstalling the app.

It seems, that the transaction never gets finalized and will stay in deferred forever.

Is this a known problem and are there any known fixes?

I would expect once an Ask To Buy request is approved, that a new transaction is added to the paymentQueue with the .purchased state on the requestors device. When you initially observe a transaction go into the .deferred state, you can mark it as finished (finishTransaction) to clear it from the queue as the successful transaction will be added to the queue or if it is declined no update occurs on device.

As this Ask To Buy transaction can be approved at any time for up to 24hours, our suggestion is to ensure that your app is initializing the TransactionObserver immediately upon app launch to ensure it catches any new transactions. For more info: https://developer.apple.com/documentation/storekit/original_api_for_in-app_purchase/setting_up_the_transaction_observer_for_the_payment_queue

ask to buy / deferred transaction not getting finalized
 
 
Q