Bank Reconciliation for Embedded Accounting: Grouped, Partial and FX Matches Done Right

The API calls behind grouped deposits, fee-net and cross-currency settlements, reversals and statement close, plus the Web Components that embed them.

Paprel Engineering Team
9 min read
Bank-statement slips and ledger records meet through an olive matching ring

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:

StepCallWrites anything?
Find candidatesPOST /v1/accounting/transactions/find-group-matchNo. Discovery only.
Preview the settlementPOST /v1/accounting/transactions/settlement-previewNo. Estimates only.
Confirm the matchPOST /v1/accounting/transactions/confirm-matchYes. Allocates atomically.
Close the statementPOST /v1/accounting/reconciliations, then PUT …/{reconciliation_id}/saveYes.

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:

Shell
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

Shell
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_charge for 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_rate for cross-currency settlement: one document-currency unit in bank currency.
  • bank_amount / document_amount for 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:

Shell
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. amount is in bank currency, positive, and within the transaction's remaining balance. original_amount is 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.

SituationCallEffect
A confirmed match was wrongPOST /v1/accounting/transactions/revertDisconnects 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 duplicatePOST /v1/accounting/transactions/excludeMarks it ignored and removes it from reconciliation queues and reports. Requires a reason.
An exclusion was a mistakePOST /v1/accounting/transactions/restorePuts 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:

Shell
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}/save with status: "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}/void with a required note voids 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-policies lists the company's policies and which one is the default.
  • PUT /v1/accounting/match-policies/default sets the default (default_policy_id).
  • find-group-match accepts a match_policy_id to 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:

HTML
<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:

  1. Can I preview a fee-net, cross-currency, partial settlement before anything posts?
  2. If I retry a confirm after a timeout, do I get one match or two?
  3. Can a wrong match be reverted after the fact, and does the history show it?
  4. Does excluding a bank line require a reason?
  5. Can I see and change the rules behind a suggested match?
  6. Is closing a statement separate from matching, and can a closed reconciliation be voided with a note?
Try matching in the sandbox →

See how reconciliation fits the rest of the product on banking and reconciliation.

Posted by: Paprel Engineering Team · Engineering
Posted on: (Updated: October 29, 2026)
Evaluate Paprel

Build in sandbox, launch with a production trial

Use sandbox for developer testing with no billing. When you are ready for real workflows, start production on a monthly plan with a 14-day free trial.

API-First Delivery
Audit-Ready Controls
Sandbox And Guided Rollout