API Reference
Log In
API Reference

Dynamic QR Code creation

Charge with Dynamic QR Code (Immediate Payment)

Request

POST 'https://apisandbox.delbank.com.br/baas/api/v2/pix/qrcode/dynamic
curl --location 'https://apisandbox.delbank.com.br/baas/api/v2/pix/qrcode/dynamic/' \
--header 'x-delbank-api-key: PJPyJ2xGmyB9oDHyNIUwNOt1dgpgolBwcE16ybaKD5rYEc8ujLtarBP0nNw2FKdgK+5YJFciFwTdORlZsdaTzjEbKN5ut+Ag4xGy69bbtXJmzkzRDHry9ubYbMW4xFMb' \
--header 'Content-Type: application/json' \
--data '{
    "correlationId": "{{guid}}",
    "amount": 0.10
}'

Headers

NameDescription
x-delbank-api-keyRequired. API key

Request Body

Only the correlationId and the amount are required

NameTypeDescription
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.
amountnumberRequired. Charge value.
formatResponseenumONLY_PAYLOAD is the default value if not directly attributed the PAYLOAD_AND_QRCODE which contains an image with 250x250px resolution.
expiresInnumberLimit for QR Code expiration, with a granularity of seconds, so that payment of the charge can be made, from the date-time of creation or expiration, if applicable. If not informed, the default value is 86400.
payerobjectInfo about the payer client
payer.namestringName of the payer client
payer.documentstringPayer client document (CPF or CNPJ).
payer.validatebooleanFlag indicating that the payer must be validated during the cash process. With this flag enabled, the QR Code can only be paid by this payer.
addressobjectInformation about the address where the transaction occurs.
address.cityNamestringCity name where the transaction occurs.
address.zipCodestringZip code of the location where the transaction occurs (CEP in Brazil).
address.statestringState UF code of the location where the transaction occurs
address.streetstringStreet name where the transaction occurs
address.complementstringAddress complement if needed
additionalInfosobjectObject containing additional information visible to the payer
additionalInfos.namestringName of the additional info or description you want to add
additionalInfos.valuestringThe additional info or description you want to add

Basic example

The easiest way of creating a Dynamic QR Code is the following:

{
    "correlationId": "{{$guid}}",// This value must be a GUID
    "amount": 0.10
}

Beyond the informations above, it's possible to send a expiration time (If not attributed the default value is 86400).

{
    "correlationId": "{{$guid}}",
    "amount": 0.10,
    "expiresIn": 1800,
    "formatResponse": "ONLY_PAYLOAD"
}

Following are some valid payload examples with optional additional information

{
    "correlationId": "{{$guid}}",
    "amount": 0.10,
    "expiresIn": 1800,
    "formatResponse": "ONLY_PAYLOAD",
    "address": {
        "zipcode": "49000000",
        "cityName": "SAO PAULO",
        "state": "SP"
    }
}
{
    "correlationId": "{{$guid}}",
    "amount": 0.10,
    "expiresIn": 1800,
    "formatResponse": "ONLY_PAYLOAD",
    "address": {
        "zipcode": "49000000",
        "cityName": "SAO PAULO",
        "state": "SP"
    },
    "payer": {
        "document": "47779921018",
        "name": "PAYER NAME",
        "validate": true
    }
}
{
    "correlationId": "{{$guid}}",
    "amount": 0.10,
    "pixKey": "+5511999975734",
    "expiresIn": 1800,
    "formatResponse": "PAYLOAD_AND_QRCODE",
    "address": {
        "zipcode": "49000000",
        "cityName": "SAO PAULO",
        "state": "SP"
    },
    "payer": {
        "document": "47779921018",
        "name": "PAYER NAME",
        "validate": true
    },
    "additionalInfos": [
        {
            "name": "INFO 01",
            "value": "INFO VALUE 01"
        }
    ]
}

Response

The status code 200 indicates success in the transaction

Being succeeded, the return will have the following fields in Json format:

