Overview
The PIX IN flow allows you to receive payments to your Owem account. There are two main ways:- Dynamic QR Code - You generate a QR Code with a specific amount
- PIX Key - Customer pays directly to your key
Dynamic QR Code is the most common and recommended way for e-commerce
and one-time payments.
Complete Flow
Step 1: Generate QR Code
Step 2: Display QR Code
Use the returnedemv field to generate the QR Code image. Example with qrcode library:
Step 3: Wait for Payment
There are two ways to know when payment is made:Option A: Webhook (Recommended)
Configure a webhook for thepix_in:qrcode_paid event. You’ll receive a notification as soon as payment is confirmed.
Option B: Polling
Query the status periodically using thetxId:
Step 4: Confirm in Ledger
After receiving the webhook or detecting payment, confirm in the Ledger:status: "succeeded"→ Payment confirmednetAmount→ Net amount credited
Refund a Payment
If you need to return the amount to the payer:Best Practices
Always send payerName and payerCpfCnpj
Always send payerName and payerCpfCnpj
Increases conversion rate by up to 10% and ensures compatibility with all
banks.
Use webhooks instead of polling
Use webhooks instead of polling
Webhooks are more efficient and notify instantly. Polling consumes more
resources and has delay.
Validate in Ledger before releasing
Validate in Ledger before releasing
The Ledger is the source of truth. Always confirm status before
releasing products/services.
Set appropriate expiration
Set appropriate expiration
For checkouts, use 10-30 minutes. For virtual invoices, use 24-48 hours.
Related Webhook Events
| Event | When it occurs |
|---|---|
pix_in:qrcode_paid | QR Code payment confirmed |
pix_in:credited | Credit via PIX key |
pix_in:refunded_processing | Refund initiated |