Framework

PassKit

Create, distribute, and update passes for the Wallet app. Request and process Apple Pay payments in your app.

Overview

The PassKit framework lets you add and manage passes in the user’s Passbook app.

The Passbook app allows users to organize their boarding passes, tickets, gift cards, and loyalty cards. Using the PassKit framework, you can add passes to Passbook and have these passes appear on the user’s lock screen based on the time and place when the pass is relevant. You can also update a pass’s content using push notifications.

Additionally, Passbook manages the user’s credit cards for Apple Pay. The PassKit framework also supports in-app payments for physical goods and services using Apple Pay. For digital goods and services delivered within the app, see In-App Purchase Programming Guide instead.

Symbols

Classes

PKAddPassButton

The PKAddPassButton class provides a button that is used to add passes to Wallet. You choose the button’s style, and the system provides a control with the correct appearance.

PKAddPassesViewController

The PKAddPassesViewController class lets your app show a pass and prompt the user to add that pass to the pass library.

PKAddPaymentPassRequest

The PKAddPaymentPassRequest class contains the card data needed to add a card to Apple Pay. All sensitive data must be encrypted before being assigned to this object. Because the encryption keys vary depending on the server, create PKAddPaymentPassRequest instances only when your PKAddPaymentPassViewControllerDelegate object’s addPaymentPassViewController(_:generateRequestWithCertificateChain:nonce:nonceSignature:completionHandler:) method is called. The required server certificates are provided at that time.

PKAddPaymentPassRequestConfiguration

The PKAddPaymentPassRequestConfiguration class contains the configuration data needed to instantiate a new PKAddPaymentPassViewController object. The encryption scheme, cardholder name, and primary account suffix are required. The configuration information is used for setup and display only. It should not contain any sensitive information.

PKAddPaymentPassViewController

The PKAddPaymentPassViewController class lets you display an interface that lets users add cards to Apple Pay from within your app.

PKContact

The PKContact class encapsulates contact information needed for billing and shipping. PKContact instances contain only the information needed for the given transaction. All other properties are set to nil.

PKObject

The PKObject class is an opaque type that acts as the superclass for the PKPass class. Never use this class directly. Use the PKPass or PKPaymentPass classes instead.

PKPass

The PKPass class represents a single pass.

PKPassLibrary

The PKPassLibrary class provides an interface to the user’s library of passes.

PKPayment

The PKPayment class represents the result of authorizing a payment request. It contains payment information, encrypted in the payment token.

PKPaymentAuthorizationController

The PKPaymentAuthorizationController class presents a sheet that prompts the user to authorize a payment request. 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.

PKPaymentAuthorizationViewController

The PKPaymentAuthorizationViewController class prompts the user to authorize a payment request. 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.

PKPaymentButton

The PKPaymentButton class provides a button that is used either to trigger payments through Apple Pay or to prompt the user to set up a card. You choose the type and style of button, and the system provides a control with the correct content and appearance.

PKPaymentMethod

PKPaymentMethod objects contains information about Apple Pay cards.

PKPaymentPass

The PKPaymentPass class represents a provisioned payment card for in-app payments.

PKPaymentRequest

The PKPaymentRequest class encapsulates a request for payment, including information about payment processing capabilities, the payment amount, and shipping information.

PKPaymentSummaryItem

The PKPaymentSummaryItem class defines a summary item in a payment request—for example, total, tax, discount, or grand total.

PKPaymentToken

The PKPaymentToken class contains the user’s payment credentials.

PKShippingMethod

The PKShippingMethod defines a shipping method for delivering physical goods.

Protocols

PKAddPassesViewControllerDelegate

The PKAddPassesViewControllerDelegate protocol defines methods that an add-passes view controller’s delegate implements.

PKAddPaymentPassViewControllerDelegate

Delegates for the PKAddPaymentPassViewController class must adopt this protocol. The protocol defines two required methods. These let the system prompt you for an add payment request, and inform you when a request has succeeded or failed.

PKPaymentAuthorizationControllerDelegate

The PKPaymentAuthorizationControllerDelegate protocol is implemented by the payment authorization controller’s delegate. You implement this protocol to respond to user interaction with that controller.

PKPaymentAuthorizationViewControllerDelegate

The PKPaymentAuthorizationViewControllerDelegate protocol is implemented by the payment authorization view controller’s delegate. You implement this protocol to respond to user interaction with that view controller.

Extended Types

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