· 9 min read

Stripe Billing for SaaS: Subscriptions, Failed Payments and Sales Tax

Stripe Billing for SaaS: subscription statuses, proration, Customer Portal, Smart Retries, webhooks, Stripe Tax, and when a merchant of record fits.

Summarize with AI
Stripe Billing for SaaS: Subscriptions, Failed Payments and Sales Tax

Stripe Billing for a SaaS comes down to four pieces: Products and Prices that model your plans, subscriptions that move through statuses like trialing, active, past_due and canceled, webhooks that keep your own database in sync, and Stripe Tax for US sales tax in the states where you're registered. At the time of writing, Billing's pay-as-you-go plan costs 0.7% of billing volume on top of card processing (2.9% + 30¢ for US cards), and Stripe Tax adds 0.5% per transaction where you're registered to collect. Smart Retries, dunning emails and the Customer Portal are included. If you'd rather not carry sales tax and VAT at all, a merchant of record such as Paddle or Lemon Squeezy takes that over for a higher all-in fee.

Products, Prices and the subscription lifecycle

A Product is what you sell, for example "Pro plan". A Price is how you charge for it: amount, currency and billing interval. One Product usually has several Prices, such as monthly and annual, or USD and EUR. Store Price IDs in your config instead of hardcoding amounts in the app. When pricing changes, create a new Price and archive the old one: existing subscribers keep their price until you migrate them on purpose.

Every subscription has a status, and your app's access logic should follow it:

  • trialing: access is granted, nothing is charged yet. Stripe sends customer.subscription.trial_will_end 3 days before the trial ends.
  • incomplete: the first payment failed or needs authentication. The customer has 23 hours to pay, otherwise the subscription becomes incomplete_expired.
  • active: the subscription is in good standing.
  • past_due: a renewal payment failed, and Stripe keeps retrying according to your settings.
  • canceled or unpaid: after the last retry, your Dashboard settings decide whether the subscription is canceled, marked unpaid or left past_due. Stripe's docs recommend revoking access for canceled and unpaid.

Plan changes and proration

When a customer upgrades mid-cycle, Stripe by default prorates down to the second: a credit for unused time on the old Price and a charge for the remaining time on the new one. The proration_behavior parameter controls the outcome: create_prorations adds those items to the next invoice, always_invoice bills them immediately, and none skips proration.

A setup that works for most B2B products: upgrades bill immediately with always_invoice, so the customer pays when they get the bigger plan, and downgrades take effect at the end of the period, so nobody receives credit for time already used. Preview the proration through the API and show the amount before the customer confirms. One trap described in Stripe's docs: if the latest invoice is unpaid, a prorated change can credit the customer for time they never paid for, so use none in that case.

Customer Portal: self-service without building screens

The Customer Portal is a Stripe-hosted page where customers update payment methods and billing details (including tax ID), switch plans, pause or cancel immediately or at period end, and view, pay and download invoices. It's included in Billing; a custom domain for the portal costs $10 per month. You can share a no-code link from the Dashboard, but in a logged-in app it's cleaner to create a portal session on your server: the user clicks "Manage billing", your backend creates a session for their customer ID and redirects.

Know the limits before promising features. Customers can cancel but not change subscriptions with multiple products, usage-based prices or manual invoicing. The plan switcher shows at most 10 products, and the portal can't run inside an iframe.

Failed payments: Smart Retries and dunning emails

Smart Retries uses a machine learning model to choose retry times. For new accounts Stripe turns it on by default with up to 8 retries within 2 weeks; you can pick a window from 1 week to 2 months or replace it with a custom schedule of up to three retries. Hard declines aren't retried until the customer adds a new payment method.

Turn on the customer emails in Billing settings: failed payment notifications with a link to update the card, expiring card notifications, trial ending reminders 7 days before the trial ends, and upcoming renewal emails. Decide what happens after the final retry. For most B2B SaaS we recommend a grace period with an in-app banner, then restricted access, rather than deleting the account.

Webhooks you must handle

The minimum set of webhook events for subscriptions:

  • checkout.session.completed: the customer finished Checkout; link the Stripe customer and subscription IDs to your user.
  • invoice.paid: provision or extend access. Stripe advises confirming the subscription status is active first.
  • invoice.payment_failed: show the in-app warning; attempt_count tells you which attempt failed.
  • invoice.payment_action_required: the bank wants authentication; send the customer to complete it.
  • customer.subscription.updated: plan, quantity or status changed.
  • customer.subscription.deleted: the subscription ended; revoke access.
  • customer.subscription.trial_will_end: check that a payment method is on file.

Verify every request with the Stripe-Signature header against the raw body; a framework that parses JSON first breaks verification. Respond with 2xx quickly and do the work in a queue. In live mode Stripe retries failed deliveries for up to three days with exponential backoff, so the same event can arrive twice, and events can arrive out of order.

Idempotency and syncing state to your database

Idempotency works in both directions. Outgoing: send an Idempotency-Key header (a V4 UUID, up to 255 characters) when your server creates customers, subscriptions or refunds, so a network retry doesn't create a second subscription. Stripe may prune keys once they are 24 hours old. Incoming: save each processed event ID under a unique constraint and skip duplicates.

For ordering, use "fetch, don't trust the payload": when any subscription event arrives, retrieve the subscription from the API and write its status, Price, current period end and cancel_at_period_end into your table. A late, stale event then can't overwrite newer state. Your app reads access from its own table, not from a live Stripe call on every request.

Stripe Tax and US sales tax nexus basics

