Set up a payment session (Web)

POST {{baseUrl}}/paymentSession

Provides the data object that can be used to start the Checkout SDK. To set up the payment, pass its amount, currency, and other required parameters. We use this to optimise the payment flow and perform better risk assessment of the transaction. For more information, refer to How it works.

Request Body

{"amount"=>{"currency"=>"EUR", "value"=>17408}, "reference"=>"Your order number", "shopperReference"=>"YOUR_SHOPPER_REFERENCE", "channel"=>"Web", "origin"=>"https://www.yourwebsite.com", "returnUrl"=>"https://www.yourshop.com/checkout/result", "countryCode"=>"NL", "shopperLocale"=>"nl_NL", "merchantAccount"=>"{{YOUR_MERCHANT_ACCOUNT}}", "sdkVersion"=>"1.9.5"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring
Idempotency-KeynullA unique identifier for the message with a maximum of 64 characters (we recommend a UUID).

RESPONSES

status: OK

{"paymentSession":"eyJjaGVja291dHNob3BwZXJCYXN..."}