Skip to navigation

Create a link

View as Markdown
Create a payment link.

Authentication

x-api-keystring

Account API key used to authenticate server-side requests. Use the credentials issued for the same environment as the API base URL.

Headers

Idempotency-KeystringOptional<=255 characters

Unique key used to safely retry the same state-changing request.

Request

This endpoint expects an object.
typeenumOptionalDefaults to charge
Allowed values:
amountdoubleOptional

Required for charge and per_request. session uses session_max_deposit; subscription derives it from the plan.

currencystringOptional

Required except for subscription, which takes it from the plan.

descriptionstringOptional<=2000 characters
referencestringOptional<=255 characters
Your own reference for this payment, such as an order or booking id. Returned with payment events so you can reconcile against a record your system already knows.
expires_atdatetimeOptional
When the payment can no longer be completed.
payment_methodslist of enumsOptional
The agent payment methods available for this payment.
Allowed values:
metadatamap from strings to stringsOptional

Free-form metadata returned with the payment. Do not store secrets or sensitive credentials here.

plan_idstringOptional

subscription only — a single plan id.

plan_idslist of stringsOptional

subscription only — offer several plans for the payer to choose between.

allow_customer_choicebooleanOptionalDefaults to false

subscription only — let the payer choose among plan_ids.

session_max_depositdoubleOptional

session only — the most the payer can fund for the session.

session_expires_atdatetimeOptional

session only.

endpoint_patternstringOptional<=500 characters

per_request only — the API path the payment applies to.

Response

Payment link created successfully.
messagestring
dataobject

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error