Logo
Adyen APIs API Documentation

Tokenize card details for a subscription

POST {{baseUrl}}/payments

Sends payment parameters (like amount, country, and currency) together with other required input details collected from the shopper. To know more about required parameters for specific payment methods, refer to our payment method guides. The response depends on the payment flow: * For a direct flow, the response includes a pspReference and a resultCode with the payment result, for example Authorised or Refused. * For a redirect or additional action, the response contains an action object.

 

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

{ "additionalData": { "cvcResult": "1 Matches", "authCode": "098871", "avsResult": "4 AVS not supported for this card type", "recurring.recurringDetailReference": "9916178934434753", "recurringProcessingModel": "Subscription", "avsResultRaw": "4", "cvcResultRaw": "M", "refusalReasonRaw": "AUTHORISED", "recurring.shopperReference": "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j", "acquirerCode": "TestPmmAcquirer", "acquirerReference": "8PQMP9VD896" }, "pspReference": "993617895199574A", "resultCode": "Authorised", "merchantReference": "string" }

Curl
curl -X POST 'https://checkout-test.adyen.com/v71/payments' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Idempotency-Key: ' -d '{"amount":{"currency":"USD","value":1000},"reference":"Your order number","paymentMethod":{"type":"scheme","encryptedCardNumber":"test_4111111111111111","encryptedExpiryMonth":"test_03","encryptedExpiryYear":"test_2030","encryptedSecurityCode":"test_737"},"shopperReference":"YOUR_SHOPPER_REFERENCE","storePaymentMethod":true,"shopperInteraction":"Ecommerce","recurringProcessingModel":"Subscription","returnUrl":"https://your-company.com/...","merchantAccount":""}'

ENDPOINTS