Skip to main content

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

PIX requires a valid customer tax identification number. CPF (Cadastro de Pessoas Fisicas) is for individuals (11 digits). CNPJ (Cadastro Nacional da Pessoa Juridica) is for businesses (14 digits). Invalid documents will be rejected by the provider.

Creating a PIX Payment

Handling the Response

A successful PIX payment creation returns status PENDING with QR code data:

Displaying the QR Code

Present both options to the customer:
  1. QR Code Image: Render the base64 image for scanning with a banking app
  2. Copia e Cola: Show the qr_code_url string 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 the expiration_date field in the payment request:
After expiration:
  • The QR code and Copia e Cola code become invalid
  • The payment status transitions to EXPIRED
  • A payment.expired webhook 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
The Copia e Cola string is returned in 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:
Always verify payment status server-side via webhooks before fulfilling orders. Do not rely on client-side callbacks alone, as PIX payments are asynchronous.

Testing PIX in Sandbox

In the sandbox environment, PIX payments can be tested without real funds:
  1. Create a PIX payment using the sandbox API endpoint (api-sandbox.y.uno)
  2. The response returns a test QR code and Copia e Cola code
  3. Use the Yuno Dashboard sandbox tools to simulate payment completion
  4. Verify your webhook handler receives the payment.succeeded event
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 return PENDING status with QR code data:
Display either the QR code image (decode base64) or the 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.