Payments architecture
A payments platform is a system whose first job is to never lose or duplicate money. Everything else, including speed, cost and features, comes after that. Most organizations don’t build a payment network. They connect to several existing ones, called rails, and the architecture is about choosing the right rail for each payment, recording every movement in a ledger, and proving afterwards that the ledger matches the bank.
This page covers the three rails most U.S. businesses deal with: ACH, card networks and instant payments.
Diagram
Section titled “Diagram”- An app asks to move money, with an idempotency key so a retry can't pay twice.
- The router checks risk, then picks a rail by amount, urgency, cost and the rail's limits.
- The payment goes out on ACH, a card network or an instant rail.
- Settlement and return files come back and are matched against the ledger every day.
The rails at a glance
Section titled “The rails at a glance”| Rail | Speed | Can it be reversed? | Typical use | Watch out for |
|---|---|---|---|---|
| ACH | Same day or next day, in batches | Yes: returns are allowed within set windows | Payroll, bill pay, loan disbursements and repayments, B2B | Returns can arrive days later. Your system must handle money “coming back” |
| Card networks | Authorized in seconds, settled later | Yes: chargebacks, sometimes months later | Consumer checkout | Interchange fees, PCI DSS scope, disputes |
| Instant payments (FedNow, RTP) | Seconds, 24/7/365 | No: final once sent | Urgent payouts, account-to-account transfers | No undo, so fraud checks must happen before sending |
Some current facts worth knowing:
- Same Day ACH has allowed up to $1 million per payment since March 2022. Nacha members approved raising it to $10 million per payment, effective September 17, 2027. (Nacha (opens in a new tab))
- Nacha notes that RTP raised its per-payment limit to $10 million in June 2025 and FedNow did the same in November 2025. (Nacha (opens in a new tab))
- The Federal Reserve’s FedNow Service launched in July 2023. The Clearing House’s RTP network has run since 2017. (FedNow (opens in a new tab), RTP (opens in a new tab))
- For card data, PCI DSS v4.0.1 is the current standard. Its future-dated requirements became mandatory on March 31, 2025. (PCI SSC (opens in a new tab))
Limits and dates change. Check the rail operator before you design around a number.
How it works
Section titled “How it works”- One internal API, many rails. Product teams call one payments API. Only the routing layer knows about rails, so adding a rail doesn’t touch every product.
- Idempotency everywhere. Every request carries a key. A retried request returns the original result instead of paying twice. See idempotency.
- A double-entry ledger is the source of truth. Every movement is two entries that sum to zero, and entries are never edited, only reversed by new entries. Balances are computed from entries.
- States, not flags. A payment moves through explicit states (created, submitted, settled, returned, failed), and every transition is recorded with its reason.
- Asynchronous by nature. Most rails answer later through files or webhooks. The platform treats “sent” and “settled” as different events.
- Daily reconciliation. Bank statements, settlement reports and return files are matched against the ledger. Breaks are worked as cases, not ignored.
- Keep card data out. Use the processor’s hosted fields or tokens so raw card numbers never touch your servers. This shrinks PCI DSS scope dramatically.
- Rail independence: you can add or switch providers without rewriting products.
- Auditability: the ledger and state history answer “where is the money?” at any moment.
- Cost control: routing can send each payment on the cheapest rail that meets its deadline.
- Real complexity: returns, chargebacks, partial failures and cut-off times all need handling.
- Regulatory weight: Nacha rules, card network rules, PCI DSS and money-transmission licensing may all apply.
- Reconciliation never ends: it’s an operational function, not a one-time build.
When to use it
Section titled “When to use it”- Any business that moves money as part of its product: lenders, marketplaces, payroll, insurance, billing.
- When you use, or expect to use, more than one rail or provider.
When to avoid it
Section titled “When to avoid it”If you only take card payments for your own products, a payment service provider’s checkout is usually enough. Don’t build a ledger and router until you need more than one rail, payouts, or money held on behalf of others.
Common pitfalls
Section titled “Common pitfalls”- Storing balances as a number you update instead of deriving them from ledger entries.
- Treating “submitted” as “paid”. ACH returns and card chargebacks arrive later.
- Fraud checks after an instant payment. On instant rails there is no “after”.
- Floating-point money. Use integer minor units (cents) or a decimal type.
- Cut-off times hard-coded in many places instead of in one calendar service.
Related patterns
Section titled “Related patterns”- See it applied: Example Lending, how a lender funds loans over ACH
- Idempotency
- Event-driven architecture
- CQRS and event sourcing
- Lending and loan origination
- Scenario: reports never match
Glossary: idempotency, transactional outbox
Further reading
Section titled “Further reading”- Nacha, Increasing the Same Day ACH dollar limit to $10 million (opens in a new tab)
- Federal Reserve Financial Services, FedNow Service (opens in a new tab)
- The Clearing House, RTP network (opens in a new tab)
- PCI Security Standards Council, PCI DSS (opens in a new tab)
- Martin Fowler, Accounting patterns (opens in a new tab)
Written and edited by Abhinav Taduka, enterprise software architect.
New pages are added regularly. Follow Abhinav on LinkedIn to see them first.