Case study
Distributed payment processing platform
A distributed payment platform on AWS with event-driven microservices, the Saga and Outbox patterns, and idempotent APIs. Built and shipped.
Built and shippedThe problem
What needed solving
A payments business needed one platform to run initiation, authorization, capture, refunds, settlement and reconciliation across several payment providers. It could never double-charge a customer or lose an event.
What I did
How I approached it
- Designed the platform as independent microservices for initiation, authorization, transaction processing, refunds, settlement and reconciliation.
- Implemented the Saga pattern for distributed transactions, with compensating actions when a step fails.
- Implemented idempotent payment APIs, so client retries, network failures and redelivered messages never cause a duplicate charge.
- Used the Outbox pattern to keep database changes and published events in step.
- Built the event flows on EventBridge, SNS, SQS and Lambda, with retries, exponential backoff and dead-letter queues.
- Modelled the transaction lifecycle: initiated, authorized, captured, settled, failed and refunded.
- Put each provider's gateway API behind one internal contract, so adding a provider doesn't touch core services.
- Built reconciliation that flags mismatches between internal records and provider data, with automated recovery.
- Secured external APIs with API Gateway: validation, authentication, authorization, throttling and routing.
- Set up CI/CD, plus CloudWatch tracing, latency and payment metrics.
- Ran design reviews, set technical standards and guided the team on distributed-systems work.
Tech stack
Built with
- Node.js
- TypeScript
- Python
- FastAPI
- API Gateway
- Lambda
- EventBridge
- SNS
- SQS
- ECS Fargate
- CloudWatch
- IAM
Let's build something
Have a product to build or a system to scale? I'd like to hear about it.