Type Method


Returns a button instance with the Apple Pay logo.


+ (instancetype)buttonWithType:(PKPaymentButtonType)buttonType style:(PKPaymentButtonStyle)buttonStyle;



The button’s content. For a complete list of button types, see PKPaymentButtonType.


The button’s appearance. For a complete list of button styles, see PKPaymentButtonStyle.

Return Value

Returns a PKPaymentButton instance with the specified type and style.


Use the returned button to trigger a purchase through Apple Pay. Add the button instance to your view hierarchy, and then set its Target-Action by calling its addTarget:action:forControlEvents: method. In the action method, create the payment request and present the payment authorization view controller. These buttons can be used only to initiate Apple Pay transactions.

Do not display a button smaller than its intrinsic content size. You can extend the button’s width to fit your layout, but do not reduce the width or change the button’s height.

For more information on using Apple Pay, see Apple Pay Programming Guide.

See Also

Creating Payment Buttons

- initWithPaymentButtonType:paymentButtonStyle:

Initializes a new payment button.