Skip to main content
POST
Decode QR Code

Decode QR Code

Decode third-parties PIX QR codes to make them payable at the create payment endpoint.

Request Body

string
required
EMV from the QR Code.Example: 00020126580014BR.GOV.BCB.PIX...
string
City code.
string
Expected payment date - optional parameter, should be used with QR Codes that have discount or fines.Format: YYYY-MM-DD

Response

string
End to end ID - send it in qrcode.end_to_end_id at the create payment endpoint. It expires 5 minutes after the decode and can be used for a single payment.
object
Beneficiary data.
number
Amount of the QR code.
boolean
If true, the amount can be changed at payment endpoint. If false, the payment amount must be equal to the QR code amount.

Request Example

Use Cases

Decode and pay a PIX QR Code from another institution:
Validate QR Code and show details to user before confirming:
Handle QR Codes where amount can be changed:
Process multiple QR Codes in batch:

Best Practices

End-to-End ID Validity: The end_to_end_id expires 5 minutes after the decode and can be used for a single payment. Do not store it to pay later: decode the QR Code again right before each payment. An expired or already used end_to_end_id returns 404 with the message End to End ID not found at the create payment endpoint.
Amount Validation: Always check is_amount_changeable before allowing users to modify the payment amount. When it is false, a payment with a different amount is rejected with 400.
QR Code Status: Dynamic QR Codes are accepted only while the charge is active. Any other status returns 400 with the message QR Code doesn't have a valid status.
Error Handling: Implement proper error handling for invalid QR Codes. Not all QR Codes are valid PIX codes.
QR Code Format: The EMV string should be the complete PIX QR Code string starting with “00020126…”.

PIX Key Types

Common PIX key types you might encounter:

Integration Flow

Create Payment

Create payment after decoding QR Code

Callback Payment

Receive payment notifications