chk_) is a reusable billing template. You define it once (items,
price, methods, branding) and share the URL as many times as you want — each buyer visit materializes
an independent CheckoutSession. Ideal for an Instagram bio link,
a landing page, or any mass distribution channel.
The examples use the sandbox: API at
https://checkout-api.sandbox.z2pay.com and checkout page at
https://pay.sandbox.z2pay.com. In production, use https://checkout-api.z2pay.com and
https://pay.z2pay.com. All requests use the x-api-key header — see
Authentication.Endpoints
| Method | Route | Description |
|---|---|---|
POST | /checkout/links | Creates a billing template |
GET | /checkout/links | Lists templates (paginated) |
GET | /checkout/links/{id} | Retrieves a template by ID |
PUT | /checkout/links/{id} | Updates a template |
DELETE | /checkout/links/{id} | Archives (soft-deletes) a template |
The Checkout Link object
Internal name (≤ 255 chars), visible to the seller, not to the buyer. Useful for organizing the
dashboard list.
Internal description (≤ 2000 chars).
URL-friendly identifier. Regex
^[a-z0-9-]+$, 3–100 chars. Reserved for a future friendly URL
feature.Currently only
"payment".ISO 4217 currency code. Currently only
"BRL".Page language:
"pt-BR", "en-US", or "es-ES".Billing items (≥ 1). The sum of
quantity × unitAmount is the total to charge. See
Item.Accepted payment methods. At least one method must be enabled. See
Payment methods.
Multi-seller distribution. The sum of all
percentage values must be exactly 100. See Split.Buyer fields that are required in addition to the always-required ones. See
Required fields.
Custom fields (≤ 20) to collect from the buyer. See Custom fields.
Redirect URL (≤ 2000) after a successful payment.
Redirect URL (≤ 2000) when the buyer cancels.
string → string map with arbitrary seller data (opaque to the server; returned in webhooks).Session validity period from creation, in minutes. Minimum
5, maximum 43200 (30 days).
Default 1440 (24h).Item (CheckoutItem)
Name displayed to the buyer (1–255 chars).
Description shown below the name (≤ 2000 chars).
Image displayed next to the item. Any public HTTPS URL (≤ 2000 chars).
Quantity (integer ≥ 1).
Unit amount in cents (integer ≥ 1). R$ 99.90 =
9990.string → string map with the seller’s internal identifiers (sku, course_id, etc.).Payment methods (paymentMethods)
Card configuration.
card.enabled (boolean) toggles it on/off. card.installments defines
installment options (see below). card.multipleCards (boolean) allows splitting the total between 2 cards.Installments.
maxInstallments (1–12, required), freeInstallments (0–12, default 0, initial
installments with no interest), interestRate (0–100, monthly rate in %, e.g. 2.99), interestType ("simple"
or "compound", default "compound" = Price/Tabela).PIX configuration.
pix.enabled (boolean) toggles it on/off. pix.expiresIn (60–86400) is the QR
code expiration in seconds (60s to 24h).Boleto configuration.
boleto.enabled (boolean) toggles it on/off. boleto.dueDateDays (1–30) is the
number of days until the due date.Combined payment (splitting the total across methods/cards).
enabled (boolean, required),
minAmountPerPayment (cents, default 1), maxPaymentsCount (2–8, default 4).Split
Distributes the received amount among multiple recipients (marketplace, partners, platforms).Recipient ID (
rec_*) that receives the share.Percentage of the total amount (0.01–100). Accepts decimals (e.g.
33.33).Marks the recipient as liable for chargebacks (typically the main seller).
Branding
Primary color in hex. Regex
^#([0-9a-f]{6}|[0-9a-f]{3})$/i, e.g. "#1e3b79" or "#FFF". Derived
colors (hover, text contrast) are calculated automatically.Seller logo displayed in the page header (≤ 2000 chars).
Seller name displayed on the page (≤ 100 chars), when there is no logo or alongside it.
"single-page" or "step-by-step" — controls the checkout layout on mobile.Page favicon, the browser tab icon (≤ 2000 chars).
Required fields
List of buyer fields that will be required in addition to the always-required ones."email", "document", "phone", "address".
email, document, and phone are always required at confirm time, even if you do not
list them here. Listing "address" forces the buyer to fill in their complete address.Custom fields
Allows collecting additional information from the buyer (text, dropdown, checkbox).Internal field identifier. Regex
^[a-z][a-z0-9_]*$/i, ≤ 50 chars.Displayed label. Simple string (
"Company") or a per-language map
({ "pt-BR": "Empresa", "en-US": "Company" })."text", "select", or "checkbox".Required if
type = "select". Accepts strings ("Option 1") or { value, label } objects with a
localizable label.If
true, the buyer must fill in this field.Create a Link
201. Supports idempotency via the Idempotency-Key header
(see Conventions).
201):
The returned
url is the payment link ready to share. Each visit materializes a new
Session.Common errors
| HTTP | Code | When |
|---|---|---|
400 | validation_failed | Malformed body (missing items, non-integer value, etc.) |
400 | no_items | Empty items array |
400 | amount_too_low | Sum of items results in 0 |
400 | invalid_splits_sum | Splits do not add up to 100 |
401 | unauthenticated | x-api-key missing, invalid, or revoked |
409 | slug_taken | A Link with that slug already exists |
409 | idempotency_conflict | Same Idempotency-Key used with a different body |
List Links
Filter by status (CSV). E.g.:
?status=active or ?status=active,archived.Search in
name and description (≤ 255 chars).Page number (≥ 1).
Items per page (1–100).
200):
Get Link by ID
POST response).
200 (found) · 404 (not found).
Update a Link
200. Supports idempotency via Idempotency-Key.
200 (updated) · 404 (not found) · 400 (validation error).
Archive a Link
/c/chk_...) will start returning 404 and new Sessions can no
longer be created from it. Already created Sessions continue to work normally. Returns 200
with the entity containing a populated deletedAt. Supports idempotency.
200):
200 (archived) · 404 (not found).
Example gallery
Ready-to-use payloads forPOST /checkout/links. Open the returned url to preview the result visually.
Card only (simple installments)
Card only (simple installments)
PIX only (expires in 1h)
PIX only (expires in 1h)
Boleto only (due in 5 days)
Boleto only (due in 5 days)
All payment methods
All payment methods
Multiple items
Multiple items
49900 + 4900 + 3 × 15000).Item with image and description
Item with image and description
Branding (color + logo + name)
Branding (color + logo + name)
Locale en-US / es-ES
Locale en-US / es-ES
"locale": "es-ES" for the page in Spanish. The entire page follows the chosen language.Required address (required fields)
Required address (required fields)
Custom fields (text + select + checkbox)
Custom fields (text + select + checkbox)
experience_level.Splits 70/30 (marketplace)
Splits 70/30 (marketplace)
Compound interest installments
Compound interest installments
Success / Cancel URLs
Success / Cancel URLs
successUrl. You can use
{CHECKOUT_SESSION_ID} as a placeholder — we replace it with the cs_* before redirecting.Kitchen-sink (almost all fields)
Kitchen-sink (almost all fields)
See also
Checkout Overview
Concepts, use cases, and endpoint map.
Checkout Sessions
Materialize Sessions from a Link.
Webhooks
checkout.link.* and checkout.session.* events.Errors
Error format and how to handle
400 / 404 / 409.
