Create a Static QR Code
The POST /v3/funding_details/pix/static-qr-code method enables you to generate a new static QR code in response to a consumer's request.
You generate the QR code providing your Pix key, the amount, and an identifier you select. 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/static-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 |
identifier | A user defined ID. | string | Required |
pix_key_id | The address key of the payee's account or wallet. | string | Required |
The following JSON object exemplifies the request body for generating a static QR code:
{
"pix_key_id" : "[email protected]",
"amount" : "50.00",
"identifier" : "593asd"
}A successful call returns a JSON object that represents a static QR code and its associated payment data:
{
"success": true,
"payload": {
"name": "John Doe",
"pix_key_id": "[email protected]",
"qr_code_value": "00020126580014BR.GOV.BCB.PIX0136daniel.oliveira+claimtest2@bitso.com520400005303986540550.005802BR5922John Doe6009Sao Paulo62100506asdasd6304CA49",
"amount": "50.00"
}
}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. This positive number represents the monetary amount to be credited to the Bitso account (payee). | string |
name | The name of the user who generates the static QR code. | string |
pix_key_id | The address key of the payee's account or wallet. | string |
qr_code_value | The string value of the generated static QR code. The payer can copy and paste it. | string |
Updated 8 months ago
