hpique
hpique

Reputation: 120364

When is the user charged for an in-app purchase?

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

Answers (2)

Jeff Argast
Jeff Argast

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

logancautrell
logancautrell

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.

Which is here: http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/MakingaPurchase/MakingaPurchase.html#//apple_ref/doc/uid/TP40008267-CH3-SW1

It looks like when you have a transactionReceipt then the payment is completed.

Upvotes: 7

Related Questions