The signed discount applied to a payment.


class SKPaymentDiscount : NSObject


The SKPaymentDiscount contains the details of a subscription offer discount that you want to apply to a SKMutablePayment.

Include the signature that you generated in this object. For guidance, see Generating a Signature for Subscription Offers. The App Store uses this signature and the parameters to validate the subscription offer. Keep in mind that the signature must correspond to the parameters in the payment for a transaction to be successful.


Initializing a Payment Discount

init(identifier: String, keyIdentifier: String, nonce: UUID, signature: String, timestamp: NSNumber)

Initializes the payment discount with a signature and the parameters used by the signature.

Identifying the Discount

var identifier: String

A string used to uniquely identify a discount offer for a product.

var keyIdentifier: String

A string that identifies the key used to generate the signature.

Validating the Discount

var nonce: UUID

A universally unique ID (UUID) value that you define.

var signature: String

A UTF-8 string representing the properties of a specific discount offer, cryptographically signed.

var timestamp: NSNumber

The date and time of the signature's creation in milliseconds, formatted in Unix epoch time.


Inherits From

Conforms To

See Also

Initiating a Purchase

Requesting a Payment from the App Store

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

class SKPayment

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

class SKMutablePayment

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

class SKPaymentQueue

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

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