Happy path
- Call
POST /v2/checkout-linkswith your API key. - Send either
products[](referenced by your ownexternal_id) or a value-onlyamount. - Pagou upserts each product by
external_id, builds the link, and attaches the account’s active payment methods plus any eligible order bump / upsell automatically. - Use the returned
data.url— it already carries your custom domain when one is active.
Authentication
Send your secret API key as a Bearer token (same key used for transactions):x-api-key: YOUR_API_KEY header is also accepted.
Products by external_id (upsert)
Each item inproducts[] is keyed by external_id — your own identifier for the product. Pagou
upserts that identifier within the authenticated account on every call:
- First time: creates the product in your catalog (
origin = api). - Next times: reuses the same product and updates its name/price/fields from the payload (reviving it if it was archived). It never duplicates.
external_id is the only product identifier your integration needs to send.
Prices are integers in cents (
7990 = R$ 79.90). Re-sending the same external_id overwrites
the product’s name, price, description and image from the payload, so always send the full product
state you want.Example request — products
Value-only link
Omitproducts and send amount (in cents) to generate a quick, value-only link. title is
optional — when absent it is auto-generated.
products or amount — not both, and not neither.
Example response
Request fields
Common error
Status422 — neither amount nor products was provided (or both were):
Use with AI
Paste this into Claude Code, Cursor, Codex, Copilot, Lovable, Bolt, or any AI coding agent:Notes
- Payment methods come from the account’s enabled methods — you don’t pass them.
- Order bumps and upsells eligible for the products are attached automatically.
- Custom domain is applied to the returned URL when the account has one active.
- Out of scope (v1): product variants by
external_id, subscriptions/recurring, and updating or listing links via the API.

