Class

PKPaymentRequest

Encapsulates a request for payment, including information about payment processing capabilities, the payment amount, and shipping information.

Declaration

@interface PKPaymentRequest : NSObject

Topics

Selecting the Payment Networks

+ availableNetworks

Returns the list of available payment networks that are supported by Apple Pay.

supportedNetworks

The payment networks that you support.

PKPaymentNetwork

Payment networks.

Setting Merchant Information

merchantIdentifier

Your merchant identifier.

merchantCapabilities

A bit field of the payment processing protocols and card types that you support.

PKMerchantCapability

Capabilities for processing payment.

countryCode

The two-letter ISO 3166 country code.

supportedCountries

A list of ISO 3166 country codes to limit payments to cards from specific countries.

currencyCode

The three-letter ISO 4217 currency code.

Setting the Payment Summary Items

paymentSummaryItems

An array of payment summary item objects that summarize the amount of the payment.

PKPaymentSummaryItem

Defines a summary item in a payment request—for example, total, tax, discount, or grand total.

Requesting Billing and Shipping Contact Fields

requiredBillingContactFields

A list of fields that you need for a billing contact in order to process the transaction.

requiredShippingContactFields

A list of fields that you need for a shipping contact in order to process the transaction.

PKContactField

The fields that describe a contact.

Providing Known Contact Information

billingContact

A prepopulated billing address.

shippingContact

A prepopulated shipping address.

PKContact

Encapsulates contact information needed for billing and shipping.

Setting the Shipping Methods and Types

shippingMethods

An array of PKShippingMethod objects that describe the supported shipping methods.

PKShippingMethod

Defines a shipping method for delivering physical goods.

shippingType

The type of shipping used by this request.

PKShippingType

Complete list of valid shipping types.

Adding Custom Data

applicationData

Application-specific data or state.

Providing Error Information

Create common payment errors using these simple convenience functions.

+ paymentBillingAddressInvalidErrorWithKey:localizedDescription:

Creates a billing address error with the supplied key and user-facing error message.

+ paymentContactInvalidErrorWithContactField:localizedDescription:

Creates a contact error with the supplied field and user-facing error message.

+ paymentShippingAddressInvalidErrorWithKey:localizedDescription:

Creates a shipping address error with the supplied key and user-facing error message.

+ paymentShippingAddressUnserviceableErrorWithLocalizedDescription:

Creates an error for an unserviceable address, with the supplied user-facing error message.

Deprecated

requiredBillingAddressFields

A bit field of billing address fields that you need in order to process the transaction.

Deprecated
requiredShippingAddressFields

A bit field of shipping address fields that you need in order to process the transaction.

Deprecated
PKAddressField

Billing or shipping address fields.

Deprecated
billingAddress

A prepopulated billing address.

Deprecated
shippingAddress

A prepopulated shipping address.

Deprecated

Relationships

Inherits From