Create a payment link

POST {{baseUrl}}/paymentLinks

Creates a payment link to our hosted payment form where shoppers can pay. The list of payment methods presented to the shopper depends on the currency and country parameters sent in the request. For more information, refer to Pay by Link documentation.

Request Body

{"reference"=>"{{$guid}}", "amount"=>{"value"=>1250, "currency"=>"BRL"}, "countryCode"=>"BR", "merchantAccount"=>"{{YOUR_MERCHANT_ACCOUNT}}", "shopperReference"=>"YOUR_SHOPPER_REFERENCE", "shopperEmail"=>"test@email.com", "shopperLocale"=>"pt-BR", "billingAddress"=>{"street"=>"Roque Petroni Jr", "postalCode"=>"59000060", "city"=>"São Paulo", "houseNumberOrName"=>"999", "country"=>"BR", "stateOrProvince"=>"SP"}, "deliveryAddress"=>{"street"=>"Roque Petroni Jr", "postalCode"=>"59000060", "city"=>"São Paulo", "houseNumberOrName"=>"999", "country"=>"BR", "stateOrProvince"=>"SP"}}

HEADERS

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

RESPONSES

status: Created

{"amount":{"currency":"BRL","value":1250},"billingAddress":{"city":"São Paulo","country":"BR","houseNumberOrName":"999","postalCode":"59000060","stateOrProvince":"SP","street":"Roque Petroni Jr"},"countryCode":"BR","deliveryAddress":{"city":"São Paulo","country":"BR","houseNumberOrName":"999","postalCode":"59000060","stateOrProvince":"SP","street":"Roque Petroni Jr"},"expiresAt":"2022-10-28T09:16:22Z","merchantAccount":"YOUR_MERCHANT_ACCOUNT","reference":"YOUR_ORDER_NUMBER","reusable":false,"shopperEmail":"test@email.com","shopperLocale":"pt-BR","shopperReference":"YOUR_SHOPPER_REFERENCE","id":"PLE83C39B0A0DE0C1E","status":"active","url":"https://test.adyen.link/PLE83C39B0A0DE0C1E"}