Generate Billing QRCode
The Pix receipts API was implemented so that the partner could manage charges using the Pix tool, generating QrCodes and querying them later to view the payment details. Once a charge is flagged as paid, the API sends a message to notify the partner through a previously registered Webhook. More details can be found in the Webhooks section of this document.
Generate Billing QrCode
This endpoint generates a Pix payment QRCode. To do so, call the API, as specified below:
Making Request
The call must be sent using POST method.
POST/v1/pix/qrcodes{
"value_cents": 10001 ,
"generator_name": "string" ,
"generator_document": "string",
"expiration_time": "string",
"external_reference": "string",
"platform_name": "string",
"billing_url": "string",
"return_url": "string",
}
Description of Attributes
| ATTRIBUTE | DESCRIPTION | TYPE |
|---|---|---|
| value_cents (Required) | Charge value, in cents (R$) | INTEGER Greater than 0 |
| generator_name (Optional) | QRcode generator name. It will be used to register the charge. | STRING 100 characters limit |
| generator_document (Optional) | Document (CPF/CNPJ) of the qrcode generator user. It will be used to register the charge. Required if the generator_name attribute is informed | STRING 14 characters limit Only numbers |
| expiartion_time (Optional) | Expiration time of the billing generated QRCode, in seconds | INTEGER Greater than 0 |
| external_reference (Optional) | Value informed by the partner as the identification of the generated qrcode. | STRING 255 character limit |
| platform_name (Optional) | Name of the platform that is generating the qrcode. | STRING 100 characters limit |
| billing_url (Optional) | URL to redirect the user to the custom billing page. | STRING 255 characters limit |
| return_url (Optional) | URL to receive notifications about the qrcode status changes. | STRING 255 characters limit |
Success
After the call, a JSON with the 201 status - Created is returned if the procedure was successful.
{
"qrcode": {
"reference_code": "ZENDRYTESTPIXQRCODE6",
"external_reference": "Teste2",
"content": "00000000000000000000br.gov.bcb.pix012345678900-1234-1234-1234-12345678901234567890123456789000.012345BR5925Zendry Solucoes em Paga6009SAO PAULO62230519ZENDRYPIXQRCODETESTE00000",
"image_base64": null
}
}
Description of Attributes
| PARAMETER | DESCRIPTION | TYPE |
|---|---|---|
| pix_qrcode (Required) | Registered qrcode data object. | OBJECT |
| qrcode.external_reference (Optional) | Value informed by the partner as the identification of the generated qrcode. | STRING 255 character limit |
| pix_qrcode.reference_code (Required) | QRCode unique identifier. | STRING 100 characters limit |
| pix_qrcode.content (Required) | QRCode content. (Copia e cola Pix code) | STRING 255 characters limit |
Notified Events
- The system will send notifications for all available transaction statuses.
- This applies to Checkout, PixQrCode, and Card transactions.
- Any status change (Creation, confirmation, cancellation, etc.) will result in a call to the webhook configured during the transaction's creation.
- The notifications will follow the exact same data pattern already used by the existing webhook, ensuring compatibility and consistency in the integration.
For more details on the notification attributes, please refer to the Webhook Notification for qrcode documentation.
Errors
In case of errors, a json will be returned with the error attribute specifying the reason for the operation being invalidated.
{
"error": "generator_name blank | generator_document invalid | generator_document not_a_number"
}
{
"error": "Generator not allowed"
}
{
"error": "Operation failed! Please try again or contact our support team"
}