Overview
PIX is Brazil’s instant payment system, created and regulated by the Central Bank of Brazil (BACEN). It enables real-time fund transfers 24/7, including weekends and holidays. PIX has become the most popular payment method in Brazil, processing billions of transactions monthly. Key characteristics:- Instant settlement: Funds arrive in seconds, not days
- 24/7 availability: Works around the clock, every day
- Low cost: Significantly cheaper than card payments for merchants
- QR code based: Customers scan a QR code or copy-paste a code in their banking app
Requirements
Creating a PIX Payment
Handling the Response
A successful PIX payment creation returns statusPENDING with QR code data:
Displaying the QR Code
Present both options to the customer:- QR Code Image: Render the base64 image for scanning with a banking app
- Copia e Cola: Show the
qr_code_urlstring with a copy button for pasting into a banking app
Show a countdown timer alongside the QR code so the customer knows how long they have to complete the payment.
PIX Expiration
PIX codes have a configurable expiration period. The default is 30 minutes from creation. You can set a custom expiration using theexpiration_date field in the payment request:
- The QR code and Copia e Cola code become invalid
- The payment status transitions to
EXPIRED - A
payment.expiredwebhook event is sent
PIX Refunds
PIX supports instant full and partial refunds. Refunds are processed in real-time and the customer receives funds immediately.PIX refunds can be issued up to 90 days after the original payment, per BACEN regulation. The refund amount cannot exceed the original payment amount.
PIX Copia e Cola
PIX Copia e Cola is the text-based representation of the PIX payment code. Customers copy this string and paste it into their banking app instead of scanning a QR code. This is especially useful for:- Desktop/laptop purchases where the customer pays from a mobile device
- Accessibility scenarios
- Situations where QR code scanning is not available
payment_method.pix.qr_code_url and follows the EMV standard format defined by BACEN.
Webhook Events
Subscribe to these webhook events for PIX payment status updates:Testing PIX in Sandbox
In the sandbox environment, PIX payments can be tested without real funds:- Create a PIX payment using the sandbox API endpoint (
api-sandbox.y.uno) - The response returns a test QR code and Copia e Cola code
- Use the Yuno Dashboard sandbox tools to simulate payment completion
- Verify your webhook handler receives the
payment.succeededevent
Sandbox PIX payments are automatically approved after a short delay (typically 5-10 seconds) or can be manually approved via the Dashboard. Check Dashboard > Sandbox > Payments to manage test transactions.
Common Issues
Response Handling
Synchronous Response
PIX payments returnPENDING status with QR code data:
qr_code_url (copy-paste code) to the customer.
Webhook Events
PIX payments typically expire in 30 minutes to 24 hours depending on your configuration. Set appropriate expiration times based on your use case.