Skip to navigation

Create an Apple Pay session

Apple Pay requires a server-side merchant validation step before the browser can open the payment sheet. Call this when the shopper taps the Apple Pay button, then pass the returned merchantSession unchanged to ApplePaySession.completeMerchantValidation. Sessions are short-lived, so mint one per payment attempt rather than caching. The Origin request header must carry the domain the shopper is paying on, and that domain must be registered with Apple Pay. Google Pay needs no equivalent — it initializes client-side. When the shopper is paying for a cart, use POST /api/v3/carts/{cartId}/apple-pay-sessions instead: a shopper can pay in a currency other than the event’s, and the order is charged through the merchant account for the event’s currency.

Authentication

X-TT-API-Keystring
API Key authentication via header

Headers

X-TT-PlatformenumRequired
Identifies the platform the request comes from.
Allowed values:
X-TT-RetailerstringRequired
Your retailer identifier, provided during onboarding. It must be a retailer your API key was issued for.

Request

This endpoint expects an object.
currencystringRequiredformat: "^[A-Z]{3}$">=1 character
ISO 4217 currency the shopper will pay in. Selects the merchant account the session is minted for, so Apple Pay must be enabled for this currency.

Response headers

X-RateLimit-Limitinteger
How many requests this API key may make for this retailer in the current window. Sent only when the request was counted against that limit. A response served from cache was not counted and repeats the value it was cached with.
X-RateLimit-Remaininginteger
How many requests this API key has left for this retailer in the current window. Sent only when the request was counted against that limit. A response served from cache was not counted and repeats the value it was cached with.

Response

Apple Pay merchant session.
dataobject
The Apple Pay merchant session a client needs to open the Apple Pay payment sheet.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error
503
Service Unavailable Error