Pix
Pix is Brazil's instant payment system, run by the Banco Central do Brasil. Shoppers pay from their bank app, either by scanning a QR code or by pasting a copy and paste code, and the payment settles within seconds. Pix is available to anyone with a Brazilian bank account and a CPF or CNPJ.
Pix payment flow
- Initiation: The shopper chooses Pix at checkout and provides their CPF or CNPJ.
- QR code issued: You call
/checkoutwithPaymentMethodset toPIX. The response contains the QR code and the copy and paste code. - Shopper pays: The shopper scans the QR code, or pastes the copy and paste code, in their bank app and confirms the payment.
- Payment confirmed: Reach receives the payment confirmation and notifies you that the payment is processed.
- Order fulfilled: You ship the order or deliver the goods.
If the shopper does not pay before the QR code expires, Reach cancels the order.
Properties
Important considerations
Consumer.NationalIdentifieris required for Pix. Send the shopper's CPF (11 digits) or, for a business, their CNPJ (14 digits). Without it,/checkoutfails withNationalIdentifierInvalid.- The
Consumerobject must also includeName(the shopper's first and last name) andEmail. - Only shoppers paying in BRL with a Brazilian billing address can use Pix.
- The QR code expires 4 hours after the order is created. Show the shopper the expiry time from
expiresAt, and let them know they must pay before then. - Refunds can be submitted within 90 days of the payment, for the full amount or part of it. The refund is returned to the shopper's bank account.
Cancelling a Pix order
"Authorize" and "Capture" are irrelevant to the Pix payment process. A Pix payment is either paid or unpaid. If the QR code expires before the shopper pays, Reach cancels the order. Because the shopper can pay at any time until then, wait for the payment to be confirmed before shipping any physical goods.
Technical considerations
The /checkout response returns Authorized as false and an Action object. The same Action object is returned by /query while the order is waiting for payment.
Action.Redirectpoints to Stripe's hosted Pix instructions page, which shows the same QR code and copy and paste code. Redirect the shopper there if you don't build your own page.Action.Displayholds the Pix details for building your own payment page. See Display Parameters.
| Parameter | Description |
|---|---|
qrCodeData | The Pix copy and paste code (the QR code payload). The shopper pastes it into their bank app instead of scanning the QR code. |
qrCodeImageUrl | The URL of a PNG image of the Pix QR code, for the shopper to scan. |
expiresAt | When the QR code expires, as a Unix timestamp in seconds, sent as a string. By default it is 4 hours after the order is created. |
Show the QR code image and the copy and paste code together: shoppers on a phone usually can't scan a QR code shown on the same screen, so they copy the code instead. The response's Expiry is not the QR code's expiry. Use expiresAt for what you show the shopper.
{
"MerchantId": "e78e8cd0-24b8-4b0c-a922-87a1d8cc61c3",
"ReferenceId": "1540604093095",
"PaymentMethod": "PIX",
"ConsumerCurrency": "BRL",
"Capture": true,
"Items": [
{
"Description": "Piston Ring",
"ConsumerPrice": 100,
"Quantity": 1,
"Sku": "4383471583721"
}
],
"Consumer": {
"Name": "Jane Doe",
"Email": "[email protected]",
"Phone": "1234567890",
"Address": "123 Any Street",
"City": "Somewhere",
"Region": "SP",
"PostalCode": "01310-100",
"Country": "BR",
"NationalIdentifier": "26394653330"
},
"DeviceFingerprint": "a5772185-1c9a-4646-9772-557fc6083ea2",
"Return": "https://checkout-sandbox.gointerpay.net/return.php"
}{
"OrderId": "3f7c2a9e-5b1d-4e8a-9c6f-2d4b8e1a7c35",
"UnderReview": false,
"Expiry": "2026-12-01T19:00:00Z",
"Authorized": false,
"Completed": false,
"Captured": false,
"Action": {
"Redirect": "https://payments.stripe.com/pix/instructions/CBcaFwoVYWNjdF8xRXhhbXBsZUFjY291bnQ",
"Display": {
"qrCodeData": "00020101021226870014br.gov.bcb.pix2565qrcode.example.com/pix/v2/cobv/9d36b84f5c2a4e1b8a7d3f6e2c1b0a985204000053039865406100.005802BR5915Example Store6009SAO PAULO62070503***6304ABCD",
"qrCodeImageUrl": "https://qr.stripe.com/test_YWNjdF8xRXhhbXBsZUFjY291bnQ.png",
"expiresAt": "1796148000"
}
}
}Testing
Contact the Reach support team for instructions on testing Pix in the sandbox environment.
Any valid CPF works in the NationalIdentifier field in the sandbox. You can generate a valid (fake) CPF with a tool such as https://theonegenerator.com/generators/documents/cpf-generator.
Updated 1 day ago
