Skip to main content
Stacklane

Stripe Billing, subscriptions that don't break on edge cases, invoices that reconcile.

The Stripe API is the easy part. The hard part is the subscription state machine that has to be right across plan changes, trials, proration windows, failed renewals, dunning, refunds, and the half-dozen tax jurisdictions you didn't know you were liable in. We've shipped this enough times to know where the corners are.

What we build

  • Subscriptions with plan changes that proration handles

    Upgrade mid-cycle and Stripe prorates; downgrade and we schedule the change for cycle end. Plan migrations during a re-pricing event get handled with phased subscriptions, not manual SQL. The customer sees one invoice line; the back office sees the audit trail.

  • Metered + tiered + flat pricing in one model

    Pure subscription, usage-based, tiered, or hybrid, the billing model maps to a single typed structure in the database that the UI, the invoice, and the customer dashboard all read from. Adding a new pricing dimension is a config change, not a refactor.

  • Dunning that doesn't churn customers

    Failed payments retry on Stripe's exponential schedule, with branded customer emails at each step. After the final retry, the subscription pauses with a one-click reactivate. We surface dunning state in the customer dashboard so support can resolve without backchannel.

  • Tax via Stripe Tax, scoped to where you actually owe

    Stripe Tax handles VAT/GST/sales tax automatically once you've registered in each jurisdiction. We wire the registration thresholds into the alerting so you know when you're approaching a new nexus, not after you've missed it.

  • Webhooks that survive replays

    Every Stripe webhook is idempotent (dedupe on event ID), ordered (state machine refuses out-of-order transitions), and replayable from the Stripe CLI. Going back and reprocessing the last 24 hours of events is a one-line script, not a panic.

  • Reconciliation against the Stripe payouts report

    Monthly reconciliation cron compares the application's view of revenue against Stripe's payouts report. Discrepancies (refunds applied to wrong period, disputes opened mid-month) get flagged before the accountant finds them.

Where this fits

  1. You're past the 'manual signups in Stripe Dashboard' stage and need subscriptions that handle plan changes and proration without the support team manually adjusting invoices.

  2. Your billing has been working until now and you're about to add metered usage or a new tier, and the existing code doesn't generalize.

  3. Stripe Tax launched and you have no idea what jurisdictions you're liable in or whether your current setup is collecting the right amount.

Tech stack

  • TypeScript
  • Stripe API
  • Webhooks
  • Drizzle
  • BullMQ

Want this for your team?

30 minutes with a founder or senior engineer. We'll scope what you need and tell you straight whether Stacklane fits.

Book a Free Call