Since the Supreme Court's South Dakota v. Wayfair decision in June 2018, US states can require remote sellers to collect sales tax once they cross an economic nexus threshold, even without a physical presence. Thresholds differ by state: many use $100,000 in annual sales, some count transactions or only taxable sales, and the rules change over time. Taxability differs too: Stripe's own guide shows that some states tax SaaS and others don't.

Stripe Tax covers monitoring (it tracks your Stripe sales by state and alerts you when you likely cross a threshold), calculation and collection on Billing, Checkout and Invoicing. It collects only where you've added a registration. Tax Basic doesn't register or file for you; Tax Complete includes registrations and filings. Pricing at the time of writing: 0.5% per transaction where you're registered for no-code integrations, $0.50 per transaction via the API, and Tax Complete starting at $90 per month on a 1-year contract. Set a product tax code and collect at least the customer's ZIP code so calculation works.

Where you must register and whether your product is taxable there is a question for your CPA. This section is general information, not tax or legal advice.

Refunds and credit notes

A refund returns money on a payment. A credit note is the document that reduces an open or paid invoice without voiding it; on a paid invoice it can refund through Stripe, credit the customer balance or record a refund made outside Stripe. For subscriptions, refund through credit notes so invoice totals, tax amounts and revenue reports stay consistent. Stripe Tax also lowers its threshold totals by refunded amounts. Stripe doesn't return the original processing fee on a refund.

Stripe Billing vs Checkout only vs merchant of record

A merchant of record (MoR) is the legal seller of your product: it collects and remits sales tax and VAT in its own name and handles billing support. Paddle and Lemon Squeezy both list 5% + 50¢ per transaction at the time of writing; Lemon Squeezy adds 0.5% for subscription payments and 1.5% for transactions outside the US. Stripe also has its own MoR product for digital goods, Managed Payments.

ApproachFees (at the time of writing)Tax handlingControlEffort
Stripe Billing + Stripe Tax2.9% + 30¢ per US card, plus 0.7% Billing and 0.5% TaxStripe calculates and collects; you register and file, or buy Tax CompleteFull: API, data, pricing logicMedium: webhooks, sync, tax setup
Stripe Checkout only, one-time payments2.9% + 30¢ per US cardOn you, unless you add Stripe TaxFull, but no renewalsLow for one-off sales, impractical for subscriptions
Merchant of record (Paddle, Lemon Squeezy)5% + 50¢, plus surchargesMoR collects, remits and carries liabilityLower: their checkout, rules and payoutsLow

An MoR makes sense for a small team selling a digital product to consumers in many countries, where registering for EU VAT and multiple US states would cost more time than the fee difference. Stripe Billing wins for US-focused B2B products with seats, usage pricing or invoices, and its cost advantage grows with revenue.

Common bugs we see

  • Trusting the client. Access is granted because the success URL loaded or the frontend sent "paid: true". Anyone can open that URL. Provision only from verified webhooks or a server-side API check.
  • Missing webhook. The app handles checkout.session.completed but not customer.subscription.deleted, so canceled users keep Pro forever. Or invoice.payment_failed is ignored and past_due users never see a warning.
  • Double provisioning. A retried or duplicated event creates two workspaces, two credit grants or two welcome emails. Deduplicate by event ID and make handlers idempotent.
  • Untested renewals. Renewals, retries and refunds happen weeks after signup, so nobody clicks through them by hand. Stripe test clocks let you advance simulated time and run those paths in automated tests.

How to choose: our decision rule

If you sell mainly to US businesses, need custom plans, seats, usage or invoices, and expect your revenue to grow, use Stripe Billing with Stripe Tax and budget for a proper webhook and sync layer. If you're a small team selling a digital product to consumers worldwide and don't want any tax registrations, start with a merchant of record and accept the higher fee. Plain Checkout without Billing fits only one-time payments.

We set up subscriptions, webhooks, the portal and tax as a standalone project: Stripe payments setup starts at $1,200 and takes 1–2 weeks. For a new product, our SaaS MVP launch starts at $12,000 with a first version in 1–2 weeks; subscriptions, plan changes, refunds and Stripe are already built, and the full payment, renewal and refund cycle is covered by automated tests. Pushing billing events into your CRM or team chat is part of our integrations and automation work.

FAQ

Questions & answers

Contact us

At the time of writing, the pay-as-you-go plan is 0.7% of billing volume, charged on top of standard processing (2.9% + 30¢ for US cards). One-time invoices are excluded from the Billing fee. Higher-volume businesses can switch to a monthly plan on a 1-year contract with a lower rate on additional volume.

With Smart Retries enabled by default on new accounts, Stripe retries up to 8 times within 2 weeks. You can change the window (from 1 week to 2 months) or set a custom schedule of up to three retries. Payments with hard declines wait until the customer adds a new card.

Only on Tax Complete, which includes registrations and filings and starts at $90 per month on a 1-year contract. Tax Basic calculates and collects tax where you are registered and monitors thresholds, but registering and filing stay with you or your accountant.

They are better when you want someone else to be the legal seller and carry tax liability across many countries. You pay for it with a higher fee (5% + 50¢ listed by both) and less control over checkout and billing logic. For US B2B products with custom plans, Stripe Billing is usually the stronger long-term choice.

Yes. The portal itself is included in Stripe Billing, and a custom domain costs $10 per month at the time of writing. The portal can't be embedded in an iframe, so link or redirect to it from your app.

10+ years in business, 100+ projects, clients in 9+ countries