How PIX works
- Merchant creates a PIX transaction with a QR code
- Customer scans the QR code with their banking app
- Customer confirms the payment
- Merchant receives instant notification
- Funds are settled to merchant’s account
Prerequisites
Before processing PIX payments, ensure:- Merchant has an active affiliation with a provider
- Affiliation includes
PIXinallowed_payment_methods - Merchant has at least one active PIX key
Creating a PIX transaction
PIX-specific fields
pix_data
pix_key_id(optional): Specific PIX key to use. If not provided, uses merchant’s primary keydescription(optional): Description shown to the payerexpiration_in_seconds: QR code expiration time (1-86400 seconds, default: 86400)
Consumer information
For PIX transactions, provide customer details:full_name: Customer’s full nameemail: Customer’s emaildocument_type:CPForCNPJdocument_number: Customer’s document number
PIX QR code
The response includes a PIX QR code that customers can scan:PIX transaction lifecycle
1. Transaction created
Status:WAITING_PAYMENT
The transaction is created with a QR code. Customer has until expiration to pay.
2. Payment received
Status:APPROVED
When the customer pays, you receive a webhook notification:
3. Settlement
Funds are settled to the merchant’s bank account according to transfer configurations.4. Expiration (if not paid)
Status:EXPIRED
If the customer doesn’t pay before expiration, the transaction expires automatically.
PIX key management
Automatic PIX key creation
When a merchant’s affiliation is activated, Rinne automatically creates a primary EVP (random) PIX key. This ensures merchants can immediately receive PIX payments.Creating additional PIX keys
Merchants can create additional PIX keys:Listing PIX keys
PIX refunds
Refund PIX transactions using the refund endpoint:PIX refund reasons
CUSTOMER_REQUEST: Customer requested refundFRAUD: Fraudulent transactionBANKING_ERROR: Banking system errorPIX_WITHDRAWAL_OR_CHANGE_ERROR: PIX withdrawal or change error
Testing PIX in sandbox
In the sandbox environment, you can simulate PIX payments:Best practices
Set appropriate expiration times
Set appropriate expiration times
- E-commerce: 15-30 minutes (900-1800 seconds)
- In-person: 5-10 minutes (300-600 seconds)
- Invoices: 24 hours (86400 seconds)
Handle expired transactions
Handle expired transactions
Monitor for expired transactions and notify customers to create a new payment.
Use webhooks for status updates
Use webhooks for status updates
Don’t poll for transaction status. Use webhooks to receive real-time updates.
Validate customer documents
Validate customer documents
Ensure customer CPF/CNPJ is valid before creating transactions to reduce fraud.

