Skip to main content
Apple Pay enables customers to pay using payment methods saved to their Apple Wallet. The SDK provides configuration options for button styling and contact information capture.

Client session requirements

Apple Pay requires currencyCode and order.countryCode in the client session.
order.countryCode is the merchant’s country (ISO 3166-1 alpha-2) — where the transaction is processed, not the buyer’s country. This maps to Apple Pay’s PKPaymentRequest.countryCode: “the two-letter ISO 3166 code for the country or region of the merchant’s principle place of business.”

Quick reference


Button options

Customize the appearance of the Apple Pay button through the buttonOptions configuration.

Button type

Set buttonOptions.type to control the label displayed on the Apple Pay button. Text is automatically localized.

Examples

The SDK renders buttons according to Apple’s Human Interface Guidelines.

Billing options

Capture billing information from the customer’s Apple Wallet.

Required billing contact fields

Set requiredBillingContactFields to specify which billing details to capture from the customer’s Apple Wallet.

Shipping options

Capture shipping information from the customer’s Apple Wallet and enable shipping method selection.

Required shipping contact fields

Set requiredShippingContactFields to specify which shipping details to capture from the customer’s Apple Wallet.

Shipping method selection

Set requireShippingMethod to true to display available shipping methods in the Apple Pay sheet. This requires a shipping module to be configured in your Primer dashboard.
When enabled, customers can select from your configured shipping methods directly within the Apple Pay sheet.

Domain configuration

If your checkout is hosted on a different domain than your registered Apple Pay domain, set merchantDomain:
See merchantDomain in the SDK Options Reference.

Complete example


Supported card networks

The SDK filters networks based on your Primer configuration. If orderedAllowedCardNetworks is set in your client session, only those networks are available.

Display items

The Apple Pay sheet displays line items from your order:
  • Line items — Products from order.lineItems
  • Fees — All fees from order.fees
  • Shipping — Shipping cost when shipping options are enabled
The total amount is calculated from merchantAmount if set, otherwise from totalOrderAmount.

Testing

Development

  1. Use Safari on macOS or iOS
  2. Add a test card to your Apple Wallet
  3. Use Primer’s TEST environment

Production

  1. Register your domain in the Apple Developer Portal
  2. Configure your merchant identifier
  3. Verify your domain
Apple Pay only works on supported devices with Safari or WebKit-based browsers. The button appears only when the device supports Apple Pay and the user has payment methods configured.

See also

SDK options reference

All configuration options

Apple Pay on the web

Official Apple documentation

Apple Pay button types

Complete button type reference