Skip to main content
POST
Create a payment link

Authorizations

Authorization
string
header
required

Secret key, kc_sk_test_... or kc_sk_live_.... Server-side only.

Headers

Idempotency-Key
string
required

Unique key per logical request, reused on retries. 1 to 255 characters.

Required string length: 1 - 255

Body

application/json
amount
integer<int64>
required
Required range: x >= 1
currency
string
required

ISO 4217 currency code, uppercase.

Pattern: ^[A-Z]{3}$
Example:

"EUR"

country
string
required

ISO 3166-1 alpha-2 country code of the shopper.

Pattern: ^[A-Z]{2}$
Example:

"NL"

reference
string
required
Required string length: 1 - 80
description
string
Maximum string length: 500
reusable
boolean
default:false
capture_method
enum<string>
Available options:
automatic,
manual
return_url
string<uri>
expires_at
string<date-time>

At most 90 days in the future.

locale
string
metadata
object

Up to 50 keys. Keys up to 40 characters, values up to 500 characters. Echoed back unchanged.

Response

Payment link created.

id
string
required
Example:

"plink_01JABCDEF"

object
string
required
Allowed value: "payment_link"
url
string<uri>
required
status
enum<string>
required
Available options:
active,
inactive,
completed,
expired
amount
integer<int64>
required

Amount in the currency's minor unit.

Required range: x >= 0
currency
string
required

ISO 4217 currency code, uppercase.

Pattern: ^[A-Z]{3}$
Example:

"EUR"

country
string
required

ISO 3166-1 alpha-2 country code of the shopper.

Pattern: ^[A-Z]{2}$
Example:

"NL"

reference
string
required
reusable
boolean
required

If true the link can be paid more than once.

capture_method
enum<string>
required
Available options:
automatic,
manual
metadata
object
required

Up to 50 keys. Keys up to 40 characters, values up to 500 characters. Echoed back unchanged.

created_at
string<date-time>
required
description
string | null
return_url
string<uri> | null
expires_at
string<date-time> | null
payments_count
integer