A mutable request to the App Store to process payment for additional functionality offered by your app.


class SKMutablePayment : SKPayment


A mutable payment object identifies a product and the quantity of that item the user would like to purchase.

When a mutable payment is added to the payment queue, the payment queue copies the contents into an immutable request before queueing the request. Your app can safely change the contents of the mutable payment object.


Getting and Setting Attributes

var productIdentifier: String

A string that identifies a product that can be purchased from within your app.

var quantity: Int

The number of items the user wants to purchase.

var requestData: Data?

Reserved for future use.

var applicationUsername: String?

An opaque identifier for the user’s account on your system.

Simulating Buy for Testing

var simulatesAskToBuyInSandbox: Bool

A Boolean value that produces an “ask to buy” flow for this payment in the sandbox.

Getting and Setting Discount Details

var paymentDiscount: SKPaymentDiscount?

The details of the discount offer to apply to the payment.


Inherits From

Conforms To

See Also


Requesting a Payment from the App Store

Submit a payment request to the App Store when a user selects a product to buy.

Processing a Transaction

Register a transaction queue observer to get and handle transaction updates from the App Store.

class SKPayment

A request to the App Store to process payment for additional functionality offered by your app.

class SKPaymentTransaction

An object in the payment queue.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software