Charge with Static Qr Code
The Static QR Code contains fixed information that doesn't change with time, maintaining the same data since its creation.
Use Cases
- Payments in physical establishments: enterprises can generate static QR codes using Pix and show them in their establishments. Allowing the clients to scan the QR Code directly in their chosen payment app. This speeds up the payment process and eliminates the need to use PoS'.
- Donations: Charities and non-profit organizations can make use of the Pix Static QR Code to receive donations quickly and conveniently. People interested in contributing can scan the code and make payments directly from their mobile devices.
Requisistion
POST 'https://apisandbox.delbank.com.br/baas/api/v2/pix/qrcode/static'
curl --location 'https://apisandbox.delbank.com.br/baas/api/v2/pix/qrcode/static' \
--header 'Content-Type: application/json' \
--header 'x-delbank-api-key: ${apiKey}' \
--data '{
"type": "PIX_STATIC",
"correlationId": "2f908499-685c-4e36-af04-30567dc08dc5",
"description": "pix estático com valor",
"amount": 9.99,
"additionalInformation": "Testando qrcode"
}'
Headers
Name | Description |
---|---|
x-delbank-api-key | Required. API key |
idempotencyKey | Required GUID |
Body
Nome | Tipo | Descrição |
---|---|---|
correlationId | string | Required. Correlation IDs are for conciliation with the client system . This value will be returned to the integration through a webhook and can be used to consult on charges and payments. |
description | string | Internal charge description |
amount | number | Charge value. If not informed, it means that the payer client can inform what value you wish to pay. |
pixKey | string | If you want to use a specific Pix key |
additionalInformation | string | Information that will be show to the payer client . Max length: 64 characters. |
Example
The easiet way to generate a Static QR Code is the following:
// example request I
{
"correlationId": "{{$guid}}",
"description": "static pix without value"
}
Beyond the information that's written above, it's possible to send a TEXT which will be presented to the payer client
. Another important piece of information that is feasible to provide is the amount
, and if this is not provided, it indicates that the paying customer
can inform the amount they wish to pay (used frequently in donation scenarios).
// example request II
{
"correlationId": "{{$guid}}",
"description": "static pix with amount",
"amount": 9.99,
"additionalInformation": "Testing QR Code"
}
It is possible to generate the QR code with an image and/or enter a specific Pix key:
// example request III
{
"pixKey": "5b0ac9a4-fad6-43f9-be70-6d7c9a2fad26",
"correlationId": "{{$guid}}",
"description": "pix estático sem valor",
"amount": 9.99,
"additionalInfo": "Testando qrcode",
"formatResponse": "PAYLOAD_AND_QRCODE"
}
Response
The status code 200
will imply that the transaction has succeeded
Being successful, the return will have the following fields as Json:
Name | Type | Description |
---|---|---|
transactionId | string | The QR code Id |
correlationId | string | Correlation Id. |
amount | number | Charge Value (only if set) |
pixKey | string | The Pix key used |
beneficiaryName | string | The receiver's name |
address | object | Object containing the address information |
additionalInfo | string | Information that will be showed to the payer |
createdAt | DATETIME | Date and time the QR code was created |
payloadPix | string | The payload used to pay the QR code |
base64Image | string | base64 image of the QR code |
{
"transactionId": "vchargeffeeed94cdbc41",
"correlationId": "6f388279-0658-4bfa-80e5-e5c405cdb318",
"amount": 9.99,
"pixKey": "5b0ac9a4-fad6-43f9-be70-6d7c9a2fad26",
"beneficiaryName": "DELBANK",
"address": {
"cityName": "ARACAJU",
"zipCode": "49000000",
"uf": "SE",
"state": "SE",
"street": "LOGRADOURO"
},
"additionalInfo": "testing qrcode",
"createdAt": "2024-12-10T11:51:55.306Z",
"payloadPix": "00026540014br.gov.bcb.pix0114+55119999757340214testing qrcode52040000530398654049.995802BR5907DELBANK6007ARACAJU62250521vchargeffeeed94cdbc41630494CD",
"base64Image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAA=="
}