CheckoutRecurring

Forward stored payment details

POST
/forward

Forwards the payment details you stored with Adyen to a third-party that you specify and returns the response from the third-party. Supports forwarding stored card details or network tokens. For more information, see Forward stored payment details.

Authorization

AuthorizationBasic <token>

In: header

Header Parameters

Idempotency-Key?string

A unique identifier for the message with a maximum of 64 characters (we recommend a UUID).

Request Body

application/json

baseUrl*string

The base URL of the third party API, where Adyen will send the request to forward the payment details.

merchantAccount*string

Your merchant account.

merchantReference?string

Merchant defined payment reference.

options?

The customizations that can be applied when making a forward request.

paymentMethod?

The card details.

request*

The details of the request that you want to forward to the third-party.

shopperReference*string

Your reference to uniquely identify this shopper, for example user ID or account ID. The value is case-sensitive and must be at least three characters.

Your reference must not include personally identifiable information (PII) such as name or email address.

storedPaymentMethodId?string

The unique identifier of the token that you want to forward to the third party. This is the storedPaymentMethodId you received in the webhook after you created the token.

Response Body

application/json

curl -X POST "https://example.com/forward" \  -H "Idempotency-Key: 37ca9c97-d1d1-4c62-89e8-706891a563ed" \  -H "Content-Type: application/json" \  -d '{    "merchantAccount": "YOUR_MERCHANT_ACCOUNT",    "shopperReference": "YOUR_SHOPPER_REFERENCE",    "storedPaymentMethodId": "M5N7TQ4TG5PFWR50",    "baseUrl": "http://thirdparty.example.com",    "request": {      "httpMethod": "post",      "urlSuffix": "/payments",      "credentials": "YOUR_CREDENTIALS_FOR_THE_THIRD_PARTY",      "headers": {        "Authorization": "Basic {{credentials}}"      },      "body": "{\\"amount\\":{\\"value\\":100,\\"currency\\":\\"USD\\"},\\"paymentMethod\\":{\\"creditCard\\":{\\"holderName\\":\\"{{holderName}}\\",\\"number\\":\\"{{number}}\\",\\"expiryMonth\\":\\"{{expiryMonth}}\\",\\"expiryYear\\":\\"{{expiryYear}}\\"}}}"    }  }'
{  "storedPaymentMethodId": "M5N7TQ4TG5PFWR50",  "pspReference": "XB7XNCQ8HXSKGK82",  "response": {    "status": 200,    "headers": {      "thirdparty-version": "2023-10-16"    },    "body": "{\"success\": \"ok\",\"data\": {\"tokenizeCreditCard\": {\"paymentMethod\": {\"id\": \"PAYMENT_METHOD_ID\"}}}}"  }}