Create Apple Pay session

Create a session with Apple Pay to facilitate a payment. A successful response from this endpoint should be passed through to Apple Pay unchanged.

To use this endpoint from the browser, you’ll need to specify the /accounts/{accountID}/apple-pay.write scope when generating a token.
POST
/accounts/{accountID}/apple-pay/sessions
cURL
1
2
3
4
5
6
curl -X POST "https://api.moov.io/accounts/{accountID}/apple-pay/sessions" \
  -H "Authorization: Bearer {token}" \
  --data-raw '{
    "domain": "checkout.classbooker.dev",
    "displayName": "Example Merchant"
  }'\
200 422 429
Session created with Apple Pay.
Stringified session object returned from Apple Pay. This should be converted to JSON when passed to Apple.
An error occurred when linking an Apple Pay token.
Request was refused due to rate limiting.

X-Retry-In

string <duration>
How long (in milliseconds) to wait until able to retry the request.

Path parameters

accountID

string <uuid> required
ID of the Moov account acting as a merchant in a card transaction.

Body

application/json

displayName

string <=64 characters required
A string of 64 or fewer UTF-8 characters. Displayed in the Buy button.

domain

string required
A fully qualified top-level or sub-domain name where you will accept Apple Pay. Should not include “https”.

Response

application/json
Stringified session object returned from Apple Pay. This should be converted to JSON when passed to Apple.