All Blueprints
E-commercecomplex complexity
Payment Processing Pipeline
Reference architecture for payment processing - checkout, webhooks, reconciliation, refunds, and accounting integration.
Architecture
System Components
Key building blocks of this architecture, layered from infrastructure up
01
Checkout Service
PCI-conscious checkout with hosted fields and 3DS support - see Stripe vs Adyen.
Stripe ElementsAdyen Drop-in3DS
02
Webhook Pipeline
Reliable webhook ingestion with retries and dead-letter queues.
WebhooksQueueIdempotency Keys
03
Order State Machine
Explicit lifecycle for orders, payments, and refunds.
XStatePostgreSQLAudit Logs
04
Reconciliation Service
Match provider payouts against internal ledger.
CronLedgerBigQuery
05
Accounting Sync
Push invoices and payouts to QuickBooks or NetSuite.
QuickBooks APINetSuiteXero
06
Fraud Hooks
Pre-auth fraud screening - see the fraud detection blueprint.
Stripe RadarSiftCustom Rules
Planning
Key Considerations
Important factors to keep in mind when implementing this architecture
Treat webhooks as authoritative - never trust client-side success
Idempotency is non-negotiable - every retry must be safe
Build reconciliation reports from day one - the bug you don't catch is the expensive one
Need a payments partner? Start a project.
Options
Alternatives to Consider
Other approaches that might fit your specific needs
Lago or Orb for managed billing/metering
Maxio (formerly Chargify/SaaSOptics) for SaaS billing
Direct acquirer integration for very high volume
Need help implementing this architecture?
I can help you adapt this blueprint to your specific requirements and guide implementation from planning through production deployment.
Discuss Your ProjectE-commerce
Related Architectures
Other blueprints in this category