Skip to main content

Bill8:Payments — Business Requirements & Functionality

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

1. Business Purpose​

Bill8:Payments is the system of record for payment acceptance. It delivers:

  • Frictionless acceptance — merchants accept one-off payments with a customer and payment-method abstraction, no card-handling code.
  • Rail choice — every merchant selects the settlement channels that fit their business: the platform's own finance rails, external acquirers/payment platforms, or direct bank connections. Channels are selectable and combinable per merchant with declarative routing by cost, payment method, and geography — and new channels onboard without re-engineering the platform.
  • Provable charge integrity — every charge is recorded immutably; refunds and disputes are compensating records, so the audit trail is always replayable.
  • Safe retries — idempotent APIs make a retried request harmless, so a dropped response never double-charges a customer.
  • Marketplace splits — a single charge can split to a connected seller with an explicit platform fee, in one atomic operation.

2. Business Scope (What the Service Provides)​

#CapabilityWhat the business gets
1CustomersCustomer registry linked to platform identity
2Payment methodsSaved instruments (secret-by-reference)
3Payment intentsIntent-to-pay with amount/currency/status
4ChargesImmutable money captures with a lifecycle
5RefundsBounded compensating records
6DisputesChallenges with evidence and clawback
7Setup intentsSave a method for later use
8TokensSingle-use references for card data (client-side collectable)
9Settlement channelsSelectable rails — platform finance, external acquirers/platforms, bank rails — with per-merchant selection, declarative routing, and reconciliation
10Test modeDeterministic simulated instruments so integrators build against safe, predictable outcomes

What the service does NOT own (business boundary):

Out of scopeOwned by
Money movement / balancesBill8:Ledger
Recurring billingBill8:Billing
Hosted checkout UIBill8:Checkout
Connected accountsBill8:Merchants
Fraud rulesBill8:Risk
Event deliveryBill8:Webhooks

3. Business Capabilities​

CapabilityBusiness rule
Charge a customerA charge routes through a selected channel and moves money through the ledger; it is recorded immutably
Choose railsA merchant selects a default channel and can route by cost, method, and geography; channels onboard without platform changes
Refund a chargeA refund reverses a charge, bounded by the remaining refundable amount
Dispute a chargeA dispute challenges a charge and can claw back funds
Retry safelyA retried request is idempotent — never double-moves money
Split a chargeA destination charge splits to a seller with an explicit platform fee, atomically
Build in test modeIntegrators use deterministic test instruments; test traffic can never reach live rails

4. Business Events (Outbound)​

EventFires when
customer:created/updated/deletedCustomer lifecycle changes
payment_method:created/updatedPayment method changes
intent:created/updatedIntent lifecycle changes
charge:succeeded/failedA charge reaches a terminal state
refund:created/updatedA refund is created/updated
dispute:created/updated/closedA dispute lifecycle changes

5. Business Rules & Invariants​

  1. Charges are append-only — never mutated.
  2. A refund can never exceed the remaining refundable amount.
  3. Money is only moved through Bill8:Ledger.
  4. Terminal states never regress.
  5. Every lifecycle change emits an event.

6. Target-User Roles & Use Cases​

PersonaDoes
MerchantAccept payments, issue refunds, view charges
CustomerPay via hosted checkout
Platform operatorOversee charge/refund activity

7. KPIs / Success Criteria​

KPIMeasure
Charge success ratesucceeded / attempted
Refund integrityzero over-refunds, zero double-refunds
Idempotencyretried requests never double-move money

8. Dependencies & Reliance on Other Services​

RelianceOn
Money movementBill8:Ledger
Fraud screeningBill8:Risk
IdentitySentin8:Auth
Event transportSentin8:Bus

9. Acceptance Criteria​

  1. A merchant can charge a customer end-to-end with money recorded in the ledger.
  2. A refund fully reverses a charge and cannot be double-executed.
  3. A retried request is idempotent.

10. Open Business Questions​

  • Card-network certification is external by design (see backlog.md).

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