PIX QR Code - Decode QR Code

This API decodes a PIX QR Code (copy and paste format) and returns detailed information about the payment, including receiver details, amount, and QR Code type. It supports static QR Codes, dynamic immediate payments, dynamic charges, and compound QR Codes.

Headers

ParameterTypeDescriptionExample
AuthorizationStringBearer + Access_tokenBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzEzMzAwOTMxLCJpYXQiOjE3MTMyOTczMzEsImp0aSI6Ijc2ZWI4ZTE5ZjM4YjQ4NmZiODdmNzNjNTdkMWVmNDJhIiwidXNlcl9pZCI6MjQ2fQ.5zekMa7CUj9p-MvNHns5ke4ZPhYV3Y1CLOsYL7hDUUo
hmacStringHMAC (Hash-based Message Authentication Code) is an authentication algorithm that combines a private key with a message to create a Message Authentication Code (MAC).hmac: 57373705c83bc5efe41001790c54642e670088c0c87d56bc8f990f2260c7740b99f4081ff231b87f82118c1e77a959e1f40eacf690a8fa61a827a9ba01d546f6

Body Details

{
  "pix_copy_and_paste": "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff6b2f8cd520400005303986540510.005802BR5913Fulano de Tal6008BRASILIA62070503***63041D3D",
  "payment_date": "2026-04-25"
}
FieldTypeDescriptionRequired or Optional
pix_copy_and_pasteStringPIX QR Code content in "copia e cola" (copy and paste) format. The complete EMV string.required
payment_dateDateIntended payment date. Format: YYYY-MM-DD. Must be today or a future date. Optional for immediate payments.optional

Request Examples

Decode static QR Code:

POST /decode-qrcode
Content-Type: application/json

{
  "pix_copy_and_paste": "00020126580014br.gov.bcb.pix0136a629532e-7693-4846-852d-1bbff6b2f8cd520400005303986540510.005802BR5913Fulano de Tal6008BRASILIA62070503***63041D3D"
}

Decode with scheduled payment date:

POST /decode-qrcode
Content-Type: application/json

{
  "pix_copy_and_paste": "00020126580014br.gov.bcb.pix01361234567890123456789012345678901234520400005303986540550.005802BR5925Example Company Name6014CIDADE EXEMPLO62070503***63045ABC",
  "payment_date": "2026-04-30"
}

Response Details

{
  "end_to_end_id": "E6070119020210521123456789012345678",
  "type": "STATIC",
  "journey": "JOURNEY_2",
  "ispb": "60701190",
  "agency": "0001",
  "account": "012345",
  "account_type": "PAYMENT_ACCOUNT",
  "key": "+5511987654321",
  "key_type": "PHONE",
  "receiver_name": "João da Silva",
  "receiver_fantasy_name": null,
  "receiver_document_type": "CPF",
  "receiver_document_legal_id": "12345678900",
  "data_qr_code_static": {
    "amount": 100.50,
    "description": "Payment for service",
    "city": "SAO PAULO",
    "zip_code": "01234567"
  },
  "data_qr_code_dynamic_immediate": null,
  "data_qr_code_dynamic_charge": null,
  "data_qr_code_compound": null
}
{
  "end_to_end_id": "E6070119020210521987654321098765432",
  "type": "DYNAMIC_IMMEDIATE",
  "journey": "JOURNEY_3",
  "ispb": "60746948",
  "agency": "1234",
  "account": "098765",
  "account_type": "CURRENT_ACCOUNT",
  "key": "12345678900",
  "key_type": "CPF",
  "receiver_name": "Maria Santos",
  "receiver_fantasy_name": "Loja Maria",
  "receiver_document_type": "CPF",
  "receiver_document_legal_id": "12345678900",
  "data_qr_code_static": null,
  "data_qr_code_dynamic_immediate": {
    "amount": 250.75,
    "expiration_date": "2026-04-25T23:59:59",
    "description": "Invoice #12345",
    "city": "RIO DE JANEIRO",
    "additional_info": "Order reference ABC123"
  },
  "data_qr_code_dynamic_charge": null,
  "data_qr_code_compound": null
}
FieldTypeDescription
end_to_end_idStringEnd-to-End ID that will be used for the payment transaction. Unique identifier in PIX system.
typeStringQR Code type. Possible values: STATIC, DYNAMIC_IMMEDIATE, DYNAMIC_CHARGE, COMPOUND. Determines which data_qr_code_* field will be populated.
journeyStringPIX journey identifier. May be null.
ispbStringReceiver's bank ISPB code (8 digits). Identifies the financial institution.
agencyStringReceiver's bank branch/agency number (4 digits with leading zeros). May be null for some QR Code types.
accountStringReceiver's account number (6 digits with leading zeros).
account_typeStringReceiver's account type (e.g., CURRENT_ACCOUNT, PAYMENT_ACCOUNT, SAVINGS_ACCOUNT, SALARY_ACCOUNT).
keyStringPIX key registered for this receiver (CPF, CNPJ, phone, email, or random key).
key_typeStringType of PIX key (e.g., CPF, CNPJ, PHONE, EMAIL, EVP).
receiver_nameStringLegal name of the receiver.
receiver_fantasy_nameStringFantasy/trade name of the receiver. null if not applicable or not provided.
receiver_document_typeStringType of receiver's document (CPF or CNPJ).
receiver_document_legal_idStringReceiver's CPF (11 digits) or CNPJ (14 digits).
data_qr_code_staticObjectStatic QR Code specific data. null if not a static QR Code.
data_qr_code_dynamic_immediateObjectDynamic immediate payment QR Code data. null if not this type.
data_qr_code_dynamic_chargeObjectDynamic charge (boleto-style) QR Code data. null if not this type.
data_qr_code_compoundObjectCompound QR Code data (multiple payments). null if not this type.

