Good morning, Priya
What should we work on today?
Describe a task…
Wiki
Explore your repositories, one page at a time.
Search repositories…
Generate
Open wiki
Open wiki
Generate
Open wiki
All repositories
acme/payments-service
Generated Oct 23, 2026
Search payments-service wiki...
Scheduled refresh: Off
Refresh
Wiki contents
Overview
Architecture
Payment flow
Retry and backoff
Gateway rate limits
Data model
API reference
Background jobs
Testing
Deployment
Glossary
Overview
payments-service accepts checkout requests, charges cards through an external gateway, and records the result. It is a TypeScript service built on Fastify with a PostgreSQL store src/server.ts:12-48.
Main components
Component
Responsibility
Checkout API
Validates requests and starts a charge src/api/checkout.ts:20-96
Gateway client
Talks to the card gateway with retries src/gateway/client.ts:1-140
Ledger
Writes charge results and refunds src/ledger/store.ts:8-77
Request flow
Payment flow
A checkout request moves through validation, authorization, capture, and ledger write. Each step is idempotent on the checkout id src/api/checkout.ts:31-44. Failures after authorization trigger a void, see Retry and backoff.
Steps
Step
Where
Validate
src/api/checkout.ts:20-30
Authorize
src/gateway/client.ts:52-88
Capture
src/gateway/client.ts:90-121
Record
src/ledger/store.ts:30-61