TillsafeDocstillsafe.comRequest early access

Payment links

Reusable, shareable links that create one invoice per payer

List payment links, newest first.

Authentication: Secret key

ParameterInTypeDescription
limitqueryinteger (int32)

1 to 100, default 10

  • Minimum: 0
cursorquerystring

next_cursor from the previous page

activequeryboolean

Only active (true) or deactivated (false) links

StatusDescriptionBody
200
PaymentLinkList application/json
400
ErrorResponse application/json

POST /v1/payment_links

Create a payment link.

A reusable URL that creates one invoice per payer: a fixed price, or an amount the payer chooses (optionally between min_amount and max_amount). Share url together with your publishable key ({url}&key=cp_…_pk_…). Requires an Idempotency-Key.

Authentication: Secret key

Parameters

ParameterInTypeDescription
Idempotency-Keyrequiredheaderstring

Unique per logical operation; retries with the same key are safe.

Request body

application/json

CreatePaymentLinkRequest

FieldTypeDescription
amount_typeAmountType or null
currencyrequiredstring

ISO 4217 code.

  • Example: "USD"
amountstring or null

The price (fixed), as a decimal string.

  • Example: "25.00"
min_amountstring or null

Lower bound for payer_chosen amounts.

max_amountstring or null

Upper bound for payer_chosen amounts.

descriptionstring or null

Shown to the payer. At most 500 characters.

assetsarray of string or null

Accepted assets. Omit to use the merchant's defaults at the time each invoice is created.

quantity_limitinteger (int32) or null

1 to 1,000,000 payments; omit for unlimited.

  • Minimum: 0
expires_atstring (date-time) or null

RFC 3339; must be in the future.

metadatamap of string or null

Up to 20 pairs; keys at most 40 characters, values at most 500. Copied to every invoice.

activeboolean or null

Default true.

Responses

StatusDescriptionBody
201

Created

PaymentLink application/json
400

Invalid request

ErrorResponse application/json
409

Idempotency-Key reused or in flight

ErrorResponse application/json

Retrieve a payment link.

Authentication: Secret key

ParameterInTypeDescription
idrequiredpathstring

Payment link id (plink_…)

StatusDescriptionBody
200
PaymentLink application/json
404
ErrorResponse application/json

POST /v1/payment_links/{id}

Update a payment link.

Omitted fields are unchanged; null clears an optional one. active: false deactivates the link: payers can no longer create invoices from it, and invoices already created are unaffected. Changes apply to invoices created afterwards. Requires an Idempotency-Key.

Authentication: Secret key

Parameters

ParameterInTypeDescription
idrequiredpathstring

Payment link id (plink_…)

Idempotency-Keyrequiredheaderstring

Unique per request

Request body

application/json

UpdatePaymentLinkRequest

FieldTypeDescription
activeboolean or null

false deactivates the link: no new invoices; existing ones are unaffected.

amount_typeAmountType or null
currencystring or null
amountstring or null
min_amountstring or null
max_amountstring or null
descriptionstring or null
assetsarray of string or null

null = the merchant's defaults.

quantity_limitinteger (int32) or null

null = unlimited.

  • Minimum: 0
expires_atstring (date-time) or null

null = never expires.

metadatamap of string or null

Replaces the metadata.

Responses

StatusDescriptionBody
200
PaymentLink application/json
400
ErrorResponse application/json
404
ErrorResponse application/json