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/v1/charges'
curl --location 'https://apisandbox.delbank.com.br/baas/api/v1/charges' \
--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 |
Body
Nome | Tipo | Descrição |
---|---|---|
type | enum | Required. PIX_STATIC |
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. |
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
{
"type": "PIX_STATIC",
"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
{
"type": "PIX_STATIC",
"correlationId": "{{$guid}}",
"description": "static pix with amount",
"amount": 9.99,
"additionalInformation": "Testing QR Code"
}
It's also possible to inform a key
// example request III
{
"type": "PIX_STATIC",
"key": "5b0ac9a4-fad6-43f9-be70-6d7c9a2fad26",
"correlationId": "{{$guid}}",
"description": "static pix with amount",
"amount": 9.99,
"additionalInformation": "testing 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 |
---|---|---|
type | enum | PIX_STATIC |
correlationId | string | Correlation Id. |
description | string | Description about the charge |
amount | number | Charge Value |
additionalInformation | string | Information that will be shown to the payer client |
status | enum | Charge situation. `PENDING `` |
qrCodePayload | string | Copy and Paste QR Code |
qrCodeImageBase64 | string | base64 Qr Code image |
{
"type": "PIX_STATIC",
"correlationId": "448fc70d-5344-4306-9111-02a45497aa91",
"amount": 9.99,
"description": "pix estático com valor",
"status": "Pending",
"updatedAt": "2023-08-21T17:35:26.3175001Z",
"createdAt": "2023-08-21T17:35:26.3175001Z",
"qrCodePayload": "00020126770014br.gov.bcb.pix0136730b627f-2649-426a-834e-3acb8b735f490215Testando qrcode52040000530398654049.995802BR5907BXXDBDE6007ARACAJU62290525charge61647J7GYoGWu8ofDEQ630427FB",
"qrCodeImageBase64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAooAAAKKAQAAAACSD0chAAAGfUlEQVR4nO2ay5HsOgxDWdUBOCSn7pAcgKt42yJA0p63essmtPD4Ix31BgUSGjOMj6/Ld1zmR9x9x3F/29fddt1334tt7uuyJn/vviv8tD9DSCF/Hbnm+/mJ5fFtrdy/dwGKsa0d7r3WlDN/yb3DfuJHCCnkJGRM+ATXQpX3Hfa6t1m6s/UOd9QnaHGBrIUUch7yoLxi5CNBZiXIcjfqWEghByNj1e6JDJuyHJRhDAqS84QUciByrSdyLaKJAUkZls9d9vI+XNyFFHISMtXWqrr/c7E/Q0ghfxzpNZYWD+OEuFCuJdIIIiK8855BgCKkkGOQR+rooDTLv0JtVh/Wruy21q6xQwR/vuxMSCGHIC2cLOu7vY6QaFMRNcSGG/UZTdWGZf2dkEJOQUJbJ6K4UFtL8E7cQYZM8NzjlOkJd28OKaSQv44sI/L8ZwRkdFnzHVufEnI9shh8+ty9RkghhyCNtlaWhH7K3dlKGcVnaXFr+YbMj+qF7Qkp5AgkKr2UIVopS7UZrMtSvTF4Mlv6ZJYn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