Transaction.updates emits a transaction while purchasing on the same device through product.purchase()

Hi everyone,

I'm facing a weird behaviour when purchasing an auto-renewable subscription in the sandbox environment on a real device with purchase(options:) and also listening to Transaction.updates.

I get the "You're all set. Your purchase was successful [Environment Sandbox]" alert.

I receive an update through Transaction.updates. and also a transaction from Product.PurchaseResult.

Both transactions are successfully verified and have the same transactionId. Both have PURCHASE as transactionReason.

They only differ in:

  • deviceVerification
  • deviceVerificationNonce
  • originalPurchaseDate
  • signedDate

I was not expecting to receive an update through Transaction.updates as the purchase was done on the same device.

As the documentation says, Transaction.updates emits a transaction when the system creates or updates transactions that occur outside of the app or on other devices.

Am I losing something?

Thanks for your help!

With Xcode 15 + StoreKit configuration file works as expected.

It only has weird behaviour in the Sandbox environment.

Anyone can reproduce it?

Thanks!

I also had this problem in the production environment, where a payment would have two callbacks. A synchronous callback, and an asynchronous callback returned from Transaction.updates The transactionId for both transactions is the same。 It is not a necessary problem, but a low probability scenario

Transaction.updates emits a transaction while purchasing on the same device through product.purchase()
 
 
Q