Wallets
Balances, reserves and holds per account and currency. Funding, payouts and settlement all change a wallet through the ledger, so available and reserved amounts stay consistent with what has actually been recorded.
Wallet & Ledger Production
Wallets give your product a financial position it can show and act on. The ledger is where that position comes from. Every balance is derived from recorded entries, so it can always be explained.
Problem
Many products keep a balance column and update it whenever something happens. It works until two updates race, a webhook arrives twice, a refund lands after a payout, or a provider settles less than expected. Then the number is wrong, and nothing in the system can say why.
Principle
Financial events → Ledger entries → Authoritative balance.
What a customer, merchant or seller holds, what is available, and what is reserved. It is what your product displays and what your rules check before value moves.
A double-entry record of every financial event. The ledger is not a report generated afterwards. Wallet balances are read from it, never written around it.
How it works
Balances, reserves and holds per account and currency. Funding, payouts and settlement all change a wallet through the ledger, so available and reserved amounts stay consistent with what has actually been recorded.
Double-entry: every movement has a source and a destination, posted as a balanced journal. Posted amounts are not edited; refunds and reversals are new inverse entries that reference the original payment.
Capture, refund, reversal, fee and adjustment are distinct financial events with their own entries. A refund does not delete a payment; it records a new movement linked to the original.
Internal balances and external rails in one model. Value held with a provider or bank and value moving between internal wallets are recorded separately, so you can tell what is in transit from what has settled.
Architecture
Ledger entries are produced by governed financial execution, not by arbitrary writes from product code. That is what makes a balance explainable: each entry points back to the operation that produced it, and that operation has its own Proof of Record.
An entry that does not balance is rejected. Value is never created or lost inside the ledger.
Available and reserved amounts are computed from entries, not maintained as a separate number.
A duplicate request or repeated provider notification maps to the same operation, not a second entry.
What the ledger does not do: it does not hold funds. Orangepill records financial positions and ledger state. Funds themselves remain with the banks, providers, custodians, or other licensed institutions used by the program. Comparing the ledger with what those external systems report is the job of verification and Resolve.
Examples
The balance increases when the deposit is confirmed, not when the customer clicks pay.
The applied amount moves from available to reserved, so it cannot be spent twice while the payment is in flight.
A seller balance is the sum of what happened to their orders, and it can be itemised.
Nothing is deleted. The correction is its own event, linked to the original.
Adoption
Most teams already run a general ledger for accounting. The runtime ledger is not a replacement for it. It records the operational financial state your product acts on as operations execute. How the two connect is worked out during technical evaluation.
For developers
The v4 API is described by an OpenAPI contract. Start with the quickstart, then the parts that matter in production: errors, webhooks and the sandbox.
We will trace the events behind it and show how the ledger would record them.