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
Immediate PIX payment
PIX with due date
Create PIX payments with a due date and optional pricing modifiers (interest, fine, discount, abatement):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(optional): QR code expiration time (1-86400 seconds, default: 86400). Must NOT be provided whendue_dateis provideddue_date(optional): Due date for the payment in YYYY-MM-DD format. Must be today or later. Required when using interest, fine, discount, or abatementexpiration_in_days_after_due_date(optional): Days after due date before expiration (1-365, default: 30). Must NOT be provided ifdue_dateis also not provided
Consumer information
For PIX transactions, provide customer details:full_name: Customer’s full name (required whendue_dateis provided)email: Customer’s emaildocument_type:CPForCNPJ(required whendue_dateis provided)document_number: Customer’s document number (required whendue_dateis provided)
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 and BOLEPIX in sandbox
In the sandbox environment, you can simulate PIX and BOLEPIX payments. Two endpoints are available depending on your use case.Pay a merchant’s transaction
Use this endpoint when paying a transaction that belongs to a specific merchant:Pay an organization’s own transaction
Use this endpoint when paying a transaction owned by the authenticated organization company. NomerchantId parameter is needed — the transaction is looked up using the authenticated organization’s company ID.
Only companies with type
ORGANIZATION can use the /v1/transactions/{transactionId}/pay endpoint.- PIX transactions: Uses the QR code from
pix_data.qr_code - BOLEPIX transactions: Uses the PIX EMV code from
bolepix_data.pix_emv
PIX with due date features
Interest
Interest is applied when payment is made after the due date. Configure using:amount: Fixed amount in cents per periodpercentage: Percentage per period (0-100, up to 2 decimal places)modality: Calculation method
AMOUNT_PER_DAY: Fixed amount per dayPERCENTAGE_PER_DAY: Percentage per dayPERCENTAGE_PER_MONTH: Percentage per monthPERCENTAGE_PER_YEAR: Percentage per yearAMOUNT_PER_WORKING_DAY: Fixed amount per working dayPERCENTAGE_PER_WORKING_DAY: Percentage per working dayPERCENTAGE_PER_WORKING_MONTH: Percentage per working monthPERCENTAGE_PER_WORKING_YEAR: Percentage per working year
Fine
Fine is a one-time charge applied when payment is made after the due date:amount: Fixed amount in centspercentage: Percentage of transaction amount (0-100)modality:FIXEDorPERCENTAGE
Discount
Discount reduces the payment amount when paid before or on specific dates:modality: Discount calculation methoddiscount_dates_config: Array of up to 3 discount periods (for date-based modalities)amountorpercentage: Value for per-day modalities
FIXED_AMOUNT_UNTIL_DATE: Fixed amounts valid until specific datesPERCENTAGE_UNTIL_DATE: Percentages valid until specific datesAMOUNT_PER_DAY: Amount reduction per dayAMOUNT_PER_WORKING_DAY: Amount reduction per working dayPERCENTAGE_PER_DAY: Percentage reduction per dayPERCENTAGE_PER_WORKING_DAY: Percentage reduction per working day
Abatement
Abatement permanently reduces the transaction amount:amount: Fixed amount in centspercentage: Percentage of transaction amount (0-100)modality:FIXEDorPERCENTAGE
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)
- Due date payments: Use
expiration_in_days_after_due_date(default: 30 days)
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.
Use due dates for invoices
Use due dates for invoices
For invoice payments, use
due_date with appropriate pricing modifiers to encourage early payment and handle late payments.Next steps
Webhooks
Receive real-time payment notifications
Banking
Manage settlements and transfers

