Create a Dynamic QR Code
The POST /v3/funding_details/pix/dynamic-qr-code method enables you to generate a new dynamic QR code in response to a consumer's request.
You generate the QR code providing your Pix key and your payer's tax ID. You then send the QR code to your payer, who will use it to complete a payment.
To create a code, make an HTTP call to the following endpoint using the indicated body parameters:
POST https://api-stage.bitso.com/v3/funding_details/pix/dynamic-qr-code
Request Body Parameters
| Parameter Name | Description | Type | Required / Optional |
|---|---|---|---|
amount | The amount to be received in BRL. This positive number represents the monetary amount to be credited to the Bitso account (payee). | string (number) | Required |
payer | Contains the data of the consumer sending the payment. See the table below for its description. | object | Required |
pix_key | The address key of the payee's account or wallet. | string | Required |
The payer object includes the following parameters:
| Parameter Name | Description | Type | Required / Optional |
|---|---|---|---|
name | The payer's full legal name. | string | Required |
tax_id | Their personal or business taxpayer ID. In Brazil they are named CPF or CNPJ. | string | Required |
The following JSON object exemplifies the request body for generating a dynamic QR code:
{
"payer": {
"name": "João Pereira da Silva",
"tax_id": "56782756820"
},
"amount": "150.00",
"pix_key": "81382556917"
}A successful call returns a JSON object that represents a dynamic QR code and its associated payment data:
{
"success": true,
"payload": {
"fid": "037c4c00e17c592fc7b6d9bad2261be8",
"payer": {
"name": "João Pereira da Silva",
"tax_id": "56782756820"
},
"amount": "150.00",
"expires_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"qr_code_payload": "string"
}
}An unsuccessful call returns a JSON object that includes the error object:
{
"success": false,
"error": {
"code": "1101",
"message": "We couldn't process your sending request. Try again in a few minutes."
}Response Body Parameters
| Parameter Name | Description | Type |
|---|---|---|
error | Contains error details when the call fails. See the table below for its description. | object |
payload | Contains the payment and QR code data. See the table below for its description. | object |
success | Flag that indicates whether the call was successful. | Boolean |
The error object contains the following parameters:
| Parameter Name | Description | Type |
|---|---|---|
code | The error code | string |
message | An explanation of the error | string |
The payload object includes the following:
| Parameter Name | Description | Type |
|---|---|---|
amount | The amount to be received in BRL. | string |
created_at | The date and time when the QR code was issued in ISO 8601 format. | string (timestamp) |
expires_at | The date and time when the QR code will expire in ISO 8601 format. The code's lifetime is 30 minutes from creation time. | string (timestamp) |
fid | The payment's unique, system-generated identifier. This ID is useful for correlating the payment with the transaction notifications delivered by the webhook. It's also the path parameter used when retrieving a QR code pay-in. | string |
payer | Contains the data of the consumer sending the payment. See its description table in the Request Body Parameters section. | object |
qr_code_payload | The string representation of the QR code. | string |
Updated 8 months ago
