Embedded Accounting for Neobanks: From Transaction Feed to Trustworthy Books

How a neobank serving SMBs turns a payout with a fee into a balanced journal, reconciles it against the invoice, and gives every business customer its own isolated books.

Paprel Product Team
7 min read
A stream of bank transactions becomes two organized stacks of journal records

A neobank already has the transaction feed. What its SMB customers lack is books: a receivable that clears when the money lands, a fee that shows up as an expense, and a trial balance their accountant will sign off. Embedded accounting is the layer that turns the feed into those books, one isolated company per business customer.

This post walks the mechanics with Paprel: provisioning a company per customer, recording a payout that arrives net of a fee, and reconciling it. Every endpoint and field is in the API reference; IDs in angle brackets are placeholders.

A Balance Is Not a Book

Your ledger knows that 970.00 arrived in Kopi Kampung's account on Tuesday. Kopi Kampung's books need to know more:

  • it settles invoice INV-0042 for 1,000.00, so the receivable must close in full;
  • the 30.00 gap is a processor fee, an expense, not an unpaid balance;
  • the invoice, the payment and the bank line must be linked so an accountant can trace any one to the others.

A transaction feed holds none of that. A double-entry ledger per customer does.

One SMB Customer = One Company

In Paprel a company is the tenant boundary: its own ledger, document numbering and seeded chart of accounts. A neobank provisions one per business customer from its backend through the Partner API.

Get a partner token (POST /v1/partner/token), then create companies, up to 100 per call:

Shell
curl -X POST https://api.paprel.com/v1/partner/companies \
  -H 'Authorization: Bearer <partner token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "companies": [{
      "external_company_id": "merchant-0001",
      "company_name": "Kopi Kampung Sdn Bhd",
      "country": "MY",
      "currency": "MYR",
      "locale": "en-MY",
      "timezone": "Asia/Kuala_Lumpur",
      "owner": { "external_user_id": "user-0001", "email": "owner@example.com", "name": "Aisyah Rahman" }
    }]
  }'

Your external_company_id and external_user_id are the idempotency keys. If onboarding retries after a timeout, the same item returns outcome: "existing" with the same ids. Different data for an id that already exists returns 409 for that item and never overwrites the company. Provisioning covers users and roles.

To act inside the company, mint a session with POST /v1/partner/companies/{company_id}/sessions. A session is an App Connect token, so everything below is the ordinary Public API, called with authorization: Bearer <session token> and x-partner-domain (shown as $AUTH and $PARTNER, as in the 20-minute guide).

Worked Example: A Payout with a Fee

Kopi Kampung invoiced a buyer 1,000.00. The buyer paid through a card processor, which paid out 970.00 and kept 30.00. Record the payment against the invoice with the fee in bank_charge:

Shell
curl -X POST $BASE/v1/invoices/<invoice anchor_id>/payment \
  -H "$AUTH" -H "$PARTNER" -H "$CT" \
  -H "Idempotency-Key: payout-po_8831-inv-0042" \
  -d '{
    "payment_amount": "970.00",
    "bank_charge": "30.00",
    "payment_date": "2026-10-28",
    "payment_mode": "<payment mode id>",
    "deposit_account": "<operating bank account id>",
    "reference_number": "po_8831"
  }'

The payment amount plus the charge, 1,000.00, is applied to the invoice, so it closes in full. The resulting journal balances:

AccountDebitCredit
Operating Bank970.00
Bank charges (expense)30.00
Accounts Receivable1,000.00

Account names here are illustrative. Read the actual lines back with GET /v1/accounting/journals/for-entity?entity_type=invoice&entity_id=<invoice id>.

The Idempotency-Key matters because payout processing retries. Repeat the call with the same key and the same body, and Paprel returns the payment it already recorded. The same key with a different body returns 409. This guarantee covers payments, not journals: a directly posted journal is not deduplicated, so check the ledger before retrying one. Webhooks and idempotency has the full list.

The same pattern appears in SaaS billing to accounting, where a gateway fee is recorded on the payment call.

Reconciling the Bank Line

When the books hold bank transactions as well as documents, the match is a three-step flow on /v1/accounting/transactions:

  1. Find candidates. POST /v1/accounting/transactions/find-group-match takes the selected bank transactions and returns bounded suggestions from their remaining balances. Pass a match_policy_id to use one of your configured match policies (GET /v1/accounting/match-policies). This is discovery only; it creates nothing.
  2. Preview the settlement. POST /v1/accounting/transactions/settlement-preview takes the target entity, entity_id and selections (each with transaction_id, and optionally bank_amount, document_amount, bank_charge, settlement_rate). It returns estimated FX conversion, explicit bank and document allocations, fees, remaining balances and projected realised FX. It is an estimate, not a settlement.
  3. Confirm. POST /v1/accounting/transactions/confirm-match takes currency, entity and a mapping of explicit amounts. It allocates atomically, revalidates current balances, and never silently recalculates amounts. Exact retries are idempotent; a changed allocation payload returns a conflict.

A wrong match can be undone with POST /v1/accounting/transactions/revert. Statement reconciliation is a separate step (/v1/accounting/reconciliations), with an embeddable reconciliation component if you don't want to build that screen.

One thing to settle early: how your transaction data reaches each company's books. Paprel documents no bank-feed or aggregator connector, and the public API lists bank transactions (GET /v1/accounting/transactions) rather than importing them. Put that question on the agenda for your integration review.

What to Evaluate in an Embedded Accounting Layer

QuestionHow to check it on Paprel
Do payments, fees and reversals have a balanced accounting path?Record a payment with bank_charge in the sandbox; read the journal back
Is matching explainable and reversible?settlement-preview before confirm-match; revert after
Is each customer's data isolated?One company per customer; tokens are minted for one company
Do reports come from the same records?Trial balance, P&L and balance sheet are derived live from journal lines
Can operators, finance staff and outside accountants have different access?Custom roles per company via POST /v1/acl/role

Where Paprel Fits

Paprel gives a neobank the ledger and accounting workflows underneath its SMB product: a company per customer through the Partner API, documents and payments that post balanced journals, configurable matching, and reports derived from the same records. Delivery is headless API under your brand, a hosted workspace, or @paprel/embed-* Web Components for banking, transactions, reconciliation and reports. Invoices and bills are API-first.

To try the invoice and payment loop end to end, run the 20-minute build in the sandbox.

See embedded accounting for fintech →

Weighing whether to build this yourself? Run the numbers in build vs buy.

Posted by: Paprel Product Team · Product & Platform Integration Review
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