Request Apple Pay Session by Account
Apple Pay — Request Apple Pay Session by Account
3 min readUpdated Apr 7, 2026
POST /api/v1/apple-pay/merchant-session-by-account
Request an Apple Pay merchant session using your accountId — no payment intent required. Use this endpoint for the Encrypted Payloads S2S flow. The origin must match a registered payment page domain. Pass the returned session object to completeMerchantValidation() in the Apple Pay JS API.
Guide: Apple Pay Guide — conceptual walkthrough, flow diagrams, and integration patterns.
#Headers
| Header | Value |
|---|---|
Content-Type | application/json |
Authorization | Bearer {token} — see Authentication |
#Request Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
validationUrl | String | Yes | Apple's validation URL provided by the Apple Pay JS API on the client side |
origin | String | Yes | Origin of the page requesting the session (e.g. https://checkout.your-site.com). Must match a registered payment page domain. |
accountId | Long | Yes | Merchant account ID used to look up the Apple Pay configuration |
#Response
Returns an opaque Apple Pay session object as a JSON string. Pass it directly to completeMerchantValidation() in the Apple Pay JS API — do not parse or modify it.
{
"validationUrl": "https://apple-pay-gateway.apple.com/paymentservices/startSession",
"origin": "https://checkout.your-site.com",
"accountId": 825952981806376569
}#Error Responses
| HTTP Status | Description |
|---|---|
400 | Bad Request — missing or invalid parameters. Check the response body for field-level details. |
401 | Unauthorized — missing, expired, or invalid bearer token. Re-authenticate via POST /api/v1/auth. |
404 | Not Found — merchant not found for the given accountId. |
422 | Unprocessable Entity — Apple Pay is not enabled for the given merchant account. |
500 | Internal Server Error — an unexpected error occurred. Retry with exponential backoff. |
curl -X POST https://sandbox.api.exirom.com/api/v1/apple-pay/merchant-session-by-account \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"validationUrl": "https://apple-pay-gateway.apple.com/paymentservices/startSession",
"origin": "https://checkout.your-site.com",
"accountId": 825952981806376569
}'#Try It
SandboxTry it
https://sandbox.api.exirom.com/api
Was this helpful?