# Payment Flow Architecture

> Architect money-safe payments: represent money as integer minor units + currency (never floats), keep a double-entry append-only ledger as source of truth (the PSP is an integration you reconcile against), design a money-event model, and reconcile continuously.

- Skill: `mcorbett51090/payment-flow-architecture` (Agent Skill)
- Install (CLI): `npx get-skill add mcorbett51090/payment-flow-architecture`
- Raw SKILL.md: https://api.skillmd.com/api/skills/mcorbett51090/payment-flow-architecture/raw
- Safety review: pending (external: skill-scanner PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: mcorbett51090 (https://skillmd.com/u/mcorbett51090)
- Updated: 2026-11-19
- Page: https://skillmd.com/skills/mcorbett51090/payment-flow-architecture

---


# Payment Flow Architecture

## Money = integers
Integer **minor units** (cents) + currency code. Never floats — float money = rounding-error disputes.

## Double-entry ledger = source of truth
Every movement = balanced **debits/credits** in an **append-only** ledger you own. The PSP is an integration you **reconcile** against, not your books.

## Reconcile continuously
Match ledger to PSP (payouts/fees/disputes); a discrepancy is a bug or fraud, not rounding. Unreconciled = mystery money.

## Hand off
Money events here; revenue recognition/GL -> `finance`; regulation -> `regulatory-compliance`.

