Skip to main content

Create Payment Link

POST https://api.paysera.com/checkout-payment-link/integration/v1/payment-links

Creates a payment link for an existing order. The payment link provides a URL where customers can complete the payment process.

Authorization​

This endpoint requires OAuth2 Bearer token authentication.

Authorization Header Format:

Authorization: Bearer YOUR_ACCESS_TOKEN

For more details, see the Authentication section.

Request Body​

FieldTypeRequiredDescription
order_idstring (UUID)✓Reference ID for the associated order
namestring✓Descriptive name for the payment link (max 255 chars)
experience.languagestring✓Language code for the payment link (ISO 639-1, e.g., en, lt)
experience.payment_flowstringPayment flow type (default: paysera_checkout). direct_payment requires payment_details.key and payment_details.country_code, see Direct payment
purchase.amountinteger✓ (unless payer-set)Amount in minor currency units (e.g., cents). Omit it when the order lets the payer set the amount
purchase.suggested_amountintegerOverrides the order's suggested amount for this link. Only for a payer-set order, within the order's limits. Omitted: the order's value is used
purchase.amount_buttonsarray of integersOverrides the order's amount buttons for this link: three or four amounts, strictly ascending, within the order's limits. Only for a payer-set order. Omitted or []: the order's buttons are used
lifetimeintegerLink validity in seconds (default: 259200 = 3 days, 0 = never expires). Must be 0 if the order has splits.
payment_details.keystring✓ (with direct_payment)Payment method key. Required with direct_payment: sets the method the payer is redirected to; omitting it returns 400 validation_payment_method_required. Deprecated with paysera_checkout: still accepted as a hint that lists the method right after Paysera, ahead of the project's display order. The order in which payment methods appear on the payment page is configured per project in the merchant portal (Payment Methods).
payment_details.purposestringPayment purpose description (max 255 chars). Used verbatim as the payer-facing payment purpose, truncated to 140 chars; omit it to get the generated default. See Payment purpose
payment_details.country_codestring✓ (for direct_payment)Country code (ISO 3166-1 alpha-2) for filtering payment methods. With direct_payment it selects the country of the payment method's bank. A direct_payment link without it is still accepted (no validation error) and opens the Paysera checkout page instead
payer_information.namestringPayer name (max 150 chars)
payer_information.emailstringPayer email
metadataobjectAdditional key-value metadata pairs
Amount Format

All amounts use minor currency units (e.g., cents for EUR). The amount "2500" represents €25.00.

Response​

FieldTypeDescription
link_idstring (UUID)Unique payment link identifier
order_idstring (UUID)Associated order ID
payment_URLstringPayment URL - redirect customer here to complete payment
experience.languagestringLanguage of the payment link
experience.payment_flowstringPayment flow type
payment_details.keystringPayment method key
payment_details.purposestringThe purpose you sent, echoed back — null if you omitted it. See Payment purpose
payment_details.country_codestringCountry code (ISO 3166-1 alpha-2)
purchase.amountinteger | nullAmount in minor currency units; null while the payer sets the amount
purchase.payer_sets_amountbooleanWhether the payer enters the amount (taken from the order)
purchase.minimum_amountinteger | nullThe order's minimum, null when the order set none
purchase.maximum_amountinteger | nullThe order's maximum, null when the order set none
purchase.suggested_amountinteger | nullSuggested amount for this link
purchase.amount_buttonsarray of integersAmount buttons for this link; [] when none
payer_information.namestringPayer name
payer_information.emailstringPayer email
expired_atintegerUnix timestamp when link expires
created_atintegerUnix timestamp of creation

Example​

Request​

POST https://api.paysera.com/checkout-payment-link/integration/v1/payment-links
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIs...
{
"order_id": "a6f2b8e3-5e5f-47d9-b13f-87ed2db2938a",
"name": "Order #12345",
"experience": {
"language": "en",
"payment_flow": "paysera_checkout"
},
"purchase": {
"amount": 2500
},
"lifetime": 3600,
"payment_details": {
"purpose": "Order #12345 - Leather Wallet",
"country_code": "LT"
},
"payer_information": {
"name": "John Doe",
"email": "john@example.com"
}
}

