Skip to main content
Server-side only. Payment-link functions send your secret key and throw if window exists. Never put an sk_ key in browser code.
A payment link stores a fixed checkout configuration behind a stable id. Build the hosted URL from that id and share it with your customer:
Opening the link mints a fresh checkout session. The link is reusable unless you set singleUse: true.

Functions

All operations are scoped to the secret key’s merchant and environment. The key is sent as Authorization: Bearer, not as x-api-key.

Create fields

amount is required and is a positive integer in destination-token base units. Payment links do not support open amounts. expiresAt, when present, must be a future ISO 8601 timestamp. singleUse defaults to false. The update type is Partial<CreatePaymentLinkRequest>:
These operations have effects beyond changing the returned fields:
  • Single-use is consumed by the first confirmed payment. Opening the link does not consume it. Until a payment is confirmed, it can mint sessions; after confirmation, further redemptions are refused.
  • Editing versions the link. A PATCH cancels every unpaid session minted from the previous version. cancelledSessions tells you how many sessions were canceled, and a payer who opened the old version but has not paid must start again.
  • Revoking is a soft delete. DELETE retains the row, sets revokedAt, cancels unpaid sessions already minted from the link, and never reuses its id. Call it revokePaymentLink in application code even though the wire verb is DELETE.
  • De-allowlisting is permanent. Removing a payout address from the merchant’s allowlist permanently revokes every link that uses it. Adding the address again does not revive those links.
consumedBySessionId identifies the session that consumed a single-use link; it is not payment proof by itself. Check the session status or your dashboard before fulfilling an order.

Options and response

PaymentLink includes the stable id, version, environment, destination (chain, token, recipient), fixed amount, singleUse, metadata, redirects, expiresAt, revokedAt, consumedBySessionId, and creation/update timestamps. PaymentLinkMutation includes all of those fields plus cancelledSessions.