Class

SKPaymentDiscount

The signed discount applied to a payment.

Declaration

class SKPaymentDiscount : NSObject

Overview

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.

Topics

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.

Relationships

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.