Skip to main content
PATCH
Switch a payment link off or on, set when it stops selling, or let one customer buy it twice

Authorizations

Authorization
string
header
required

Use a Bouclay secret key (sk_test_..., sk_live_...) or restricted key (rk_test_..., rk_live_...).

A secret key can call every endpoint. A restricted key can only call the endpoints its scopes cover. A scope is {resource}:{access}, for example customers:read or refunds:write, and write includes read. GET requests need read access and everything else needs write, except POST /subscriptions/{id}/items/{item}/preview, which only needs subscriptions:read. A request outside the key's scopes gets 403 permission_denied naming the missing scope, and its Idempotency-Key is not used up.

Publishable keys (pk_...) are rejected by server-side API endpoints. A key's mode scopes what it can see and charge: a test key can never reach a live card.

Headers

Idempotency-Key
string
required

Required for POST and PATCH requests. Replays identical method + path + body requests and rejects mismatched re-use.

Required string length: 1 - 255

Path Parameters

Body

application/json
active
boolean

Off, the link takes no payment and its page says it is no longer active. On by default.

expiresAt
string<date-time> | null

When the link stops selling, as if switched off. Null sells until switched off.

allowMultiplePerCustomer
boolean
default:false

Off (the default), a subscription link refuses an email that already has a subscription to its plan that is trialing, active, past due or paused, and tells the buyer to manage it from their billing portal. On, the same person can buy it again (gifts, family members). One-time links always sell again.

Response

Payment link response.

data
object
required
meta
object
required