Protocol

SKPaymentTransactionObserver

A set of methods that process transactions, unlock purchased functionality, and continue promoted in-app purchases.

Declaration

@protocol SKPaymentTransactionObserver

Overview

The methods in this protocol are implemented by observers of an SKPaymentQueue object.

An observer is called when transactions are updated by the queue or removed from the queue. An observer should process all successful transactions, unlock the functionality purchased by the user, and then finish the transaction by calling the payment queue’s finishTransaction: method.

Topics

Handling Transactions

- paymentQueue:updatedTransactions:

Tells an observer that one or more transactions have been updated.

Required.

- paymentQueue:removedTransactions:

Tells an observer that one or more transactions have been removed from the queue.

Handling Restored Transactions

- paymentQueue:restoreCompletedTransactionsFailedWithError:

Tells the observer that an error occurred while restoring transactions.

- paymentQueueRestoreCompletedTransactionsFinished:

Tells the observer that the payment queue has finished sending restored transactions.

Handling Download Actions

- paymentQueue:updatedDownloads:

Tells the observer that the payment queue has updated one or more download objects.

Handling Purchases

- paymentQueue:shouldAddStorePayment:forProduct:

Tells the observer that a user initiated an in-app purchase from the App Store.

Handling Changes to the Storefront

- paymentQueueDidChangeStorefront:

Tells the observer that the storefront for the payment queue has changed.

Relationships

Inherits From

See Also

Essentials

Setting Up the Transaction Observer and Payment Queue

Enable your app to receive and handle transactions by adding an observer.

Offering, Completing, and Restoring In-App Purchases

Fetch, complete, and restore transactions in your app.

SKPaymentQueue

A queue of payment transactions to be processed by the App Store.

SKPaymentQueueDelegate

The protocol implemented to provide information needed to complete transactions.