Decode a Pix QR Code (EMV)

Decodes a PIX QR Code EMV string and returns the beneficiary details without executing payment. Use this endpoint to display QR Code information to the user before confirming payment. The decoded data includes beneficiary name, document, bank info, amount, and PIX key. After reviewing the decoded data, use `POST /v1/accounts/{accountId}/pix/out/qr-code/async` to execute the payment (the synchronous `/pix/out/qr-code` is deprecated).

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

accountIdstringRequired
Account identifier.

Headers

X-Tenant-IdstringRequired
Tenant context used for authorization and routing.
Idempotency-KeystringOptional

Optional client-generated idempotency token (recommended for safe retries).

X-Request-TimestampstringRequired

Unix seconds. Required on the signed host; tolerance is 300s either way (403 request_timestamp_skew).

X-Content-SHA256stringRequired

Lowercase hex SHA-256 of the body. An empty body hashes the empty string, so the header is always present. Mismatch returns 400 body_hash_mismatch.

X-Request-SignaturestringRequired

Detached JWS (<protected>..<signature>, ES256 or PS256) over METHOD\nPATH?QUERY\nTIMESTAMP\nIDEMPOTENCY_KEY_OR_EMPTY\nX_CONTENT_SHA256.

Request

This endpoint expects an object.
emvstringRequired

The EMV string from the QR Code (copy and paste content).

Response

QR Code decoded successfully.
keystringOptional

PIX key of the beneficiary (email, phone, CPF/CNPJ, or EVP).

amountdoubleOptional

Payment amount in BRL. May be 0 for static QR Codes without a predefined value. For dynamic-due-date, this is the final value to pay (originalAmount - discount - deduction + interest + penalty).

originalAmountdoubleOptional

Original face value of the QR before discount/interest/penalty are applied. For static and dynamic-immediate this equals amount.

identifierstringOptional

Reusable decode identifier. Same value as decodeId. Can be sent as decodeId in POST /v1/accounts/{accountId}/pix/out/qr-code/async (or the deprecated sync /pix/out/qr-code) to skip a second decode round-trip.

decodeIdstringOptional

Alias of identifier, preserved for backward compatibility.

qrCodeTypeenumOptional
Variant of the QR. Determines which optional fields are populated.
qrCodeTypeIdintegerOptional

Numeric type id returned by the partner (kept for parity with raw payloads).

allowChangebooleanOptional

Whether the payer can modify the payment amount (dynamic-immediate only). Always present; false for variants where the partner does not return it.

descriptionstringOptional

Free-text payment message embedded in the QR (when present).

payeeNamestringOptional
Full legal name of the beneficiary.
payeeTradeNamestringOptional

Trade / fantasy name of the beneficiary (typically populated for dynamic-due-date invoices).

payeeDocumentstringOptional
CPF or CNPJ of the beneficiary.
bankIspbstringOptional
ISPB code of the beneficiary's bank.
bankBranchstringOptional
Bank branch of the beneficiary.
bankAccountstringOptional
Bank account number of the beneficiary.
accountTypeenumOptional

Canonicalised account type of the beneficiary. Other values may appear in upper snake-case if the partner introduces new types.

discountdoubleOptional

Discount amount to subtract from originalAmount (only dynamic-due-date).

deductiondoubleOptional

Deduction amount to subtract from originalAmount (only dynamic-due-date).

interestdoubleOptional

Interest amount to add to originalAmount (only dynamic-due-date).

penaltydoubleOptional

Late-payment penalty amount to add to originalAmount (only dynamic-due-date).

dueDatestringOptional

Due date of the charge in ISO 8601 / RFC 3339 (YYYY-MM-DD or full datetime, only dynamic-due-date).

paymentDeadlinestringOptional

Last accepted payment date (grace period after dueDate). Only dynamic-due-date.

Errors

400
Bad Request Error
422
Unprocessable Entity Error
500
Internal Server Error
503
Service Unavailable Error
504
Gateway Timeout Error