Endpoint
Authentication
| Header | Required | Value |
|---|---|---|
X-API-Key | Yes | Your API key (bun_...) |
Content-Type | Yes | application/json |
Overview
Generate valid PIX Copia e Cola strings and scannable QR codes for the Brazilian instant payment system. Provide a PIX key, beneficiary name, city, and optional amount to receive a fully compliant payload and a base64-encoded QR code image ready to embed in your checkout, invoice, or receipt.Use cases
- Embed a PIX QR code in e-commerce checkout pages for instant payment
- Generate donation form links for nonprofits and campaigns
- Automate invoice generation with unique transaction IDs
- Enable peer-to-peer payment flows in fintech applications
Request body
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes | PIX key: phone number, CPF, email, or EVP (random key) |
name | string | Yes | Beneficiary name (max 25 characters) |
city | string | Yes | Beneficiary city (max 15 characters) |
amount | number | No | Payment amount in BRL. Omit for open-value transactions |
description | string | No | Transaction description (max 72 characters) |
txid | string | No | Transaction ID for reconciliation |
Example
Response
200 OK
| Field | Type | Description |
|---|---|---|
payload | string | PIX Copia e Cola string (EMV format) |
qr_base64 | string | Base64-encoded PNG QR code image |
mime_type | string | MIME type of the QR code image |
key | string | PIX key used |
name | string | Beneficiary name |
city | string | Beneficiary city |
amount | number | Amount in BRL, if provided |

