Rabobank Docs

Start an Apple Pay session

POST
/v1/apple-pay/sessions/

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.

Request Body

application/json
  1. body
validationUrl*string

The event.validationURL from Apple Pay.

Formaturi
merchantIdentifier*string

Your project ID without hyphens.

displayName*string

The name of your shop, as shown to your customer. Use the trade name of your project.

initiativeContext*string

The domain of your payment page, exactly as registered with Rabobank for your project.

Response Body

The merchant session from Apple.

application/json
  1. 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  ]}