Start an Apple Pay session
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(). Only for a server-to-server integration with your own checkout: with the hosted payment page you don't call this endpoint.
Your project must have Apple Pay enabled, with the domain of your payment page registered with Rabobank. Without the registered domain, the session can't be created.
Test environment: with a test project and an Apple Pay sandbox tester account, send the same request to /v1/apple-pay/test/sessions/ instead. Apple validates sandbox sessions on another gateway.
See Apple Pay in your own checkout.
application/json- body
validationUrl*stringThe event.validationURL from Apple Pay.
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, exactly as registered with Rabobank for your project.
The merchant session from Apple.
application/json- response
sessionData?array<unknown>The merchant session from Apple, as an opaque array. Pass it to session.completeMerchantValidation() in the browser as is.
curl -X POST 'https://api.prod.smartpay.gingerpayments.com/v1/apple-pay/sessions/' \ --user "$API_KEY:" \ -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 ]}