API Reference
Log In
API Reference

Charge/Receive with Static QR Code

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

  1. 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'.
  2. 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

NameDescription
x-delbank-api-keyRequired. API key
idempotencyKeyRequired GUID

Body

NomeTipoDescrição
correlationIdstringRequired. 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.
descriptionstringInternal charge description
amountnumberCharge value.
If not informed, it means that the payer client can inform what value you wish to pay.
pixKeystringIf you want to use a specific Pix key
additionalInformationstringInformation 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:

NameTypeDescription
transactionIdstringThe QR code Id
correlationIdstringCorrelation Id.
amountnumberCharge Value (only if set)
pixKeystringThe Pix key used
beneficiaryNamestringThe receiver's name
addressobjectObject containing the address information
additionalInfostringInformation that will be showed to the payer
createdAtDATETIMEDate and time the QR code was created
payloadPixstringThe payload used to pay the QR code
base64Imagestringbase64 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=="
}