To charge by Pix (Brazil's instant payment system) on a site or app, the system creates a charge with the order's amount and identifier, shows the QR Code or copy-and-paste code to the customer, and releases the order only when it receives the payment confirmation from the provider. The rest of the work is reconciling, handling exceptions, and issuing the fiscal invoice (nota fiscal) that your business requires.
A note on sources: the official Central Bank of Brazil pages on Pix could not be read while preparing this guide. For that reason, the text does not state operating hours, fees, limits or scheme rules. What follows is the technical design of the flow, which applies to any provider, and a list of what you should confirm in writing with whoever you hire. For the overall picture of integrations, see systems integration: API, ERP, Pix and fiscal invoices.
The ways to charge by Pix
| Way | How it works | When it makes sense |
|---|---|---|
| Static Pix key on the site | The customer copies the key and types in the amount | Occasional sales; everything has to be checked by hand |
| QR Code or copy-and-paste code generated per order | The system creates a charge with amount and identifier | Online store, app, recurring orders |
| Pix by link or the provider's hosted payment page | The customer is taken to the provider's screen to pay | Launching quickly, with less development |
| Recurring or scheduled charge | Depends on what the provider offers | Monthly fees; confirm the terms with the provider |
A static key works for low sales volume, but the money has no automatic link to the order: someone has to check the statement and mark it as paid. When there are dozens of orders a week, this becomes a source of errors. A charge generated per order solves this, because each payment carries the identifier of the order it belongs to.
The technical flow, step by step
- Customer places the order. The system saves the order as "awaiting payment", with a unique identifier.
- System creates the charge. It sends the provider the amount, the identifier and an expiry time, and receives the QR Code and the copy-and-paste code.
- Customer pays in the bank app. The screen of your site or app shows the code and watches the status.
- Provider confirms. It notifies your system through an automatic call (webhook), or the system checks the status.
- System releases the order. It changes the status to paid, deducts stock, triggers picking or access, and records the event.
- Reconciliation. A routine compares the provider's report with the orders and flags the differences.
The point that causes the most problems is step 4. The provider's confirmation is the proof; the customer's "thank you" screen or a receipt sent by message is not. If the system releases the order by any other route, room opens for fraud and errors. How automatic confirmations behave is explained in the integrations guide mentioned above.
Webhook, queue and idempotency
The provider's notice may arrive late, duplicated or out of order. A well-built system accepts that. Three safeguards solve most cases:
- Idempotency. If the same notice arrives twice, the order is deducted only once.
- Queue and retry. If your system was down when the notice arrived, it checks the status later and corrects itself.
- Logging everything. Every notice received is stored, with date and content, so any difference can be investigated.
Daily reconciliation
Reconciling means comparing what the provider says it received with what the system says it sold. Do it every day, not only at month end. The typical differences are payments with no order, paid orders the system did not deduct, mismatched amounts, and overdue charges paid after the deadline. A simple report with these four columns already saves hours of investigation. As volume grows, it is worth connecting this reconciliation to finance, as shown in fiscal invoices and boleto (Brazilian payment slip) inside your system.
Rules to define before launch
| Situation | Rule to define |
|---|---|
| Charge expired and the customer paid later | Refund, reactivate the order or issue credit |
| Customer paid twice | Refund the excess or use it as credit |
| Amount paid differs from the amount charged | Who decides, and within how long |
| Cancellation after payment | Deadline and refund method |
| Item out of stock after payment | Refund and notice to the customer |
What to confirm with the provider
Before hiring, ask for these in writing and keep them:
- Fees, settlement deadlines and any monthly fees.
- How the payment confirmation works and what the integration documentation covers.
- How refunds and returns work.
- Which reports exist for reconciliation.
- Who is responsible for fraud and disputes, and how to open a ticket.
These figures vary between providers and over time, which is why this guide does not quote any values.
Pix inside an app
The flow is the same, with two practical differences. The first is the experience: on a phone, the customer usually copies the code, switches to the bank app and comes back. So your app screen needs to watch the status and update on its own when the payment is confirmed, without requiring the person to close and reopen it. The second is the app store rules: what can be charged outside the app and what must go through in-app purchase depends on the type of product sold and each store's rules, and this guide does not summarize them. Anyone selling digital content or subscriptions should read app with subscriptions and in-app purchases: what to know before designing the charge.
How much integration costs
The ranges below are Luna's and refer to development work. Provider fees, hosting and domain are separate. Anyone planning their own sales channel will find context in how to create an online store and own delivery app.
| Project | Price range | Timeline |
|---|---|---|
| E-commerce with catalog and payment | $615 to $1,230 | 1 to 3 weeks |
| Own delivery channel (site with cart and Pix) | $615 to $1,230 | 1 to 3 weeks |
| System with external integration (API, WhatsApp, ERP) | $1,200 to $2,730 | 3 to 6 weeks |
Checklist before launch
- The provider has been chosen and the terms are in writing.
- Each charge has a unique identifier and an expiry time.
- The order is released only by the provider's confirmation.
- Duplicate or late notices do not cause a double deduction.
- There is a daily reconciliation report, with a person responsible.
- The rules for expiry, duplicates and refunds are written down.
- The sale's fiscal document has been agreed with the accountant.
- The flow has been tested end to end before opening to the public.
Common mistakes
- Trusting the receipt sent by the customer instead of the provider's confirmation.
- Releasing the order as soon as the QR Code is shown, before payment.
- Not handling duplicate notices, and deducting the same order twice.
- Charging without an expiry time and piling up open charges.
- Leaving reconciliation until the end of the month.
- Promising the customer a refund timeline without agreeing it with the provider.
- Forgetting the fiscal invoice (nota fiscal), which a Pix payment does not replace.
How Luna does it
At Luna Next-Gen, Pix is part of the scope together with the order, the inventory and the reconciliation, not an isolated button. The proposal lists the chosen provider, the exception rules and the daily report. Provider fees and terms are agreed between you and the provider, in writing. The payment method is agreed in the proposal, and there is a 6-month warranty for bug fixes. To talk, ask for a quote.
Frequently asked questions
How do I charge by Pix on a website?
The system creates a charge with the amount and the order identifier, usually through a payment provider, and shows a QR Code or a copy-and-paste code. The order is released only when the provider reports that the payment was confirmed.
Do I need a payment provider?
In practice, almost always yes, because it handles the charge, the confirmation and the reconciliation. Terms, deadlines and fees vary from provider to provider and should be confirmed in writing with whoever you hire.
How much does it cost to integrate Pix into a site?
At Luna, an e-commerce store with catalog and payment costs between $615 and $1,230, in 1 to 3 weeks. A system with external integration costs between $1,200 and $2,730, in 3 to 6 weeks. The provider's fees are separate and depend on the contract.
How do I know the customer paid?
The provider notifies your system through an automatic call (webhook), or the system checks the status of the charge. A receipt sent by the customer should not be the proof: what counts is the confirmation that comes from the provider.
What is payment reconciliation?
It means comparing what the provider or the bank says was received with the orders in the system, to find payments with no order, orders with no payment and mismatched amounts. Doing this every day avoids discovering the problem only at month end.
Does Pix require a fiscal invoice (nota fiscal)?
A Pix payment does not replace the fiscal document required for your business. That depends on your tax regime and the type of sale, and should be confirmed with your accountant. See also how to integrate fiscal invoices into your system.
What do I do when a customer pays twice or after the deadline?
Define the rule beforehand: each charge has a unique identifier, expires after a set time, and the system records extra payments for refund or credit. Without a written rule, the team resolves each case on its own and the errors pile up.