Skip to main content
Pix is the instant payment scheme established by the Central Bank of Brazil through BCB Resolution No. 1 of 12 August 2020. The API offers two charge types: the immediate charge, intended for payment on the spot, and the charge with a due date, which admits late charges and rebates.

Concepts

Immediate charge

The POST /pix/in/qrcode operation creates the charge. The amount (amountInCents) and the identification of the payer (customer.documentType and customer.document) are required.

Charge with due date

The POST /pix/in/cob operation accepts the same fields as the immediate charge, plus the cob block. The cob.expirationDate field is required, uses the YYYY-MM-DD format and cannot be earlier than the current date.
In the charge blocks, the type field takes the value fixed, for an amount in cents, or percent, for a percentage.

Validation rules

The payer’s registration number is validated according to the type provided, with verification of the check digits of the CPF or CNPJ. The phone number is optional and, when provided, must contain the area code and the number. When the list of items (items) is sent, the sum of amountInCents × quantity must be exactly equal to amountInCents. Validation failures result in a 400 response.

Idempotency

Both operations accept the Idempotency-Key header. Repeating the request with the same key returns the charge already created, without generating a new BR Code.

Payment confirmation

Settlement of the Pix is communicated by the transaction_paid event, which contains the endToEndId of the payment. It is recommended to store this identifier, as it is the reference used by the participating institutions in any infraction report.

Return

A Pix received may be returned to the payer through the refund operation or as a result of an infraction upheld under the Special Return Mechanism.