Generate a dynamic PIX QR Code (copy and paste) with a single endpoint. Send only the essential fields for a simplified, immediate QR Code, or send the full set of fields (debtor, due date, expiration, and fine) to create a charge QR Code similar to a boleto. Both modes use the same endpoint.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Overview
This is the single endpoint used to generate a dynamic PIX QR Code (also returned as a "copy and paste" string). There is only one endpoint — you control the type of QR Code that is generated simply by which fields you send in the request body.
There are two ways to use it:
- Simplified QR Code — Send only the essential fields (
amount, source account, andexpiration_date). This creates an immediate dynamic QR Code with no due date or fines. Ideal for quick payments, e-commerce checkouts, and POS scenarios. - Full / Charge QR Code — Send the complete set of fields, including debtor information,
due_date,expiration_date, and fine configuration. This creates a charge dynamic QR Code (similar to a boleto) with due dates and late-payment fines. Ideal for invoices, subscriptions, and formal billing.
One endpoint, two modesYou do not need to call a different URL for each mode. The behavior is decided by the fields you include. If you send fine and date fields, you get a charge QR Code; if you omit them and use
type_fine: "NONE", you get a simplified immediate QR Code.
Endpoint
POST /v2/finance/create-pix-copy-and-paste
Headers
| Parameter | Type | Description | Example |
|---|---|---|---|
| Authorization | String | Bearer + Access_token | Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzEzMzAwOTMxLCJpYXQiOjE3MTMyOTczMzEsImp0aSI6Ijc2ZWI4ZTE5ZjM4YjQ4NmZiODdmNzNjNTdkMWVmNDJhIiwidXNlcl9pZCI6MjQ2fQ.5zekMa7CUj9p-MvNHns5ke4ZPhYV3Y1CLOsYL7hDUUo |
| hmac | String | HMAC (Hash-based Message Authentication Code) is an authentication algorithm that combines a private key with a message to create a Message Authentication Code (MAC). | hmac: 57373705c83bc5efe41001790c54642e670088c0c87d56bc8f990f2260c7740b99f4081ff231b87f82118c1e77a959e1f40eacf690a8fa61a827a9ba01d546f6 |
Body Details
The table below lists every field accepted by the endpoint. The "Required" column shows when each field is needed depending on the type of QR Code you want to generate.
| Parameter | Type | Description | Simplified QR Code | Full / Charge QR Code |
|---|---|---|---|---|
| amount | Float | Payment amount to be received. Must be greater than 0. | required | required |
| type_fine | String | Fine type: NONE (no fine), VALUE (fixed amount), or PERCENT (percentage of amount). | required (NONE) | required (VALUE/PERCENT) |
| source_account_branch_identifier | String | Branch/agency number of the account that will receive the payment. | required | required |
| source_account_number | String | Account number that will receive the payment. | required | required |
| expiration_date | DateTime | QR Code expiration date. Format: YYYY-MM-DDTHH:MM:SS. Must be a future date. | required | required |
| fine | Float | Fine amount (if VALUE) or percentage (if PERCENT). Must be greater than 0. | not used | required |
| due_date | DateTime | Payment due date. Format: YYYY-MM-DDTHH:MM:SS. Must be a future date. | not used | required |
| fine_date | DateTime | Date when the fine starts applying. Format: YYYY-MM-DDTHH:MM:SS. Must be after due_date. | not used | required |
| debtor_document | String | Debtor's CPF (11 digits) or CNPJ (14 digits). Can include formatting. | optional | required |
| debtor_name | String | Debtor's full name or company name. | optional | required |
| type_document | String | Type of debtor's document: CPF or CNPJ. | optional | required |
| tag | String | Optional custom tag or reference for the QR Code (e.g., order number, invoice ID). | optional | optional |
Mode 1 — Simplified QR Code (minimal fields)
Use this mode when you just need to receive a payment quickly and do not need billing rules. Set type_fine to NONE and omit the due date, fine, and fine date. Debtor information is optional.
Request Body
{
"amount": 100.50,
"type_fine": "NONE",
"source_account_branch_identifier": "0001",
"source_account_number": "12345678-9",
"expiration_date": "2026-04-30T23:59:59",
"tag": "Order #12345"
}Request Example — minimal required fields
POST /v2/finance/create-pix-copy-and-paste
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
hmac: 57373705c83bc5efe41001790c54642e670088c0c87d56bc8f990f2260c7740b...
Content-Type: application/json
{
"amount": 100.00,
"type_fine": "NONE",
"source_account_branch_identifier": "0001",
"source_account_number": "12345678-9",
"expiration_date": "2026-05-01T23:59:59"
}Request Example — with optional debtor information
POST /v2/finance/create-pix-copy-and-paste
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
hmac: 57373705c83bc5efe41001790c54642e670088c0c87d56bc8f990f2260c7740b...
Content-Type: application/json
{
"amount": 150.00,
"type_fine": "NONE",
"source_account_branch_identifier": "0001",
"source_account_number": "12345678-9",
"expiration_date": "2026-04-30T23:59:59",
"debtor_document": "12345678900",
"debtor_name": "João da Silva",
"type_document": "CPF",
"tag": "Order #12345"
}Mode 2 — Full / Charge QR Code (all recommended fields)
Use this mode for invoices and formal billing. Send debtor information, a due_date, an expiration_date, and the fine configuration (type_fine, fine, fine_date). This generates a charge dynamic QR Code similar to a boleto.
Request Body
{
"amount": 250.00,
"type_fine": "VALUE",
"fine": 10.00,
"due_date": "2026-04-25T23:59:59",
"expiration_date": "2026-05-10T23:59:59",
"fine_date": "2026-04-26T23:59:59",
"source_account_branch_identifier": "0001",
"source_account_number": "12345678-9",
"debtor_document": "12345678000190",
"debtor_name": "Empresa XYZ Ltda",
"type_document": "CNPJ",
"tag": "Invoice #INV-2024-789"
}Request Example — fixed fine (VALUE)
POST /v2/finance/create-pix-copy-and-paste
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
hmac: 57373705c83bc5efe41001790c54642e670088c0c87d56bc8f990f2260c7740b...
Content-Type: application/json
{
"amount": 500.00,
"type_fine": "VALUE",
"fine": 25.00,
"due_date": "2026-04-30T23:59:59",
"expiration_date": "2026-05-15T23:59:59",
"fine_date": "2026-05-01T23:59:59",
"source_account_branch_identifier": "0001",
"source_account_number": "12345678-9",
"debtor_document": "12345678900",
"debtor_name": "Maria Santos",
"type_document": "CPF",
"tag": "Invoice #4567"
}Fine Types
| Value | Description | Example |
|---|---|---|
| NONE | No fine. Used for simplified, immediate QR Codes. | "type_fine": "NONE" |
| VALUE | Fixed value fine added after fine_date (e.g., R$ 10.00). | "type_fine": "VALUE", "fine": 10.00 |
| PERCENT | Percentage fine of amount after fine_date (e.g., 2%). | "type_fine": "PERCENT", "fine": 2.0 |
Response
Both modes return the same response structure. Fields that only apply to charge QR Codes (such as due_date, fine, and fine_date) are returned as null when you generate a simplified QR Code.
{
"worked": true,
"pix_copy_and_paste": "00020126580014br.gov.bcb.pix01361234567890123456789012345678901234520400005303986540525.005802BR5925Example Company Name6014CIDADE EXEMPLO62070503***63045ABC",
"qr_code_id": 98766,
"debtor_name": "Empresa XYZ Ltda",
"debtor_document": "12345678000190",
"type_document": "CNPJ",
"debtor_institution": null,
"debtor_institution_number": null,
"expiration_date": "2026-05-10T23:59:59",
"due_date": "2026-04-25T23:59:59",
"amount_chargeback": null,
"amount": 250.00,
"fee": 0.00,
"type_fine": "VALUE",
"fine": 10.00,
"fine_date": "2026-04-26T23:59:59",
"status": "NEW",
"base_64_image": "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAIAAAD2HxkiAAAA...",
"base_64_image_url": "https://s3.amazonaws.com/qrcodes/1234567890-abc-def-ghi-123456789.png",
"account_number": "12345678-9",
"agency_number": "0001",
"endToEndId": "",
"payment_date": null,
"tax": null,
"tx_id": null,
"tag": "Invoice #INV-2024-789"
}| Field | Type | Description |
|---|---|---|
| worked | Boolean | Always true for successful requests. |
| pix_copy_and_paste | String | PIX QR Code in EMV format (copy and paste string). |
| qr_code_id | Integer | QR Code ID for tracking and management. |
| debtor_name | String | Name of the payer (null if not provided on a simplified QR Code). |
| debtor_document | String | CPF or CNPJ of the payer (null if not provided on a simplified QR Code). |
| type_document | String | Type of debtor document, CPF or CNPJ (null if not provided). |
| expiration_date | DateTime | QR Code expiration date. |
| due_date | DateTime | Payment due date (null for simplified QR Codes). |
| amount | Float | Payment amount to be received. |
| type_fine | String | Fine type (NONE, VALUE, or PERCENT). |
| fine | Float | Fine amount or percentage (null for simplified QR Codes). |
| fine_date | DateTime | Date when the fine starts applying (null for simplified QR Codes). |
| status | String | QR Code status (NEW, PAID, EXPIRED, etc.). |
| base_64_image | String | QR Code image in base64 format, ready for direct HTML embedding. |
| base_64_image_url | String | URL to download the QR Code image (PNG). |
| account_number | String | Recipient account number. |
| agency_number | String | Recipient branch/agency number. |
| tag | String | Custom tag provided in the request (null if not provided). |
Error Responses
| HTTP Code | Error Message | Description |
|---|---|---|
| 400 | Invalid amount | The amount provided is invalid or less than or equal to 0. |
| 400 | Invalid dates | Date validation failed. Check due_date, expiration_date, and fine_date requirements. |
| 400 | Invalid expiration date | The expiration date is in the past or has an invalid format. |
| 400 | Invalid fine configuration | Fine type or fine value is invalid. |
| 400 | Account not found | The source account was not found or is not active. |
| 400 | No PIX key registered | The account does not have any PIX keys registered. |
| 401 | Unauthorized | Invalid or missing authentication token. Ensure you are sending a valid Bearer token and HMAC signature. |
| 422 | Validation error | Request validation failed. Check that all required fields are present and in the correct format. |
Business Rules
Choosing the mode:
| Use the Simplified QR Code when… | Use the Full / Charge QR Code when… |
|---|---|
| You need a quick payment | You are issuing an invoice |
| No billing rules are required | You need due dates and fines |
| E-commerce / POS scenarios | Formal business transactions |
| Short expiration times | Replacing boletos |
| Informal payments | Long-term payment windows |
Date Validation Rules (Full / Charge QR Code):
- All dates must use the format
YYYY-MM-DDTHH:MM:SS. - All dates must be future dates (cannot be in the past).
expiration_datemust be at least 1 day afterdue_date.fine_datemust be at least 1 day afterdue_date.- Typical ordering:
due_date<fine_date<expiration_date.
Payment Timeline Example (Full / Charge QR Code):
Due Date: April 25
Fine Date: April 26
Expiration: May 10
Payment on April 24: No fine
Payment on April 25: No fine
Payment on April 26 or later: Fine applied
Payment after May 10: QR Code expired, cannot pay
General Validations:
amountmust be greater than 0.expiration_datemust be a future date in the formatYYYY-MM-DDTHH:MM:SS.- The account must exist and have at least one PIX key registered.
- You must have access to the account.
- The amount must not exceed account/global limits.
Debtor Information:
- Simplified QR Code: optional. Can be provided for tracking only and is not enforced during payment.
- Full / Charge QR Code: required. Used for validation and tracking, and may be used by banks for fraud prevention. Document validation includes check-digit verification.
QR Code Image:
base_64_image: complete base64 string for direct HTML embedding.base_64_image_url: S3 URL for downloading the PNG image.- Image format: PNG, suitable for display on web or mobile.
- Images are stored for the lifetime of the QR Code.
400Bad request - Invalid parameters
401Unauthorized - Invalid or missing authentication
500Internal server error
