Generate Billing Checkout
This endpoint generates a link to a billing page. To do so, a call to the API must be made, as specified below:
Making Request
The call must be made using the POST method.
URL
/v1/pix/checkout
HTTP Request Body
{
"value_cents": 10001 ,
"generator_name": "John Doe" ,
"generator_document": "12345678900",
"expiration_time": "1800",
"external_link": "johndoepage.com"
}
Attribute description
| ATTRIBUTES | DESCRIPTION | TYPE |
|---|---|---|
| value_cents (Required) | Value, in cents, of the charge | INTEGER greater than 0 |
| generator_name (Required) | QRcode generator username. It will be used to register the charge. | STRING 100 character limit |
| generator_document (Required) | Document (CPF/CNPJ) of the user who generated the qrcode. It will be used to register the charge. Required if the generator_name attribute is provided. | STRING 14 character limit Numbers only |
| expiration_time (Optional) | Expiration time of the QRCode generated for billing, in seconds | INTEGER greater than 0 If not provided, default: 1800 |
| external_link (Required) | Partner's web address, to which the user can return. | STRING 255 character limit |
Success
After the call, a JSON is returned with the status 201 - Created if the procedure was successful.
HTTP 201 Response Body - Exemplo
{
"qrcode_checkout": {
"payment_link": "https://checkout.zendry.com.br/pix_charge/6058042c-53d9-412c-9bbe-41032a8acc99",
"request_id": "6058042c-53d9-412c-9bbe-41032a8acc99",
"reference_code": "ZENDRYTESTPIXQRCODE734"
}
}
Attribute Description
| PARAMETER | DESCRIPTION | TYPE |
|---|---|---|
| qrcode_checkout (Required) | Registered qr code checkout data object. | OBJECT |
| qrcode_checkout.payment_link (Required) | QR Code payment page link. | STRING 255 character limit |
| qrcode_checkout.request_id (Required) | Identifies the payment link code. It is the checkout identifier in the generated link | STRING 255 character limit |
| qrcode_checkout.reference_code (Required) | Unique QRCode identifier. | STRING 100 character limit |
Errors
In case of errors, a json will be returned with the error attribute specifying the reason for the operation being invalidated.
HTTP 400 Response Body - Example
{
"error": "generator_document not_a_number | generator_document required | generator_name required"
}
HTTP 403 Response Body - Example
{
"error": "Generator not allowed"
}
HTTP 500 Response Body - Example
{
"error": "Operation failed! Please try again or contact our support team"
}