PrimerSettings — there is no separate Apple Pay view or scope to wire up. Once you provide a merchant identifier in paymentMethodOptions, Apple Pay is enabled on the backend client session and surfaces automatically as a CheckoutPaymentMethod (with type == "APPLE_PAY") in PrimerPaymentMethods, or as one of the managed screens in PrimerCheckout.
Apple Pay requires a physical device with a card in the Wallet, the Apple Pay capability enabled in your app, and a configured merchant identifier. It does not appear in the iOS Simulator.
Setup overview
There are three steps to accept Apple Pay, in order:1. Apple Pay capability
Add the Apple Pay capability to your app target in Xcode.
2. Merchant ID
Create a merchant identifier in the Apple Developer portal.
3. PrimerSettings
Pass the merchant identifier to the SDK via PrimerApplePayOptions.
1. Enable the Apple Pay capability
In Xcode, select your app target, open the Signing & Capabilities tab, and add the Apple Pay capability. This generates thecom.apple.developer.in-app-payments entitlement and lets you attach merchant identifiers to the app.
2. Create a merchant identifier
In the Apple Developer portal, create a merchant identifier (for examplemerchant.com.myapp). Then return to Xcode and select that merchant identifier under the Apple Pay capability you added in step 1.
You also need a payment processing certificate associated with the merchant identifier, and Apple Pay must be configured for the processor on your Primer Dashboard. See the Apple Pay payment method documentation for backend configuration.
3. Configure PrimerSettings
Provide the merchant identifier throughPrimerApplePayOptions, nested inside paymentMethodOptions on PrimerSettings. The merchantIdentifier must exactly match the identifier you created in step 2.
PrimerApplePayOptions
| Parameter | Type | Default | Description |
|---|---|---|---|
merchantIdentifier | String | — | Your Apple Pay merchant identifier (for example "merchant.com.myapp"). Must match the identifier configured in Xcode. |
merchantName | String? | — | Deprecated. Merchant name shown on the Apple Pay sheet. Prefer the client session. |
isCaptureBillingAddressEnabled | Bool | false | Deprecated. Requests the billing address. Prefer billingOptions to declare required billing fields. |
showApplePayForUnsupportedDevice | Bool | true | When false, hides Apple Pay on devices that cannot present it. |
checkProvidedNetworks | Bool | true | Whether to verify the device can pay using the provided networks before presenting Apple Pay. |
shippingOptions | ShippingOptions? | nil | Shipping contact requirements collected on the Apple Pay sheet. |
billingOptions | BillingOptions? | nil | Required billing contact fields collected on the Apple Pay sheet. |
Collecting contact details
UseShippingOptions and BillingOptions to require contact fields on the Apple Pay sheet. Both accept RequiredContactField values.
| Case | Description |
|---|---|
.name | Collect the contact’s name. |
.emailAddress | Collect the contact’s email address. |
.phoneNumber | Collect the contact’s phone number. |
.postalAddress | Collect the contact’s postal address. |
Showing Apple Pay
Once configured, Apple Pay appears wherever payment methods are rendered. You do not present or initiate the Apple Pay sheet yourself — selecting the method starts the SDK-managed flow.Managed checkout
WithPrimerCheckout, pass the settings and the SDK renders Apple Pay among its default screens.
Composable checkout
When you build your own UI, pass the same settings intoPrimerCheckoutSession. Apple Pay then appears as a CheckoutPaymentMethod in PrimerPaymentMethods, alongside the other available methods.
Troubleshooting
| Symptom | Likely cause |
|---|---|
| Apple Pay does not appear | No merchantIdentifier in PrimerApplePayOptions, the merchant identifier does not match Xcode, or Apple Pay is not configured for your processor on the Primer Dashboard. |
| Apple Pay is hidden on a device | The device cannot present Apple Pay and showApplePayForUnsupportedDevice is false, or the Wallet has no eligible card and checkProvidedNetworks is true. |
| Apple Pay never appears in the Simulator | Apple Pay only runs on a physical device with the capability enabled. |
Apple Pay failures are reported through the standard result handling path. See Handle the payment result and PrimerError.
See also
PrimerSettings
Where Apple Pay options live, alongside the other SDK settings.
PrimerPaymentMethods
Render Apple Pay as a method row in a custom layout.
PrimerCheckout
The managed flow that shows Apple Pay automatically.
Handle the payment result
Consume the checkout outcome after an Apple Pay payment.