Skip to main content

Bill8:Ledger — Business Requirements & Functionality

Audience: product owners, business analysts, and anyone evaluating what Bill8:Ledger does for the business. For architecture read README.md; for wire-level detail read DESIGN.md.

1. Business Purpose​

Bill8:Ledger is the single authority for money positions. It delivers:

  • Truthful balances — every movement is a double-entry balance transaction that nets to zero, so the books can never drift.
  • Marketplace money movement — payouts and transfers move funds between balances and external accounts with a provable fee model.

2. Business Scope (What the Service Provides)​

#CapabilityWhat the business gets
1AccountsInternal ledger accounts
2BalancesNamed money positions (available, pending, reserved, fee)
3Balance transactionsAppend-only double-entry movements
4PayoutsWithdrawals to external accounts
5TransfersInternal movements between connected accounts
6FeesConfigured fee model applied as explicit transactions

What the service does NOT own (business boundary):

Out of scopeOwned by
Payment orchestrationBill8:Payments
BillingBill8:Billing
Connected-account lifecycleBill8:Merchants

3. Business Capabilities​

CapabilityBusiness rule
Post a movementA batch nets to zero before any write
Pay out fundsA payout moves available balance to an external account
Transfer fundsAn internal transfer reallocates balance between accounts

4. Business Events (Outbound)​

EventFires when
account:createdAn account is created
balance:updatedA balance changes
balance_transaction:createdA movement is posted
payout:created/updatedA payout lifecycle changes
transfer:createdA transfer is created
fee:updatedThe fee model changes

5. Business Rules & Invariants​

  1. Every movement nets to zero (double-entry).
  2. Balance transactions are append-only.
  3. Only the ledger writes balances.
  4. A payout cannot exceed available balance.

6. Target-User Roles & Use Cases​

PersonaDoes
MerchantView balances, initiate payouts
Platform operatorOversee money movement, configure fees

7. KPIs / Success Criteria​

KPIMeasure
Book integrityzero imbalanced batches committed
Payout successpaid / attempted

8. Dependencies & Reliance on Other Services​

RelianceOn
IdentitySentin8:Auth
Event transportSentin8:Bus

9. Acceptance Criteria​

  1. A movement that does not net to zero is rejected before any write.
  2. A payout exceeding available balance is rejected.
  3. A retried posting is idempotent.

10. Open Business Questions​

  • Multi-currency settlement is deferred (see backlog.md).

Design attribution: bill8:ledger and its underlying concepts were designed by Hamid Jahanzad Hamid@Jahanzad.com.