Payment Infrastructure
Subscription Billing Engine
Recurring revenue done right
Presentation
Overview
Recurring billing looks simple until you actually try to build it well: plan changes mid-cycle, trials that convert or lapse, proration on upgrades and downgrades, failed card payments that need intelligent retry logic, and invoices that satisfy tax requirements across multiple jurisdictions. Pay Engineers builds subscription billing engines that get these details right, because in a recurring revenue business, small billing errors compound into meaningful revenue leakage.
We build the billing engine as a layer that sits alongside your existing payment gateway rather than replacing it, since most SaaS and membership businesses already have a gateway relationship they are satisfied with. The billing engine focuses on the logic of what to charge, when, and how to recover failed payments, while delegating the actual card processing to your existing infrastructure.
This separation of concerns keeps the engine focused and lets it be genuinely excellent at billing logic, rather than a mediocre generalist that also happens to process cards.
Who This Is For
- SaaS businesses whose current billing logic is scattered across application code and spreadsheets
- Membership and subscription-box businesses managing complex plan structures and trial conversions
- Platforms migrating off a third-party billing tool that has become too rigid or expensive at scale
- Any recurring revenue business measuring meaningful involuntary churn from failed payment recovery
What You Get
- A plan catalogue supporting multiple pricing tiers, add-ons and billing frequencies, managed through configuration rather than code changes
- Proration and trial handling that correctly calculates charges and credits for plan changes and trial conversions
- Smart dunning logic that retries failed payments intelligently, factoring in card decline reasons and optimal retry timing
- Invoice generation producing tax-ready documents suitable for the jurisdictions your customers are billed in
Technical Approach
The engine is built on Laravel with PostgreSQL storing the subscription, invoice and dunning state, and a dedicated scheduler driving billing cycle events, renewal attempts and dunning retries on precise, auditable timing rather than ad hoc cron jobs scattered through application code. Invoice PDF generation produces documents that include the tax breakdown, line items and payment history required for business customers and accounting compliance.
Dunning logic is modelled as a configurable sequence of retry attempts, communication touchpoints and eventual downgrade or cancellation, informed by the specific decline reason returned by the card issuer where available, since a retry strategy that works for an insufficient-funds decline is different from one appropriate for an expired card. Proration calculations are centralised in one tested module rather than duplicated across multiple billing scenarios, reducing the risk of subtle calculation errors reaching customer invoices.
Delivery Process
- Discovery of your current plan structures, billing pain points and gateway relationship
- Billing data model and dunning strategy design, reviewed against your actual churn and payment failure patterns
- Sprint-based build of the plan catalogue and core billing cycle logic, followed by dunning and invoicing
- Parallel-run testing against your existing billing data to validate charges before cutover
- Phased migration of customers onto the new engine, starting with new signups before migrating existing subscribers
Outcomes and Benefits
- Reduced involuntary churn through smarter, decline-aware dunning strategies
- Fewer billing support tickets thanks to accurate proration and clear, correct invoices
- A plan catalogue your commercial team can evolve without engineering involvement for every pricing change
- Tax-ready invoicing that reduces manual finance and accounting overhead
Technologies
FAQ
Similar services
Custom Payment Processor
We design and build independent payment processors that give fintechs, banks and platforms full ownership of authorisation, routing, settlement and risk logic. The engagement spans scheme connectivity, merchant lifecycle management, fee configuration and compliance hooks, engineered around your corridors and volumes. You end up with a processor you can extend, audit and scale on your own roadmap, not a black box you rent from someone else.
Payment Gateway
A production-grade payment gateway connecting your checkout to acquirers, card schemes and local payment methods, engineered around strong customer authentication and tokenised credentials. We handle 3-D Secure and SCA orchestration, smart transaction routing and webhook-driven integration so your checkout converts more customers while staying compliant with PSD2 and scheme mandates.
Merchant Portal
A branded merchant portal giving your merchants self-service visibility into onboarding status, transactions, statements, disputes and payout schedules. Role-based access control and full audit logging let you extend access safely across finance, support and management users within each merchant account. The portal reduces support ticket volume while giving merchants the transparency modern payment businesses expect.