Generate Billing QrCode
This endpoint generates a PIX payment QrCode. To do so it must be The call to the API is made, as specified below.
Request
The call must be made using the POST method.
URL
{BaseUrl}/api/v1/pix/qrcode
HTTP Request Body
{
"value": 10000
"generator_name": "John Doe",
"generator_document": "12345678910",
"external_reference": "INVOICE01",
"expiration_time": 1800,
"payer_message": "Pay by due date",
"split_link": "47fu7840-wh47-lq93-f4rf-ls43950qte53"
}
Description of Attributes
ATTRIBUTE | DESCRIPTION | TYPE |
---|---|---|
value (Required) | Value, in reais, of the qrcode. | DOUBLE greater than 0 |
generator_name (Optional) | QRcode generator username. It will be used to register the charge. | STRING 100 character limit |
generator_document (Optional) | Document (CPF/CNPJ) of the user who generated the qrcode. It will be used to register the charge. Mandatory if the generator_name. attribute is provided | STRING 14 character limit Numbers only |
external_reference (Optional) | Identifier provided by the partner for internal control. | STRING 100 character limit |
expiration_time (Optional) | QRcode expiration time in seconds. If not informed, it assumes value 1800 (30 minutes) | INTEGER greater than 0 and less or equal to 3600 |
payer_message (Optional) | Message that will be displayed to the paying user, after he reads the qrcode | STRING 100 character limit |
split_link (Optional) | Code provided by Pay2m so that the generated QR code has, associated with it, the requested split configuration | STRING 36 characters, including letters and numbers |
Response
After the call, a JSON is returned with status 201 - Created if the procedure was successful.
HTTP 201 Response Body
{
"reference_code": "PAY2MPIXQRCODE2",
"content": "00020126580014br.gov.bcb.pix0136123e4567-e12b-12d1-a456-4266554400003549673253039865802BR5913So-and-so6008BRASILIA62070503***63041D3D "
}
Description of Attributes
ATTRIBUTE | DESCRIPTION | TYPE |
---|---|---|
reference_code (Required) | Unique QrCode identifier. | STRING 100 character limit |
content (Required) | NQrCode content. (Copy and paste PIX code) | STRING 255 character limit |
In case of errors, a json will be returned with the error attribute specifying the reason for the error. operation has been rejected.
HTTP 400 Response Body - Example
{
"error": "generator_document not_a_number | generator_document required | generator_name required"
}