Designing a Billing Microservice for an AI SaaS Platform
From zero to a production-ready billing domain: subscriptions, credits, Stripe integration, domain events, and failure-safe webhook handling.
Overview
Built the billing backbone for an AI SaaS platform, designing how usage, plans, credits, and payment events interact without tightly coupling the product to Stripe-specific workflows.
Problem
The main problem was keeping billing reliable while still supporting frequent product changes, usage-based pricing, and webhook-driven updates from external systems.
Approach
Modeled billing as its own domain, introduced domain events around payments and subscription state, and made webhook processing idempotent and failure-tolerant.
Outcomes
- Supported subscription and credit-based monetization.
- Separated billing concerns from product logic.
- Reduced the blast radius of payment webhook failures.
More selected work
Automating Banking Operations at Scale
Built backend systems for onboarding, identity verification, compliance reporting, and internal automation in a European digital bank.
Building Document Automation Systems for Fintech
Implemented systems for parsing financial documents, integrating external portals, and turning unstructured data into usable product workflows.