Apple Pay
Start an Apple Pay session
POST
Validates your merchant session with Apple. Call it when Apple triggers the onvalidatemerchant event in the browser, and pass the sessionData from the response to session.completeMerchantValidation().
See Apple Pay in your own checkout.
apiKeyheader
AuthorizationBasic <token>Use your project's API key as the username and leave the password empty. Only use the API key from your server: it gives full access to your project.
application/json- body
validationUrl*stringThe event.validationURL from Apple Pay.
Format
urimerchantIdentifier*stringYour project ID without hyphens.
displayName*stringThe name of your shop, as shown to your customer. Use the trade name of your project.
initiativeContext*stringThe domain of your payment page.
The merchant session from Apple.
application/json- response
sessionData?unknownThe merchant session. Pass it to session.completeMerchantValidation() in the browser.
curl -X POST 'https://api.dev.gingerpayments.com/v1/apple-pay/sessions/' \ -H 'Content-Type: application/json' \ -d '{ "validationUrl": "https://apple-pay-gateway.apple.com/paymentservices/startSession", "merchantIdentifier": "05ad138f52fa40dc97515fde949dcb57", "displayName": "Example Shop", "initiativeContext": "shop.example.com"}'{ "sessionData": null}