One-to-one matching is easy: one bank line, one invoice, same amount, confirm. Production reconciliation is everything else. A payout covers twelve invoices. A customer pays half. The processor keeps a fee. A EUR invoice settles into a USD account. A match was wrong and has to come undone after the statement closed.
This post walks through each of those cases with the Paprel call that handles it, then shows the two Web Components that put the same workflow inside your product. Paths are relative to the API base, and every request sends authorization: Bearer <token> and x-partner-domain (Authentication and tokens). Full schemas are in the API reference.
The Model: Discover, Preview, Confirm, Close
Paprel splits reconciliation into separate steps so that nothing posts by accident:
| Step | Call | Writes anything? |
|---|---|---|
| Find candidates | POST /v1/accounting/transactions/find-group-match | No. Discovery only. |
| Preview the settlement | POST /v1/accounting/transactions/settlement-preview | No. Estimates only. |
| Confirm the match | POST /v1/accounting/transactions/confirm-match | Yes. Allocates atomically. |
| Close the statement | POST /v1/accounting/reconciliations, then PUT …/{reconciliation_id}/save | Yes. |
Matching a transaction and reconciling a statement are separate operations. You can confirm matches all month and close the statement once.
Bank transactions are listed with GET /v1/accounting/transactions and read one at a time with GET /v1/accounting/transactions/{transaction_id}.
Grouped Matches: One Deposit, Many Invoices
A marketplace payout or a customer's batch payment arrives as one bank line covering several open documents. Ask for candidates first:
curl -X POST $BASE/v1/accounting/transactions/find-group-match \
-H "$AUTH" -H "$PARTNER" -H "$CT" \
-d '{
"transactions": ["<bank transaction id>"],
"selection": "…",
"match_policy_id": "<optional policy id>"
}'
The spec describes this as a discovery operation. It returns bounded suggestions based on the transactions' remaining balances, and it does not create allocations, payments or statement reconciliations. Your UI shows the suggestions and a person picks the set. Nothing has touched the ledger yet. The selection values are listed in the API reference.
Fees, FX and Partial Payments: Preview, Then Confirm Explicit Amounts
These three cases share one rule: you state the amounts, and Paprel validates them. Paprel never infers a settlement and never silently recalculates one.
Preview
curl -X POST $BASE/v1/accounting/transactions/settlement-preview \
-H "$AUTH" -H "$PARTNER" -H "$CT" \
-d '{
"entity": "…",
"entity_id": "<invoice anchor_id>",
"selections": [
{
"transaction_id": "<bank transaction id>",
"bank_amount": "970.00",
"bank_charge": "30.00",
"document_amount": "1000.00"
}
]
}'
The preview returns estimated FX conversion, explicit bank and document allocations, fees, remaining balances and projected realised FX. Each selection can carry:
bank_chargefor a fee withheld from the payment. The payment amount plus the charge is applied to the document, so a $1,000 invoice paid as $970 net of a $30 fee settles in full.settlement_ratefor cross-currency settlement: one document-currency unit in bank currency.bank_amount/document_amountfor partial settlement. Allocate less than the full amount and the remainder stays open on the document and the bank line.
A preview establishes nothing. It is a calculation you show the user.
Confirm
Send the amounts the user accepted, taken from the preview response. Illustrative values:
curl -X POST $BASE/v1/accounting/transactions/confirm-match \
-H "$AUTH" -H "$PARTNER" -H "$CT" \
-d '{
"currency": "USD",
"entity": "…",
"mapping": [
{
"transaction_id": "<bank transaction id>",
"entity_id": "<invoice anchor_id>",
"amount": "970.00",
"bank_charge": "30.00",
"currency": "USD",
"exchange_rate": "1",
"original_amount": "1000.00",
"original_currency": "USD"
}
]
}'
What the spec guarantees about this call:
- Atomic. The selected bank transactions are allocated to one ledger entity together, or not at all.
- Explicit.
amountis in bank currency, positive, and within the transaction's remaining balance.original_amountis the confirmed settlement in document currency. Paprel revalidates current balances at confirm time rather than trusting the preview. - Strict on rates.
exchange_rate(bank currency to company base currency) must match the bank transaction's rate, and document matches are validated against the document's original amounts and the bank transaction's settlement rate. - Idempotent on exact retry. Send the identical payload again after a timeout and you get the same result. Change the allocation and you get a conflict instead of a second match.
The entity values and the full error list are in the API reference.
Reversals: Revert, Exclude, Restore
Mistakes and noise each have their own call. Nothing is deleted.
| Situation | Call | Effect |
|---|---|---|
| A confirmed match was wrong | POST /v1/accounting/transactions/revert | Disconnects the bank transaction from its linked invoices, bills or journal entries, resets is_reconciled to false, and returns it to the unmatched queue. |
| A line isn't business activity, or is a duplicate | POST /v1/accounting/transactions/exclude | Marks it ignored and removes it from reconciliation queues and reports. Requires a reason. |
| An exclusion was a mistake | POST /v1/accounting/transactions/restore | Puts the line back in the active queue and in reporting. |
Each takes a transactions array of up to 50 ids. The mandatory reason on exclude matters most to an auditor: every bypassed bank line carries a written explanation.
Closing the Statement
Once the month's lines are matched, reconcile the account against the bank statement:
curl -X POST $BASE/v1/accounting/reconciliations \
-H "$AUTH" -H "$PARTNER" -H "$CT" \
-d '{
"account": "<bank account id>",
"start_date": "2026-09-01",
"end_date": "2026-09-30",
"opening_balance": "12500.00",
"closing_balance": "18240.55"
}'
The record compares the statement balance with the book balance Paprel calculates, and reports the diff. Then:
PUT /v1/accounting/reconciliations/{reconciliation_id}/savewithstatus: "draft"saves progress.status: "completed"finalizes it and generates the journal entries needed to bridge any discrepancy. Re-saving recalculates the difference and updates those linked journals.PUT /v1/accounting/reconciliations/{reconciliation_id}/voidwith a requirednotevoids a finalized reconciliation and reopens its bank transactions for editing. The spec says it may also reverse linked journal adjustments. The voided record stays in history.
Reconciliations need the accounting:banking-transaction-reconcile permission (or role:admin). Give that permission to the people who close books, not to everyone who can categorize a transaction.
Match Policies, Not Magic
Suggestions come from a deterministic engine driven by configurable match policies:
GET /v1/accounting/match-policieslists the company's policies and which one is the default.PUT /v1/accounting/match-policies/defaultsets the default (default_policy_id).find-group-matchaccepts amatch_policy_idto override the default for one request.
A policy's config turns signals on or off and weights them. The signals include amount, date, currency, reference, description and counterparty alignment. A platform serving lenders can weight references heavily. One serving tradespeople can lean on counterparty and amount. The engine doesn't learn from past matches. If you want different behaviour, you change the policy, and you can see exactly what changed.
Embed It
@paprel/embed-accounting ships the review screens, so you don't have to build them from these calls yourself. The match sheet handles suggested matching for one transaction. The reconciliation detail handles review, finalize and void:
<paprel-transaction-match-sheet transaction-id="TRANSACTION_ID"></paprel-transaction-match-sheet>
<paprel-reconciliation-detail
reconciliation-id="RECONCILIATION_ID"
currency="USD"
></paprel-reconciliation-detail>
The match sheet emits transaction-matched. The detail emits reconciliation-finalized and reconciliation-voided. Both expose refresh(). Pair them with paprel-transaction-inbox and paprel-reconciliation-list / paprel-reconciliation-form for the full queue. Attributes and events are documented in Transaction components and Reconciliation components. Setup through your backend-for-frontend is in Get started.
What to Ask Any Vendor
Run these against Paprel or anyone else:
- Can I preview a fee-net, cross-currency, partial settlement before anything posts?
- If I retry a confirm after a timeout, do I get one match or two?
- Can a wrong match be reverted after the fact, and does the history show it?
- Does excluding a bank line require a reason?
- Can I see and change the rules behind a suggested match?
- Is closing a statement separate from matching, and can a closed reconciliation be voided with a note?
Read Next
- For how payments and fees post before they reach the bank, read Invoice and Expense Workflows That Post Themselves.
- For keeping your systems in step with ledger changes, read Paprel Webhooks for Reliable Accounting Workflows.
- For the AR and AP subledgers that matching settles against, read Why Subledgers Matter in Embedded Accounting.
- For mounting the components end to end, read How to Embed Paprel Accounting UI in Your App.
See how reconciliation fits the rest of the product on banking and reconciliation.