QR Code Types

ValueDescription
STATICStatic QR Code — can be reused multiple times, usually without a fixed amount.
DYNAMIC_IMMEDIATEDynamic QR Code for immediate payment — single use, fixed amount, may have expiration date.
DYNAMIC_CHARGEDynamic charge QR Code — similar to boleto, with due date and interest/fine rules.
COMPOUNDCompound QR Code — allows multiple payments or installments.

Static QR Code Data Fields

FieldTypeDescription
amountDecimalPayment amount. May be editable for static QR Codes.
descriptionStringPayment description or message.
cityStringCity of the receiver.
zip_codeStringZIP code (CEP) of the receiver.

Dynamic Immediate QR Code Data Fields

FieldTypeDescription
amountDecimalFixed payment amount. Not editable.
expiration_dateDateTimeQR Code expiration date and time. Payment not allowed after this date.
descriptionStringPayment description.
cityStringCity of the receiver.
additional_infoStringAdditional information about the payment.

Dynamic Charge QR Code Data Fields

FieldTypeDescription
amountDecimalOriginal payment amount.
due_dateDatePayment due date.
interest_amountDecimalInterest amount per day after due date.
fine_amountDecimalFine amount if paid after due date.
discount_amountDecimalDiscount amount if paid before due date.
descriptionStringPayment description.

Error Responses

HTTP CodeError MessageDescription
400QRCode not foundThe PIX copy and paste string is invalid, malformed, or could not be decoded. Verify the content of the pix_copy_and_paste field.
400Is less than current dateThe payment_date provided is in the past. Payment date must be today or a future date.
401UnauthorizedInvalid or missing authentication token. Ensure you are sending a valid Bearer token and HMAC signature.
403ForbiddenYour user does not have permission to use this endpoint.
422Validation errorRequest validation failed. Check that pix_copy_and_paste is provided and payment_date is in correct format (YYYY-MM-DD).

Business Rules

PIX Copy and Paste Format:

  • Must be a valid EMV QR Code string as defined by the Brazilian Central Bank
  • Invalid or corrupted strings will return a 400 QRCode not found error

Payment Date:

  • If provided, must be today's date or a future date in YYYY-MM-DD format
  • Past dates are rejected with a validation error
  • Can be omitted for immediate payments

QR Code Types:

  • Each QR Code type returns a different data structure
  • Only one of the data_qr_code_* fields will be populated; the others will be null
  • Check the type field in the response to know which object to read
  • DYNAMIC_IMMEDIATE and DYNAMIC_CHARGE QR Codes may have expiration dates — verify expiration_date before attempting payment
  • STATIC QR Codes may have amount = 0, meaning the user can specify any amount

Receiver Information:

  • Document numbers are always returned complete (not masked)
  • receiver_fantasy_name may be null for individuals
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
text/plain