Reputation: 120364
When is the user charged for an iOS in-app purchase?
Is it between addPayment and paymentQueue:updatedTransactions: receives SKPaymentTransactionStatePurchased
, or is it after calling finishTransaction? Or somewhere else?
Is this explicitly mentioned in the documentation?
Upvotes: 9
Views: 490
Reputation: 1251
It’s as you describe -- The user is charged in between addPayment and when paymentQueue:updatedTransactions: receives SKPaymentTransactionStatePurchased.
But the exact timing of when the user is charged during that phase is not deterministic as it happens by the StoreKit framework.
In the headers, there is a comment next to SKPaymentTransactionStatePurchased that reads "user has been charged.” So once you receive SKPaymentTransactionStatePurchased you know the user has been charged.
Upvotes: 0
Reputation: 8772
I think you are looking for this.
SKPaymentTransaction A transaction is created for every payment added to the queue. Each transaction has properties that allow your application to determine the status of the transaction. When payment is collected, the transaction includes additional details about the successful transaction.
It looks like when you have a transactionReceipt
then the payment is completed.
Upvotes: 7