Create checkout
create_checkoutGenerate a Pix checkout with a hosted payment page to collect payments. Specify amount in BRL cents and payer CPF/CNPJ.
Instructions
Create a Pix charge (checkout) with a hosted payment page. Requires scope merchant_write. Amount is BRL cents.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | Amount in BRL cents (R$5.00–R$3000.00). Wire field is `amount`. | |
| metadata | No | Optional arbitrary key/value bag echoed back on reads/webhooks. | |
| image_url | No | Optional image on the hosted payment page. | |
| expires_in | No | QR lifetime in seconds (300–1200, default 1200). | |
| description | No | Description shown to the payer. | |
| amount_cents | No | Alias of `amount` (BRL cents). Provide either `amount` or `amount_cents`. | |
| callback_url | No | Optional per-checkout webhook URL. | |
| redirect_url | No | Optional post-payment redirect URL. | |
| idempotency_key | No | Optional. If omitted, the server generates one. Reuse to safely retry. | |
| payer_tax_number | Yes | Payer CPF/CNPJ (digits). Required in all modes, including sandbox, while the platform tax-number gate is on. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Checkout id (chk_…). | |
| pix | Yes | PIX payload; present while pending. | |
| amount | Yes | Charge amount in BRL cents. | |
| status | Yes | Always `pending` at creation. | |
| is_live | Yes | false when created with sk_test_. | |
| replayed | No | true when the API replayed a prior response for the same Idempotency-Key. | |
| image_url | Yes | ||
| expires_at | Yes | QR expiry timestamp (UTC). | |
| description | Yes | ||
| payment_url | Yes | Hosted payment page URL to hand to the payer. |