kepa
Checkout/createCnpApplePayMerchantSession

Create Apple Pay merchant session

Perform Apple's merchant validation so the Apple Pay sheet can open.

POST/api/v1/cnp/public/checkout-sessions/{id}/apple-pay/merchant-session
Browser-safeCall from the customer’s browser with a publishable key — never your secret key.
Apple Pay requires the merchant to be validated with Apple before the payment sheet appears. When the browser starts an Apple Pay session it calls this, kepa completes the validation server-side against Apple, and returns the opaque merchant session the browser hands back to Apple.
Path parameters
idstringRequired

Checkout session identifier.

Response

application/json

readyboolean
reasonstring
merchantIdstring
Good to know
  • Only reached in Safari, and only after wallet readiness reports Apple Pay is available.
  • Depends on the Apple Pay domain association file being served — see Apple Pay domain association.
  • The merchant session is opaque and time-limited; pass it straight to Apple without inspecting it.

createCnpApplePayMerchantSession

POSTGo API
https://api.kepapay.co/api/v1/cnp/public/checkout-sessions/{id}/apple-pay/merchant-session
Request
curl https://api.kepapay.co/api/v1/cnp/public/checkout-sessions/{id}/apple-pay/merchant-session \
  -H "X-Kepa-Publishable-Key: $KEPA_PUBLISHABLE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "clientSecret": "cs_7c1b9b86_secret_example",
  "validationUrl": "string",
  "initiativeContext": "merchant.example",
  "displayName": "Kepa Coffee"
}'
Response
{
  "ready": true,
  "reason": "string",
  "merchantId": "string"
}