What happens if the transaction is not finished?

For auto-renewable subscriptions, it is necessary to call the transaction completion after the purchase. I understand that this needs to be called at the correct timing. StoreKit v1: https://developer.apple.com/documentation/storekit/in-app_purchase/original_api_for_in-app_purchase/finishing_a_transaction

Question If the transaction does not finish for a long period, is the purchase cancelled and a refund issued? If so, how long is this period?

For example case1: When I renewed the auto-renewable subscription from the OS settings app but did not open my own app. case2: When there was a malfunction in my own app.

Similar forum https://developer.apple.com/forums/thread/656255

Answered by DTS Engineer in 812042022

I understand that this needs to be called at the correct timing.

As stated in the doc you mentioned, you should call finishTransaction(_:) after unlocking the purchased content and presenting it to the user in your app's UI.

If the transaction does not finish for a long period, is the purchase cancelled and a refund issued?

The purchase isn't cancelled. The user needs to request a refund before a refund can occur. For more information, see Handling refund notifications.

If so, how long is this period?

The transaction stays in the payment queue until you call finishTransaction(_:) to remove it. If your app has a persistent transaction observer, the user will be repeatedly prompted to authenticate a purchase when launching your app. Additionally, calling restoreCompletedTransactions() won't return a transaction for this subscription.

From restoreCompletedTransactions(): This method has no effect in the following situations:

  • All transactions are unfinished.
  • The user did not purchase anything that is restorable.
  • You tried to restore items that are not restorable, such as a non-renewing subscription or a consumable product.
  • Your app's build version does not meet the guidelines for the CFBundleVersion key.
Accepted Answer

I understand that this needs to be called at the correct timing.

As stated in the doc you mentioned, you should call finishTransaction(_:) after unlocking the purchased content and presenting it to the user in your app's UI.

If the transaction does not finish for a long period, is the purchase cancelled and a refund issued?

The purchase isn't cancelled. The user needs to request a refund before a refund can occur. For more information, see Handling refund notifications.

If so, how long is this period?

The transaction stays in the payment queue until you call finishTransaction(_:) to remove it. If your app has a persistent transaction observer, the user will be repeatedly prompted to authenticate a purchase when launching your app. Additionally, calling restoreCompletedTransactions() won't return a transaction for this subscription.

From restoreCompletedTransactions(): This method has no effect in the following situations:

  • All transactions are unfinished.
  • The user did not purchase anything that is restorable.
  • You tried to restore items that are not restorable, such as a non-renewing subscription or a consumable product.
  • Your app's build version does not meet the guidelines for the CFBundleVersion key.

Thank you for your reply. I solved this question.

What happens if the transaction is not finished?
 
 
Q