Pix Payment — Brazil

Pix is the instant payment system created by the Central Bank of Brazil. It allows real-time fund transfers 24/7. This dedicated endpoint is optimized to generate Dynamic QR Codes with a configurable Time-to-Live (TTL). It returns an EMV payload for "Copy and Paste" and a direct image link for scanning.
Important: Unlike standard card payments, a successful request first returns aWAITINGstatus. This means the QR code is active and awaits customer authorization in their banking environment.
Requirements
Before you call the Pix QR Code endpoint, make sure you have the following in place:
- Authentication: Every request requires a Bearer Token that you generate with the Authentication endpoint.
- Pix Key Activation: Your merchant account must have an active Pix key registered with Getnet.
- Webhook Listener: You must have a public HTTPS endpoint subscribed to the
APPROVED_TRANSACTIONSorPIX_APPROVED_TRANSACTIONSevent to confirm the final settlement. See the Webhooks reference.
Characteristics
The following table summarizes the main capabilities of Pix.
| Capability | Details |
|---|---|
| Customer Experience | Scan & Pay — Customers scan the QR Code image or use the "Pix Copia e Cola" string. |
| Settlement | Instant — Once the customer authorizes the payment, funds settle in seconds. |
| Configurability | Dynamic TTL — You set the expiration in the x-qrcode-expiration-time header. |
| Security | Biometric Auth — The customer authorizes the payment in their secure banking app. |
Available Features
The following table shows the countries and operations that Pix supports.
| Payment Flow | Supported Countries | Purchases | Refunds | Partial Refunds | Pre-authorizations |
|---|---|---|---|---|---|
| Dedicated API | Brazil (BR) | ✅ | ✅ | ✅ | ❌ |
Integration Flow
The Pix QR Code flow is designed for immediate credential generation and asynchronous status updates.
1. Create the QR Code Request
Start the QR code generation by calling the dedicated Pix QR Code endpoint.
| Attribute | Description | Required Value |
|---|---|---|
x-qrcode-expiration-time | Header: Defines TTL in seconds (e.g., 180 = 3 mins). | Integer |
amount | Transaction amount in cents (e.g., 8900 for R$ 89,00) | Integer |
currency | ISO currency code | BRL |
order_id | Your unique internal order identifier | String |
Sample Request:
curl --location --request POST 'https://api.pre.globalgetnet.com/dpm/payments-gwproxy/v2/payments/qrcode/pix' \
--header 'x-qrcode-expiration-time: 180' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--data-raw '{
"amount": 8900,
"currency": "BRL",
"order_id": "ORDER-10187383",
"customer_id": "customer_21081826",
"idempotency_key": "1eb2412c-165a-41cd-b1d9-76c575d30a21"
}'
1
2
3
4
5
6
7
8
9
10
11
curl --location --request POST 'https://api.pre.globalgetnet.com/dpm/payments-gwproxy/v2/payments/qrcode/pix' \
--header 'x-qrcode-expiration-time: 180' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--data-raw '{
"amount": 8900,
"currency": "BRL",
"order_id": "ORDER-10187383",
"customer_id": "customer_21081826",
"idempotency_key": "1eb2412c-165a-41cd-b1d9-76c575d30a21"
}'
2. Handle the Response
The API returns the payment identifier and a nested
additional_data object containing the QR code payload.Sample Response:
{
"payment_id": "03ec0ede-3bc9-42dd-a71b-1c3a670b2b89",
"status": "WAITING",
"description": "QR Code successfully generated and awaiting payment.",
"additional_data": {
"transaction_id": "890005df15a2-0b1e-4c6e-8ece-11a71070be06",
"qr_code": "00020101021226740014br.bcb.pix...",
"creation_date_qrcode": "2026-01-15T18:55:55",
"expiration_date_qrcode": "2026-01-15T18:58:58",
"psp_code": "033"
},
"idempotency_key": "e757d73e-fbdb-40ee-a72b-6f06f19c7a27"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
{
"payment_id": "03ec0ede-3bc9-42dd-a71b-1c3a670b2b89",
"status": "WAITING",
"description": "QR Code successfully generated and awaiting payment.",
"additional_data": {
"transaction_id": "890005df15a2-0b1e-4c6e-8ece-11a71070be06",
"qr_code": "00020101021226740014br.bcb.pix...",
"creation_date_qrcode": "2026-01-15T18:55:55",
"expiration_date_qrcode": "2026-01-15T18:58:58",
"psp_code": "033"
},
"idempotency_key": "e757d73e-fbdb-40ee-a72b-6f06f19c7a27"
}
Note: Use theadditional_data.qr_codestring for the "Copia e Cola" (Copy and Paste) feature. If your frontend requires an image URL, use the Getnet CDN with thepayment_id. You can also use the specificqr_code_imagelink, if provided.
3. Manage Post-Sale Operations
After the customer pays, handle the confirmation and any refunds.
- Webhook Confirmation: Once the bank clears the payment, you receive an
APPROVED_TRANSACTIONSorPIX_APPROVED_TRANSACTIONSevent at yourcallback_url. Update the order status toAPPROVEDonly after receiving this event. - Refunds: Pix supports full or partial refunds for up to 90 days after the original payment.
Get the Pix End-to-End ID
The
end_to_end_id field is the unique Pix transaction identifier generated by the Central Bank of Brazil. Store it with the order. You need it to track and reconcile the payment, to handle refunds and returns, and when you contact support. The value starts with E.You get
end_to_end_id in two places:- Webhook: The
APPROVED_TRANSACTIONSandPIX_APPROVED_TRANSACTIONSpayloads for an approved Pix payment includeend_to_end_id. See the payload in the Webhooks reference. - Get by Idempotent Key: Call the Get by Idempotent Key endpoint with the
payment_idand theidempotency_keyyou sent in the QR code request. The value is in thePIX_CONFIRMitem, atcontent.additional_data.end_to_end_idof itsresponseentry.
Note: The Central Bank of Brazil generatesend_to_end_idwhen the transfer settles. It's available after the payment is approved.
On this page
Pix Payment — Brazil