A microservices payment gateway with API keys, webhooks, KYC and notifications
- Role
- Full-stack engineer
- Year
- 2025
- Status
- In development
- Links
- Private
- Merchant dashboard
- Gateway service
- Auth · KYC
- Payments
- Webhooks · notifications
- PostgreSQL · Redis
Payment
A payment gateway built as NestJS microservices for Guba Technology: authentication with JWTs for the dashboard, API keys for integrations and short-lived keys for webhooks; payments, KYC, notifications and a gateway service; orchestrated with Docker Swarm.
The problem
Merchants need a single, secure way to accept payments, receive reliable webhooks and pass KYC, with clear separation between dashboard users and machine integrations.
Approach
I split the system into services with their own responsibilities and three distinct credentials: JWTs for people, long-lived API keys for integrations, and single-use temporary keys for webhooks.
Architecture
NestJS microservices (auth, gateway, KYC, payments, notifications) with Prisma and PostgreSQL, Redis and BullMQ for queues, and MinIO for documents, communicating over REST and queues. It runs on Docker Compose locally and Docker Swarm in production, with CI/CD on GitHub Actions.
Features
- Three credential types: JWT, API keys and single-use webhook keys
- Payments service with transaction storage
- KYC service with document storage
- Queued notifications by email and SMS
- Docker Swarm deployment with CI/CD
Stack
NestJS, TypeScript, Prisma, PostgreSQL, Redis, BullMQ, MinIO, React, Docker Swarm, GitHub Actions
Results
- Microservices for auth, gateway, KYC, payments and notifications in place
“Credentials are architecture. Deciding up front who and what can call each service kept the services small and the security story simple.”