Passer au contenu principal
POST
Create a checkout session

Autorisations

Authorization
string
header
requis

Scoped Bearer token from POST /merchant/api/auth.

Paramètres de chemin

id
integer
requis

Corps

application/json
amount
number<float>

The amount this payer owes. Only on an open-amount link; on a fixed-amount link omit it (or send the link's own amount). Omit it on an open-amount link to let the payer type the amount.

Plage requise: x >= 100
client_reference_id
string

Your own id for this payment: an order, an invoice, a user. It comes back on the payment_link_used webhook. Unlike a client_reference_id added to a bare link's URL, the payer cannot change it.

Maximum string length: 128
Exemple:

"order_1042"

return_url
string<uri>

Where the payer is sent a few seconds after paying. Must use https (the sandbox also accepts http, for testing against localhost).

Maximum string length: 2048
Exemple:

"https://shop.example/orders/1042/thanks"

expires_in
integer
défaut:86400

Lifetime in seconds: 5 minutes to 7 days, 24 hours by default. A session never outlives its link; it is cut short to the link's expires_at if that is sooner.

Plage requise: 300 <= x <= 604800

Réponse

Session created.

success
boolean
Exemple:

true

message
string
request_id
string<uuid>
data
object