Reconciling QRIS and Virtual Account Payments in a B2B System: Design for the Cases That Do Not Match
November 11, 2026 · 8 min read · Etzal Group Team
A distributor adds QRIS and virtual account payments to its ordering system. Customers like it. A month later, finance cannot close the books. The bank statement shows one credit of 48,216,500 each morning. The system shows sixty-three invoices paid yesterday totalling 48,730,000. Nobody can explain the 513,500, which turns out to be gateway fees, one refund and a payment that arrived after the cut-off. Multiply by thirty days. Payment reconciliation was not designed. It was assumed.
How the money actually moves
Four events, on different days, with different amounts.
- The customer pays the gateway: by scanning a QRIS code, or transferring to a virtual account number. The gross amount.
- The gateway notifies your system, usually within seconds, through a webhook: this reference was paid, this amount, at this time.
- The gateway settles to your bank account later, often the next business day or according to your agreement, in a batch: all payments in the period, minus fees, minus refunds.
- Your bank statement shows one credit for the batch.
Three records describe the same money: your invoices, the gateway's transaction and settlement reports, and the bank statement. They agree only when you account for timing and fees.
The three-way match
Reconciliation has two links, not one.
Link A: invoice to gateway transaction. Every invoice marked paid has exactly one successful gateway transaction of the same amount, and every successful gateway transaction is attached to an invoice or held as unallocated.
Link B: gateway settlement to bank. Every settlement batch reported by the gateway equals one credit on the bank statement. The batch total equals the sum of its transactions, minus fees and refunds.
When both links hold, every rupiah in the bank is traceable to an invoice, and every paid invoice is traceable to the bank.
Design decisions before building
Use a unique reference per payment request
Each payment request sent to the gateway carries your own reference: the invoice number plus a sequence. The gateway returns it in the notification and the reports. Matching by reference is exact. Matching by amount and date is guesswork.
Choose the virtual account type deliberately
- Dynamic, closed amount: one number per invoice, exact amount, expiry. Best for exact matching. A customer who pays the wrong amount is rejected by the bank.
- Static, open amount: one number per customer. Convenient for repeat buyers who pay several invoices at once. Requires allocation rules.
Many B2B systems use dynamic accounts for one-off orders and static accounts for regular customers with running balances.
Record the payment as its own object
Do not just flip an invoice to "paid". Create a payment record with:
- Your reference and the gateway's transaction identifier.
- Method: QRIS, virtual account, card.
- Gross amount, fee, net amount.
- Paid time, as reported by the gateway.
- Settlement batch identifier, filled in later.
- Status: pending, paid, settled, refunded, failed.
Then link the payment to one or more invoices. This structure handles partial payments, overpayments and one payment covering several invoices.
Treat the webhook as a hint, and verify
- Verify the signature on every webhook, so nobody can fake a payment.
- Confirm with the gateway by querying the transaction status before marking paid, at least for larger amounts.
- Make processing repeatable. The same notification may arrive twice. Processing it a second time must change nothing.
- Do not depend on it alone. Webhooks get lost. Run a scheduled job that asks the gateway for recent transactions and catches anything missed.
Book fees separately
Record the gross amount as payment of the invoice and the fee as an expense. The customer paid the full invoice. Your bank received less. If you book only the net, every invoice appears slightly unpaid.
Use a clearing account
When the customer pays, the money is with the gateway, not yet in your bank.
- On payment: debit a "gateway clearing" account, credit the customer's receivable.
- On settlement: debit bank, debit gateway fees, credit the clearing account.
The clearing account's balance is always the money the gateway owes you. It should return to near zero after each settlement. If it does not, something is unreconciled.
Eight mismatches to plan for
1. Paid at the gateway, invoice not updated. A lost webhook. Caught by the scheduled status check.
2. Invoice marked paid, no gateway transaction. Someone marked it by hand, perhaps on the strength of a screenshot. Manual marking should require a reason, an approver and a bank reference, and appear on an exception list.
3. Wrong amount. With a static virtual account, a customer pays 4,950,000 against an invoice of 5,000,000. Rule needed: accept as partial, leave the balance open, notify.
4. Overpayment. Hold the excess as a customer credit. Do not lose it and do not silently apply it.
5. One payment for several invoices. Allocate by rule, such as oldest first, or by the customer's instruction, and show the allocation.
6. Duplicate payment. The customer pays twice. The second payment has no open invoice. Hold as credit or refund, by a defined process.
7. Payment after expiry or cancellation. An order was cancelled and the customer paid anyway. The money must not disappear. Route to an unallocated queue for a decision: reinstate or refund.
8. Refunds and chargebacks. These reduce a later settlement. Record each against its original payment, or the settlement will not tie out.
And one that is not a mismatch: timing. Payments made after the gateway's daily cut-off settle a day later. Friday evening's payments arrive on Monday or Tuesday. The reconciliation must match by settlement batch, not by calendar day.
The unallocated queue
Every system that takes payments needs a place for money that arrived and could not be matched: unknown reference, wrong amount, cancelled order.
- Each item shows amount, time, method, payer details as provided, and why it did not match.
- A named person clears the queue daily.
- Every resolution is recorded: allocated to which invoice, held as credit, or refunded.
An empty unallocated queue each morning is the sign of a healthy integration. A queue nobody looks at is where customer disputes begin.
What finance sees each morning
One screen.
- Yesterday's payments: count and gross total by method.
- Matched to invoices: count and total. Unmatched: list.
- Settlement received: batch identifier, gross, fees, refunds, net.
- Bank credit: amount. Difference from net settlement: should be zero.
- Clearing account balance, and how old the oldest item is.
- Unallocated queue: number of items.
- Manual overrides made yesterday.
If every difference is zero, finance spends two minutes. If not, the screen shows exactly which item to look at.
Automate the settlement side
- Fetch the settlement report from the gateway automatically, by its interface or scheduled file.
- Import the bank statement by a bank interface or a file.
- Match batch to credit by amount and expected date, automatically.
- Flag anything unmatched after the expected settlement time.
Doing this by hand from downloaded spreadsheets works for ten payments a day and collapses at five hundred.
Controls
- Nobody marks an invoice paid without evidence from the gateway or the bank.
- Manual allocation and refunds need a second person above a threshold.
- Changes to bank or settlement details in the gateway account are restricted and alerted.
- Access keys for the gateway are stored securely and rotated.
- A complete log of every status change, with who and when.
- Month-end: the clearing account is explained item by item.
Testing before go-live
Use the gateway's test environment to run every case, not only the happy one.
- Exact payment.
- Underpayment and overpayment on a static account.
- Payment twice.
- Payment after expiry.
- Webhook delivered twice, and not at all.
- Refund, full and partial.
- A settlement batch containing fees and a refund.
- A payment just before and just after the cut-off.
Then run in production with a few real customers for two weeks, reconciling by hand alongside the system, before opening to everyone.
Common mistakes
- Matching by amount and date instead of a unique reference.
- Marking invoices paid from the webhook without verification.
- Trusting transfer screenshots.
- No fallback when a webhook is lost.
- Booking net amounts, leaving every invoice short by the fee.
- No clearing account.
- No place for unmatched money.
- Reconciling to the bank statement directly, skipping the settlement report.
- Ignoring refunds in settlement.
- Testing only the successful payment.
Fee structures, settlement times and features differ between providers and change over time, so confirm the specifics in your provider's current documentation and agreement.
We design and build payment integrations with reconciliation, clearing accounts and exception queues as part of Enterprise Software. If finance in your company spends each morning explaining a difference, contact us.
Summary
Gateway payments produce three records that differ by timing and fees: invoices, gateway reports and the bank statement. Give every payment request a unique reference, record payments as their own objects, verify notifications and poll for missed ones, book fees separately, and use a clearing account. Match invoice to transaction and settlement to bank. Plan for wrong amounts, duplicates, late and unmatched payments with an unallocated queue cleared daily, and give finance one morning screen where every difference should be zero.
Frequently asked questions
Why do payments received through a gateway not match the bank statement?
Because the gateway usually pays out in batches, net of its fees, some time after the customer paid. One bank credit may contain dozens of customer payments minus fees and refunds. Matching invoices to the bank statement directly is therefore impossible. The gateway's settlement report is the bridge between the two.
What is the difference between a static and a dynamic virtual account?
A dynamic, or closed, virtual account is created for one invoice with a fixed amount and usually an expiry time, so a payment to it identifies the invoice exactly. A static, or open, virtual account belongs to a customer permanently and accepts any amount, which is convenient for regular customers and requires rules for allocating each payment to invoices.
Should a system mark an invoice as paid when the customer shows a transfer receipt?
No. An image or a customer's message is not evidence that money arrived. The invoice should be marked paid only on a verified notification from the payment provider or on the bank record itself. Screenshots are easily edited, and relying on them is a common source of loss.
Related service
Website Development
Fast, SEO-ready websites that turn visitors into customers.
