CheckoutUtility

Get an Apple Pay session

POST
/applePay/sessions

You need to use this endpoint if you have an API-only integration with Apple Pay which uses Adyen's Apple Pay certificate.

The endpoint returns the Apple Pay session data which you need to complete the Apple Pay session validation.

Authorization

AuthorizationBasic <token>

In: header

Header Parameters

Idempotency-Key?string

A unique identifier for the message with a maximum of 64 characters (we recommend a UUID).

Request Body

application/json

displayName*string

This is the name that your shoppers will see in the Apple Pay interface.

The value returned as configuration.merchantName field from the /paymentMethods response.

Lengthlength <= 64
domainName*string

The domain name you provided when you added Apple Pay in your Customer Area.

This must match the window.location.hostname of the web shop.

merchantIdentifier*string

Your merchant identifier registered with Apple Pay.

Use the value of the configuration.merchantId field from the /paymentMethods response.

Response Body

application/json

curl -X POST "https://example.com/applePay/sessions" \  -H "Idempotency-Key: 37ca9c97-d1d1-4c62-89e8-706891a563ed" \  -H "Content-Type: application/json" \  -d '{    "displayName": "YOUR_MERCHANT_NAME",    "domainName": "YOUR_DOMAIN_NAME",    "merchantIdentifier": "YOUR_MERCHANT_ID"  }'
{  "data": "eyJ2Z..."}