/chargesCreate PIX charge
Creates an immediate PIX charge and returns the EMV code in copy_paste. Use that field for the QR Code and copy-paste — the same value the panel payment link shows. nome_pagador is optional. notification_url is required when the account has no registered webhook.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| amount | body | number | Yes | Amount in BRL (reais), not cents. Example: 19.90 = R$ 19.90. Must be greater than zero. |
| description | body | string | Yes | Description shown on the charge. |
| nome_pagador | body | string | No | Payer name (max. 191 characters). Also accepted as pagador.nome. |
| pagador | body | object | No | Optional payer data: nome, cpf, cep, rua, numero, complemento, bairro, cidade, estado. |
| notification_url | body | string | No | HTTPS URL that also receives the POST for this charge. Also accepted as url_notification. Required when the account has no registered webhook. Optional when a webhook already exists: both receive the same event. Max 500 characters. Internal addresses are rejected. |
Request example
{
"amount": 19.9,
"description": "Pedido 1024",
"nome_pagador": "Maria Silva"
}Responses
200 — Charge created.
{
"id": 123,
"txid": "...",
"status": "ATIVA",
"copy_paste": "...",
"qrCode": "",
"amount": 19.9,
"description": "Pedido 1024",
"nome_pagador": "Maria Silva",
"saldo_liquido": 19.3,
"taxa_matriz": 3,
"taxa_matriz_fixa": 0,
"taxa_matriz_minima": 0,
"retencao_matriz": 0.6,
"saldo_liquido_matriz": 19.3
}400 — Invalid JSON, amount, description or notification_url.
{
"error": "Informe um amount válido."
}401 — Invalid credentials.
{
"error": "Credenciais inválidas."
}403 — KYC not approved.
{
"error": "KYC não aprovado."
}- copy_paste is the PIX EMV (copy-and-paste) code. Use ONLY it for the QR Code and the copy button. Do not use id or txid, and do not look for qr_code / qr_code_image — the 123pag API does not return a QR image.
- Build the QR by encoding the full copy_paste string, without truncating, stripping characters, or changing spaces. Example: https://api.qrserver.com/v1/create-qr-code/?size=240x240&data= + URL-encode(copy_paste).
- amount is in reais (e.g. 19.90), never in cents. The same rule applies for every underlying provider (Monetarie, Magen, etc.).
- This is the same flow as the payment link: 123pag creates the PIX at the provider and returns copy_paste; the link checkout only displays that value.
- saldo_liquido already includes the account fee deduction.
- Franchise responses also include taxa_franquia*, retencao_franquia and saldo_liquido_franquia.
- status: ATIVA, CONCLUIDA, EXPIRADA, CANCELADA or ESTORNADA.
- notification_url is required when the account has no registered webhook. When a webhook exists, the field is optional and adds one more destination without replacing the account URLs.