Response​

{
"link_id": "c8d9e0f1-2a3b-4c5d-6e7f-8a9b0c1d2e3f",
"order_id": "a6f2b8e3-5e5f-47d9-b13f-87ed2db2938a",
"payment_URL": "https://api.paysera.com/checkout-payment-link/payment-collection/v1/payment-links/abc123def456GhiJkl_mNOpQrStUvWxYz0123456",
"experience": {
"language": "en",
"payment_flow": "paysera_checkout"
},
"payment_details": {
"key": null,
"purpose": "Order #12345 - Leather Wallet",
"country_code": "LT"
},
"purchase": {
"amount": 2500,
"payer_sets_amount": false,
"minimum_amount": null,
"maximum_amount": null,
"suggested_amount": null,
"amount_buttons": []
},
"payer_information": {
"name": "John Doe",
"email": "john@example.com"
},
"expired_at": 1736436870,
"created_at": 1736433270
}

Payer-Set Amount Example​

For an order created with purchase.payer_sets_amount: true, omit purchase.amount (send "purchase": {} when you override nothing). The link takes the flag and the limits from the order; you may override the suggested amount and the buttons for this link:

{
"order_id": "a6f2b8e3-5e5f-47d9-b13f-87ed2db2938a",
"name": "Donation",
"experience": {
"language": "en"
},
"purchase": {
"suggested_amount": 2500,
"amount_buttons": [1000, 2500, 5000]
}
}

payment_flow: direct_payment is not available for a payer-set order.

Nor is it available for an order that offers tips, whatever the link's amount: validation_direct_payment_with_tips for an order with tips_enabled: true (unless it was created with a split configuration or tokenization before those combinations were refused, where the flag has no effect), and validation_direct_payment_with_tip_rule for an order with a tip split. Use the default paysera_checkout flow for those orders.

Pre-selecting Payment Method​

This section applies to the direct_payment flow only. To skip the payment method selection screen and redirect directly to a specific bank or payment provider, set payment_flow to direct_payment:

{
"order_id": "a6f2b8e3-5e5f-47d9-b13f-87ed2db2938a",
"name": "Order #12345",
"experience": {
"language": "en",
"payment_flow": "direct_payment"
},
"purchase": {
"amount": 2500
},
"payment_details": {
"key": "swedbank",
"country_code": "LT"
}
}

Use the Get Payment Methods endpoint to retrieve available method keys.

Direct payment​

With experience.payment_flow: direct_payment the payer is redirected straight to the payment method, without the Paysera checkout page. Send both payment_details.key and payment_details.country_code: one method key can cover banks in several countries (for example Swedbank in LT, LV and EE), and the country selects which one opens. Let the payer choose the bank's country on your side, for example with a country selector next to the bank logos: a billing address does not tell which country's bank the payer uses.

A direct_payment link without country_code opens the Paysera checkout page instead, where the payer selects the country and payment method. This applies to every payment method, cards and wallets included.

Next Steps​

After creating a payment link:

  1. Redirect the customer to the payment_URL
  2. Set up webhook handling to receive payment notifications

AUTHORIZATION: HTTP

REQUEST

Base URL
https://api.paysera.com

RESPONSE

Payment link created successfully
{
"link_id": "c8d9e0f1-2a3b-4c5d-6e7f-8a9b0c1d2e3f",
"order_id": "a6f2b8e3-5e5f-47d9-b13f-87ed2db2938a",
"payment_URL": "https://api.paysera.com/checkout-payment-link/payment-collection/v1/payment-links/abc123def456GhiJkl_mNOpQrStUvWxYz0123456",
"experience": {
"language": "en",
"payment_flow": "paysera_checkout"
},
"payment_details": {
"key": null,
"purpose": "Order",
"country_code": "LT"
},
"purchase": {
"amount": 2500,
"payer_sets_amount": false,
"minimum_amount": null,
"maximum_amount": null,
"suggested_amount": null,
"amount_buttons": []
},
"payer_information": {
"name": "John Doe",
"email": "john@example.com"
},
"expired_at": 1736436870,
"created_at": 1736433270
}