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 company’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. On
every call Pagou upserts by (company, external_id):
- 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 identifier you pass.
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
| Field | Type | Required | Notes |
|---|---|---|---|
currency | string | no | Link currency. Default BRL. |
title | string | no | Auto-generated when omitted. |
amount | integer (cents) | one of | Value-only link. Mutually exclusive with products. |
products[] | array | one of | Product-based link. Mutually exclusive with amount. |
products[].external_id | string | yes | Your identifier; upsert key. |
products[].name | string | yes | Product name. |
products[].price | integer (cents) | yes | Unit price. |
products[].quantity | integer | no | Default 1. |
products[].currency | string | no | Inherits the link currency. |
products[].type | string | no | physical or digital. Default physical. |
products[].description | string | no | |
products[].image_url | string (url) | no | |
products[].compare_price | integer (cents) | no | ”From” price for a discount display. |
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 are always derived from the company’s active permissions — 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 company has one active.
- Out of scope (v1): product variants by
external_id, subscriptions/recurring, and updating or listing links via the API.

