Logo
Adyen APIs API Documentation

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.

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
Content-Type
string
Accept
string
Idempotency-Key
null A unique identifier for the message with a maximum of 64 characters (we recommend a UUID).




RESPONSES

status OK

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



Curl
curl -X POST 'https://checkout-test.adyen.com/v71/paymentSession' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Idempotency-Key: ' -d '{"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":"","sdkVersion":"1.9.5"}'

ENDPOINTS