NameTypeDescription
correlationIdstringCorrelation Id used for conciliation in the client system
transactionIdstringThe Id of the QR code
amountnumberCharged value
allowChangeAmountbooleanLet the payer change the amount to be paid
expiresInnumberLimit for QR Code expiration, with a granularity of seconds, so that payment of the charge can be made, from the date-time of creation or expiration, if applicable. If not informed, the default value is 86400.
payerobjectInfo about the payer client
payer.namestringName of the payer client
payer.documentstringPayer client document number (CPF or CNPJ).
payer.validatebooleanFlag indicating that the payer must be validated during the cash process. With this flag enabled, the QR Code can only be paid by this payer.
addressobjectInfo about the city where the transaction occurs.
createdAtdatetimeDate and time of creation
updatedAtdatetimeDate and time of last update
expiresAtdatetimeDate and time of expirantion
payloadPixstringPix copia e cola, or, the payload that will be used to pay the QR code
qrCodeImageBase64string250x250 image in base 64 (Verify QR_Code readability)
additionalInfosobjectObject containing additional information visible to the payer
additionalInfos.namestringName of the additional info
additionalInfos.valuestringMessage that should be displayed
{
    "correlationId": "40ede975-031d-4517-bdd4-31472d3f00a4",
    "transactionId": "vchargeffab8b4c963344c283e491f5e",
    "amount": 0.10,
    "allowChangeAmount": false,
    "expiresIn": 1800,
    "status": "ACTIVE",
    "payer": {
        "name": "PAYER NAME",
        "document": "***799210**",
        "validate": true
    },
    "address": {
        "cityName": "SAO PAULO",
        "zipCode": "49000000",
        "uf": "SP",
        "state": "SP",
        "street": "LOGRADOURO"
    },
    "createdAt": "2024-12-10T13:19:26.501Z",
    "updatedAt": "2024-12-10T13:19:26.501Z",
    "expiresAt": "2024-12-10T13:49:26.501Z",
    "payloadPix": "00020101021226820014br.gov.bcb.pix2560pix-h.delbank.com.br/v2/cob/vchargeffab8b4c963344c283e491f5e5204000053039865802BR5907DELBANK6009SAO PAULO62070503***6304CB42",
    "qrCodeImageBase64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6CAYAAACI7Fo9AAAZfElEQVR4Xu3SwY4jORJEwcH+/z/",
    "additionalInfos": [
        {
            "name": "INFO 01",
            "value": "INFO VALUE 01"
        }
    ]
}

Charge with Dynamic QR code with Due Date

A Dynamic QR code with Due Date enables the use of information such as interest, fines and discounts, in addition to the amount to be paid.

Request

POST 'https://apisandbox.delbank.com.br/baas/api/v2/pix/qrcode/due-date
curl --location 'https://apisandbox.delbank.com.br/baas/api/v2/pix/qrcode/due-date' \
--header 'x-delbank-api-key: PJPyJ2xGmyB9oDHyNIUwNOt1dgpgolBwcE16ybaKD5rYEc8ujLtarBP0nNw2FKdgK+5YJFciFwTdORlZsdaTzjEbKN5ut+Ag4xGy69bbtXJmzkzRDHry9ubYbMW4xFMb' \
--header 'Content-Type: application/json' \
--data '{
    "correlationId": "{{$guid}}",
    "amount": 80,
    "dueDate": "2025-12-30",
    "formatResponse": "PAYLOAD_AND_QRCODE",
    "payer": {
        "name": "João Alves",
        "document": "07034346593"
    },
    "address": {
        "cityName": "ARACAJU",
        "zipCode": "49000000",
        "uf": "SE",
        "state": "SE",
        "street": "LOGRADOURO"
    },
    "taxes": {
        "rebateType": "FIXED_AMOUNT",
        "rebateAmount": 1,
        "discountType": "FIXED_AMOUNT",
        "discountAmount": 1,
        "interestType": "FIXED_AMOUNT",
        "interestAmount": 1,
        "fineType": "PERCENTAGE",
        "fineAmount": 10
    }
}'

Request Body

Note that the discounts/fines should have one of the following types:

NameDescription
FIXED_AMOUNTFixed discount/fine value, therefore every day overdue will incur this interest fee
PERCENTAGEPercentage based discount/fine value set per day, therefore every day overdue will incur this interest fee
FIXED_AMOUNT_CALENDAR_DAYOnly for interest. Same as FIXED_AMOUNT
PERCENTAGE_PER_DAY_CALENDAR_DAYOnly for interest. Same as PERCENTAGE
PERCENTAGE_PER_MONTH_CALENDAR_DAYOnly for interest. Percentage set per month, therefore a payment made 15 days overdue on a 100% interest fee will have 50% interest fee
PERCENTAGE_PER_YEAR_CALENDAR_DAYOnly for interest. Percentage set per year, therefore a payment made 6 months overdue on a 100% interest fee will have 50% interest fee

Here are the attributes that can be passed for Due Date QR code:

NameTypeDescription
dueDatedatetimeRequired. Date where the QR code is due to be paid
maxDaysOverduenumberAmount of days the QR code will still be payable
taxesobjectObject used to configure the discounts/fines
taxes.rebateTypeenumFIXED_AMOUNT or PERCENTAGE
taxes.rebateAmountnumberThis amount will be taken off the full value
taxes.discountTypeenumFIXED_AMOUNT or PERCENTAGE
taxes.discountAmountnumberCannot be used with discountsDueDate. This amount will be taken off the full value only if paid before overdue
taxes.discountsDueDateobjectCannot be used with discountAmount. Object containing up to 3 different discount dates, if you want to add early payment incentives.
taxes.discountsDueDate.dueDatedatetimeCannot be used with discountAmount. The due date of up to 3 different discounts that can be offered
taxes.discountsDueDate.amountnumberCannot be used with discountAmount. The amount of up to 3 different discounts that can be offered
taxes.interestTypeenumFIXED_AMOUNT_CALENDAR_DAY , PERCENTAGE_PER_DAY_CALENDAR_DAY, PERCENTAGE_PER_MONTH_CALENDAR_DAY or PERCENTAGE_PER_YEAR_CALENDAR_DAY
taxes.interestAmountnumberAmount to be added after overdue, depending on set type
taxes.fineTypeenumFIXED_AMOUNT or PERCENTAGE
taxes.fineAmountnumberAmount to be added after overdue
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.
amountnumberRequired. Charge value.
formatResponseenumONLY_PAYLOAD is the default value if not directly attributed the PAYLOAD_AND_QRCODE which contains an image with 250x250px resolution.
expiresInnumberLimit for QR Code expiration, with a granularity of seconds, so that payment of the charge can be made, from the date-time of creation or expiration, if applicable. If not informed, the default value is 86400.
payerobjectRequired. Info about the payer client
payer.namestringName of the payer client
payer.documentstringPayer client document (CPF or CNPJ).
payer.validatebooleanFlag indicating that the payer must be validated during the cash process. With this flag enabled, the QR Code can only be paid by this payer.
addressobjectRequired. Information about the city where the transaction occurs.
address.cityNamestringCity name where the transaction occurs.
address.zipCodestringZip code of the location where the transaction occurs (CEP in Brazil).
address.ufstringState UF code of the location where the transaction occurs
address.statestringState UF code of the location where the transaction occurs
address.streetstringStreet name where the transaction occurs.
additionalInfosobjectObject containing additional information visible to the payer
additionalInfos.namestringName of the additional info or description you want to add
additionalInfos.valuestringThe additional info or description you want to add

