Decode QR Code
Decodes a QR Code from a base64 image or EMV BR Code payload string. Returns structured information including QR Code type (STATIC/DYNAMIC), PIX key, amount, merchant info, txid, and location URL. Automatically detects if input is a base64 image or EMV payload (starting with '0002'). For dynamic QR Codes, resolves the location URL to fetch charge details. Requires Idempotency-Key header; payerDocument is provided in the request body and is forwarded to the keys service when resolving the PIX key for static QR Codes.
- Type: stringIdempotency
- Key requiredUnique idempotency key
Request to decode a QR Code from base64 image or EMV payload
- Type: stringpayer
Document min length:1Pattern: \d{11}|\d{14}requiredPayer document (CPF or CNPJ digits only); forwarded to keys API on static QR key lookup.
- Type: stringqr
Code min length:1requiredQR Code image in base64 format (with or without data URI prefix).
- Type: stringcod
Mun Pattern: \d{7}IBGE municipality code of the payer (7 digits); forwarded on COBV location fetch.
- Type: string Format: datedata
Pagamento Intended payment date (DPP). For dynamic COBV, forwarded to the receiver when fetching the location URL so the final amount reflects discounts/interest/fines on that date.
- application/json
- application/json
- application/json
- application/json
curl http://localhost:8080/api/v1/charges/decode \
--request POST \
--header 'Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"qrCode": "",
"payerDocument": "",
"dataPagamento": "",
"codMun": ""
}'
{
"type": "STATIC",
"emv": "string",
"key": "string",
"value": "string",
"merchant": {
"name": "string",
"city": "string",
"taxId": "string"
},
"txid": "string",
"locationUrl": "string",
"additionalInfo": "string",
"status": "ACTIVE",
"revision": 1,
"calendar": {
"createdAt": "2026-07-29T19:28:46.582Z",
"expiresAt": "2026-07-29T19:28:46.582Z",
"expiration": 1,
"dueDate": "2026-07-29T19:28:46.582Z"
},
"debtor": {
"cpf": "string",
"cnpj": "string",
"name": "string"
},
"receiver": {
"taxId": "string",
"name": "string",
"tradeName": "string",
"uf": "string",
"accountIspb": "string",
"accountType": "string",
"accountBranch": "string",
"accountNumber": "string"
},
"additionalInfoList": [
{
"name": "string",
"value": "string"
}
],
"cobvFinalAmountBreakdown": {
"dataPagamento": "string",
"codMun": "string",
"valorOriginal": "string",
"abatimentoAplicado": "string",
"descontoAplicado": "string",
"jurosAplicado": "string",
"multaAplicada": "string",
"valorFinal": "string"
},
"ispb": "string",
"endToEndId": "string"
}