Presents a sheet that prompts the user to authorize a payment request.


class PKPaymentAuthorizationController : NSObject


After the user authorizes the payment request for a transaction, the delegate is called with a payment token used to authorize the transaction’s payment.


Determining Whether the User Can Make Payments

class func canMakePayments() -> Bool

Returns whether the user can make payments.

class func canMakePayments(usingNetworks: [PKPaymentNetwork]) -> Bool

Returns whether the user can make payments through the specified network.

class func canMakePayments(usingNetworks: [PKPaymentNetwork], capabilities: PKMerchantCapability) -> Bool

Returns whether the user can make payments using a card from the specified network with the specified capabilities.

Handling User Interactions

protocol PKPaymentAuthorizationControllerDelegate

Methods that let you respond to user interactions with your payment authorization controller.

func present(completion: ((Bool) -> Void)?)

Presents the payment sheet modally over your app.

func dismiss(completion: (() -> Void)?)

Dismisses the payment sheet.

Creating a Payment Authorization Controller

init(paymentRequest: PKPaymentRequest)

Initializes and returns a payment authorization controller.


Inherits From

Conforms To

See Also

Apple Pay Availability

class PKPaymentAuthorizationViewController

Prompts the user to authorize a payment request.

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