Decode Pix QR Code
Decodes a Pix QR Code returning the data contained in the payload. It does not perform a DICT lookup on the destination account and does not persist the consulted QR Code — suitable for preview flows prior to a payment decision.
Request
ENDPOINT
/pix/decode_qrcode_payloadMETHOD
POSTRequest Body
{
"qr_code_payload": "00020126580014br.gov.bcb.pix0136a23bf0e9-5175-4829-bf89-e8fe6ac09aa1520400005303986540530.005802BR5914TywinLannister6008saopaulo62070503***6304D4FD"
}
Body Params
| Field | Type | Description | Characters |
|---|---|---|---|
qr_code_payload * | string | Pix Copy and Paste | - |
Response
STATUS
200Response Body: Static QR Code
{
"qr_code_type": "static",
"qr_code_payload": "00020126580014br.gov.bcb.pix0136a23bf0e9-5175-4829-bf89-e8fe6ac09aa1520400005303986540530.005802BR5914TywinLannister6008saopaulo62070503***6304D4FD",
"pix_key": "a23bf0e9-5175-4829-bf89-e8fe6ac09aa1",
"transfer_amount": "30.00",
"additional_data": null,
"qr_code_data": {
"target_pix_key": "a23bf0e9-5175-4829-bf89-e8fe6ac09aa1",
"amount": "30.00",
"receiver_conciliation_id": "***",
"additional_data": [],
"category_code": "0000",
"city": "saopaulo",
"postal_code": null,
"reusable_qrcode": "no"
}
}
STATUS
200Response Body: Dynamic QR Code — immediate payment
{
"qr_code_type": "dynamic_instant",
"qr_code_payload": "00020101021226850014br.gov.bcb.pix2563qrcodepix.bb.com.br/pix/v2/d373e385-dfe7-49f6-b9ec-14ba60a9b8285204000053039865802BR5925TESTE62070503***63047B7D",
"pix_key": "teste.cobrancapix@gmail.com.br",
"receiver_conciliation_id": "fgnb4NTt7pOUBGfrcporERwVVqr0f8PWRfK",
"amount": "9367.61",
"status": "ATIVA",
"qr_code_data": {
"target_pix_key": "teste.cobrancapix@gmail.com.br",
"receiver_conciliation_id": "fgnb4NTt7pOUBGfrcporERwVVqr0f8PWRfK",
"amount": "9367.61",
"can_change": "no",
"expiration_seconds": 201574,
"created_at": "2023-03-13T19:00:28.440Z",
"presented_at": "2023-03-14T19:07:48.729Z",
"question_to_payer": "Liquidacao de Parcelas",
"status": "ATIVA",
"revision": 0,
"category_code": "0000",
"city": "RIO DE JANEIRO",
"postal_code": null,
"reusable_qrcode": "no",
"receiver_url": "qrcodepix.bb.com.br/pix/v2/d373e385-dfe7-49f6-b9ec-14ba60a90000",
"additional_data": [],
"payer_name": "ISMAEL FATIMA AMARAL",
"payer_document_number": "10003550206",
"payer_person_type": "natural",
"target_name": "TESTE LTDA.",
"target_trading_name": null,
"address": "Rua Tapajos, 941",
"state": "RJ"
}
}
STATUS
200Response Body: Dynamic QR Code — with due date
{
"qr_code_type": "dynamic_term",
"qr_code_payload": "00020101021226840014br.gov.bcb.pix2562invoice.starkbank.com/v2/cobv/8b434df48c30482a81f7c936ae35cc123456000053039865802BR5925Oncred Sociedade de Credi6015TESTE 62070503***6304D008",
"pix_key": "e623e7b0-d00a-400e-aee6-79632430e817",
"receiver_conciliation_id": "8b434df48c30482a81f7c936ae35cc87",
"amount": "55.59",
"status": "ATIVA",
"qr_code_data": {
"target_pix_key": "e623e7b0-d00a-400e-aee6-79632430e817",
"receiver_conciliation_id": "8b434df48c30482a81f7c936ae35cc87",
"original_amount": "55.59",
"reduction_amount": null,
"discount_amount": null,
"fee_amount": null,
"fine_amount": null,
"amount": "55.59",
"due_date": "2023-03-27",
"days_after_due_accepted": 16,
"created_at": "2023-01-10T19:49:58.30Z",
"presented_at": "2023-03-10T15:32:15.87Z",
"question_to_payer": null,
"status": "ATIVA",
"revision": 0,
"category_code": "0000",
"reusable_qrcode": "no",
"receiver_url": "invoice.starkbank.com/v2/cobv/8b434df48c30482a81f7c936ae351234",
"additional_data": [],
"payer_name": "Willian Rocha",
"payer_document_number": "00000000000",
"payer_person_type": "natural",
"target_name": "TESTE LTDA.",
"target_trading_name": null,
"address": "Rua Tapajos, 941",
"state": "SP",
"city": "Sao Caetano do Sul",
"postal_code": "09551230"
}
}
Response fields
| Field | Type | Description | Present in |
|---|---|---|---|
qr_code_type | string | QR Code type: static, dynamic_instant or dynamic_term | All |
qr_code_payload | string | Original EMV payload sent in the request | All |
qr_code_data.target_pix_key | string | Recipient's Pix key | All |
qr_code_data.amount | string/decimal | Charge amount. For dynamic_term, represents the final amount (after fine/interest/discount) | All |
qr_code_data.receiver_conciliation_id | string | Recipient's conciliation identifier (txid) | All |
qr_code_data.additional_data | array | List of additional info {name, value} | All |
qr_code_data.category_code | string | Merchant category code (MCC) | All |
qr_code_data.city | string | Recipient's city | All |
qr_code_data.postal_code | string | Recipient's ZIP code | All |
qr_code_data.reusable_qrcode | string | yes if the QR Code can be paid multiple times, no otherwise | All |
qr_code_data.receiver_url | string | Recipient PSP URL (loc field of BR Code) | dynamic_* |
qr_code_data.status | string | Charge status (see enumerators below) | dynamic_* |
qr_code_data.revision | integer | Current revision of the charge | dynamic_* |
qr_code_data.created_at | string (ISO) | Charge creation timestamp at the recipient's PSP | dynamic_* |
qr_code_data.presented_at | string (ISO) | Timestamp when the charge was presented to the payer | dynamic_* |
qr_code_data.question_to_payer | string | Message from the recipient to the payer (solicitacaoPagador) | dynamic_* |
qr_code_data.payer_name | string | Expected payer's name, when informed by the recipient | dynamic_* |
qr_code_data.payer_document_number | string | Expected payer's CPF/CNPJ | dynamic_* |
qr_code_data.payer_person_type | string | natural or legal | dynamic_* |
qr_code_data.target_name | string | Recipient's name | dynamic_* |
qr_code_data.expiration_seconds | integer | Charge validity in seconds, counted from created_at | dynamic_instant |
qr_code_data.can_change | string | yes if the payer can change the amount, no otherwise | dynamic_instant |
qr_code_data.original_amount | string/decimal | Original charge amount before fine/interest/discount | dynamic_term |
qr_code_data.due_date | string (date) | Charge due date | dynamic_term |
qr_code_data.days_after_due_accepted | integer | Days after the due date during which payment is still accepted | dynamic_term |
qr_code_data.fine_amount | string/decimal | Fine applied after the due date | dynamic_term |
qr_code_data.fee_amount | string/decimal | Interest applied after the due date | dynamic_term |
qr_code_data.discount_amount | string/decimal | Discount granted before the due date | dynamic_term |
qr_code_data.reduction_amount | string/decimal | Rebate applied to the charge | dynamic_term |
qr_code_data.target_trading_name | string | Recipient's trading name | dynamic_* |
qr_code_data.address | string | Recipient's street address | dynamic_* |
qr_code_data.state | string | Recipient's state | dynamic_* |
Deprecated root-level fields
The fields below are returned at the root of the response for backward compatibility only and will be removed in a future version. Use the equivalents inside qr_code_data.
| Field | Equivalent | Present in |
|---|---|---|
pix_key | qr_code_data.target_pix_key | All |
transfer_amount | qr_code_data.amount | static |
additional_data | qr_code_data.additional_data | static |
amount | qr_code_data.amount | dynamic_* |
receiver_conciliation_id | qr_code_data.receiver_conciliation_id | dynamic_* |
status | qr_code_data.status | dynamic_* |
Static QR Code
By the BR Code specification, static QR Codes do not contain expected payer data, expiration date, fine, interest, discount nor rebate. Those fields only exist on dynamic QR Codes.
Status
For the dynamic QR Code type, the status of the QR Code is returned according to the enumerator table below.
Dynamic QR Code Status Enumerators
| Enumerator | Description |
|---|---|
| ATIVA | Charge available, no payment made |
| CONCLUIDA | Charge paid and finalized |
| REMOVIDA_PELO_USUARIO_RECEBEDOR | Receiving user requested the charge removal |
| REMOVIDA_PELO_PSP | Receiving bank requested the charge removal |
Errors
STATUS
400Invalid QR Code format
{
"data": "{\"title\": \"Invalid Qr Code Format\", \"description\": \"The Qr Code format is invalid, please enter a valid Qr Code\", \"translation\": \"O formato do Qr Code é inválido, por favor insira um Qr Code válido\", \"extra_fields\": {}, \"code\": \"PXT000070\"}"
}
QR Code type not identified in payload
{
"data": "{\"title\": \"Invalid Qr Code Type\", \"description\": \"The Qr Code payload given did not provide a propper Qr Code type\", \"translation\": \"O payload de QR Code fornecido não contêm um tipo de Qr Code Válido\", \"extra_fields\": {}, \"code\": \"PXT000071\"}"
}
Error processing dynamic QR Code
{
"data": "{\"title\": \"Error in Qr Code Payload Request\", \"description\": \"An error occurred while requesting the qr code payload to the registry institution\", \"translation\": \"Um erro ocorreu durante a requisição do payload do qr code para a instituição de registro\", \"extra_fields\": {}, \"code\": \"PXT000069\"}"
}