Skip to main content

Apple Pay session

POST/api/v1/bank/public/charge/applepay/{uuid}/session
Public endpoint

This endpoint is called from the browser during the Apple Pay payment flow. When the user clicks the Apple Pay button, your JavaScript calls ApplePaySession.onvalidatemerchant, which triggers this endpoint to validate A55 as the payment processor with Apple's servers.


Request headers

HeaderValueRequired
Content-Typeapplication/jsonYes

Path parameters

FieldTypeRequiredDescription
uuidstring (UUID)YesCharge UUID for the Apple Pay payment

Request body

FieldTypeRequiredDescription
validation_urlstringYesApple's merchant validation URL from onvalidatemerchant event
domainstringYesYour website domain (e.g., www.your-store.com)
display_namestringNoMerchant name shown on Apple Pay sheet

Response fields

FieldTypeDescription
merchant_sessionobjectOpaque Apple Pay session object — pass to completeMerchantValidation()
merchant_session.epochTimestampnumberSession creation timestamp
merchant_session.expiresAtnumberSession expiration timestamp
merchant_session.merchantSessionIdentifierstringApple session ID
merchant_session.merchantIdentifierstringApple merchant ID

HTTP status codes

StatusDescription
200Merchant session created
400Invalid validation_url or domain
404Charge not found or not an Apple Pay charge
409Session already created for this charge
422Domain not registered with Apple Pay
429Rate limit exceeded
500Internal server error

Code examples

curl -s -X POST "https://core-manager.a55.tech/api/v1/bank/public/charge/applepay/a1b2c3d4-e5f6-7890-abcd-ef1234567890/session" \
-H "Content-Type: application/json" \
-d '{
"validation_url": "https://apple-pay-gateway.apple.com/paymentservices/startSession",
"domain": "www.your-store.com",
"display_name": "Your Store"
}'

Error response example

{
"status": "error",
"message": [
{
"code": "DOMAIN_NOT_REGISTERED",
"source": "applepay",
"description": "Domain www.your-store.com is not registered for Apple Pay. Register it in the A55 dashboard."
}
]
}