A simple way to create a QR code with due date with all the discounts/fines goes as follows:

{ 
"correlationId": "{{$guid}}",
    "amount": 80,
    "dueDate": "2025-12-30",
    "formatResponse": "PAYLOAD_AND_QRCODE",
    "payer": {
        "name": "João Alves",
        "document": "07034346593"
    },
    "address": {
        "cityName": "ARACAJU",
        "zipCode": "49000000",
        "uf": "SE",
        "state": "SE",
        "street": "LOGRADOURO"
    },
    "taxes": {
        "rebateType": "FIXED_AMOUNT",
        "rebateAmount": 1,
        "discountType": "FIXED_AMOUNT",
        "discountAmount": 1,
        "interestType": "PERCENTAGE_PER_DAY_CALENDAR_DAY",
        "interestAmount": 1,
        "fineType": "PERCENTAGE",
        "fineAmount": 10
    }
}

Here's another way, here you can add up to 3 discount dates:

{
    "correlationId": "{{$guid}}",
    "amount": 80,
    "dueDate": "2025-12-30",
    "payer": {
        "name": "João Alves",
        "document": "07034346593"
    },
    "address": {
        "cityName": "ARACAJU",
        "zipCode": "49000000",
        "uf": "SE",
        "state": "SE",
        "street": "LOGRADOURO"
    },
    "taxes": {
        "rebateType": "FIXED_AMOUNT",
        "rebateAmount": 1,
        "discountType": "FIXED_AMOUNT",
        "discountsDueDate": [
            {
                "dueDate": "2025-05-16",
                "amount": 20
            },
            {
                "dueDate": "2025-06-16",
                "amount": 10
            }
        ],
        "interestType": "PERCENTAGE_PER_DAY_CALENDAR_DAY",
        "interestAmount": 1,
        "fineType": "PERCENTAGE",
        "fineAmount": 10
    },
    "additionalInfos": [
        {
            "name": "INFO 01",
            "value": "INFO VALUE 01"
        }
    ]
}

Response

The status code 200 indicates success in the transaction

{
    "correlationId": "ac7a235a-1a91-47b0-8da5-0eb75abf3617",
    "transactionId": "wcharge0aac4378c3cf4c37b0ec16c7c",
    "amount": 59.00,
    "originalAmount": 80,
    "dueDate": "2025-12-30",
    "maxDaysOverdue": 30,
    "taxes": {
        "rebateType": "FIXED_AMOUNT",
        "rebateAmount": 1,
        "discountType": "FIXED_AMOUNT",
        "discountsDueDate": [
            {
                "dueDate": "2025-05-16",
                "amount": 20.00
            },
            {
                "dueDate": "2025-06-16",
                "amount": 10.00
            }
        ],
        "interestType": "PERCENTAGE_PER_DAY_CALENDAR_DAY",
        "interestAmount": 1,
        "fineType": "PERCENTAGE",
        "fineAmount": 10
    },
    "status": "ACTIVE",
    "revision": 0,
    "payer": {
        "name": "JOAO ALVES",
        "document": "***343465**"
    },
    "address": {
        "cityName": "ARACAJU",
        "zipCode": "49000000",
        "uf": "SE",
        "state": "SE",
        "street": "LOGRADOURO"
    },
    "createdAt": "2024-12-17T12:22:02.757Z",
    "updatedAt": "2024-12-17T12:22:02.757Z",
    "expiresAt": "2026-01-29T23:59:59.000Z",
    "payloadPix": "00020101021226830014br.gov.bcb.pix2561pix-h.delbank.com.br/v2/cobv/wcharge0aac4378c3cf4c37b0ec16c7c5204000053039865802BR5907DELBANK6007ARACAJU62070503***63040F7B",
    "additionalInfos": [
        {
            "name": "INFO 01",
            "value": "INFO VALUE 01"
        }
    ]
}