Billing & Finance Enterprise Billing Engine
A complete billing platform — subscriptions, invoicing, usage metering, payment processing, and automated revenue collection. Integrated with Stripe for secure payment handling.
Full lifecycle control
Manage subscriptions from activation through cancellation. Monthly, quarterly, or annual billing frequencies with automatic plan changes, pausing, and dunning workflows.
Subscription States
Active
Billing in progress, services running
Paused
Temporarily halted — no invoices generated, services remain
Past Due
Payment failed repeatedly, entering dunning workflow
Cancelled
Terminated immediately or at period end
Expired
Natural end of subscription term
Initializes first billing period, schedules next invoice
Halts billing, services remain accessible
Restarts from paused state, recalculates next billing date
Change to higher plan — price adjustment immediate or at renewal
Change to lower plan — takes effect at next billing period
Immediate termination or scheduled at period end
Automated invoice lifecycle
From draft to paid — every invoice follows a deterministic lifecycle. Auto-generated numbers, itemized line items, tax calculations, discount application, and professional PDF export.
Each invoice includes subscription charges, usage charges, one-time fees, add-ons, percentage or fixed discounts, per-line-item tax rates with VAT/tax ID tracking, and full payment attempt history.
Stripe-powered, PCI compliant
Payments processed securely through Stripe. Credit cards with 3D Secure, SEPA and ACH direct debit, automatic retries, and real-time webhook processing with idempotent 24-hour deduplication.
Payment Flow
Visa, Mastercard, Amex with 3D Secure
EU bank transfers with mandate management
US bank transfers with verification
Failed payments retried with configurable logic
Metering & rating engine
Real-time resource consumption tracking across all provisioned services. Usage records collected continuously and aggregated per billing period with batch recording for high-volume ingestion.
Fixed price per billing period, regardless of usage
€100/month for unlimited storageSimple per-unit charge with optional free tier
€0.10/GB storage, first 100 GB freeVolume tiers with decreasing unit cost
0–100 GB: €1.00 · 100–500: €0.80 · 500+: €0.50Total volume determines the per-unit rate
Up to 100 GB: €1.00/GB (all units)Safe, auditable refund processing
Full and partial refunds with cumulative over-refund prevention. Credit notes auto-generated and applicable to future invoices. Every refund coordinates with the Order Service saga for resource deprovisioning when needed.
Customer Request
Standard refund initiated by customer
Duplicate Charge
Accidental double billing corrected
Service Issue
Product failure or outage compensation
Billing Error
Internal mistake corrected
Chargeback
Cardholder dispute via bank
Compensation
Goodwill credit for customer satisfaction
Always running, always idempotent
The billing scheduler runs continuously — generating invoices, processing cancellations, detecting past-due accounts, and cleaning up expired keys. Every cycle is idempotent. Safe to retry, never creates duplicates.
Find subscriptions due for billing, rate usage, create invoices
Execute scheduled end-of-period cancellations
Flag subscriptions with repeated payment failures
Purge expired idempotency keys
Real-time financial KPIs
MRR
Monthly Recurring Revenue — prorated from all active subscriptions
Revenue This Month
Sum of paid invoices in current calendar month
Outstanding Balance
Total unpaid invoices (pending + sent + overdue)
Payment Success Rate
Successful payment attempts / total attempts
Active Subscriptions
Count of currently active subscriptions
Overdue Count
Number of invoices past due date
Platform in sync, always
Billing events flow through Kafka to keep subscriptions, provisioning, notifications, and audit trails synchronized across the entire platform.
billing.invoice-generatedbilling.payment-receivedbilling.subscription-createdbilling.subscription-cancelledbilling.subscription-upgradedbilling.subscription-past-duebilling.refund-completedbilling.refund-failedbilling.usage-recordedAutomate your billing
Subscriptions, invoicing, usage metering, payment processing — fully automated, fully auditable, Stripe-integrated.
Common Questions
Subscriptions handle fixed recurring charges. Usage is metered separately and added as line items on the next invoice. Both coexist on a single invoice — the customer sees one clear bill with subscription charges and usage charges broken down.
Failed payments are retried automatically with configurable logic. After repeated failures, the subscription transitions to Past Due and enters the dunning workflow. Services remain active during dunning to give customers time to resolve payment issues.
Yes. Pricing rules have effective date ranges. When you change pricing, it applies only to future billing periods. Active subscriptions continue at their current rate until renewal, upgrade, or explicit price change.
Refunds are validated against invoice totals with cumulative over-refund prevention. Once approved, Stripe processes the refund, a credit note is generated, and a billing.refund-completed event coordinates with the Order Service saga for resource deprovisioning if needed.
Engineering culture
Short reads that sharpen your engineering instincts and help you stay ahead of the curve.