Claude Code Boilerplate
FeaturesPricingBlogDocs
Get started →

Product

  • Features
  • Pricing
  • Skills

Compare

  • vs ShipFast
  • vs MakerKit
  • vs supastarter

Resources

  • Docs
  • Blog
  • Discord

Legal

  • License
  • Privacy Policy
  • Terms of Service
Claude Code Boilerplate

© 2026 Claude Code Boilerplate. All rights reserved.

← All posts

How to Add Tax Collection to Your SaaS -- Stripe Tax and VAT Compliance in Next.js

August 10, 2026
nextjsstripesaaspaymentsboilerplate

You launch, get your first international customer, and they reply to your payment receipt: "Can you send me a proper VAT invoice?" You have no idea what rate applies, whether you are even required to collect it, or how to generate a compliant document. You either lose the deal or manually calculate something and hope it is right.

This is one of those problems that feels distant until it is not. In the EU, VAT rates vary by country and product type. In the US, sales tax rules differ by state. For a SaaS founder who just wants to ship features, tax compliance is a distraction -- but ignoring it has real costs once you cross registration thresholds.

The good news: if you are already using Stripe for subscriptions or one-time payments in your Next.js SaaS boilerplate, enabling tax collection is mostly a configuration change.

The Options Founders Usually Consider

The traditional answers are not great:

  • Hire a tax advisor. Expensive, slow, and they still need you to implement collection.
  • Sign up for Avalara or TaxJar. $99-$500 per month before you have meaningful revenue.
  • Limit sales to one country. You cap your market to avoid the problem.
  • Ignore it and deal with it later. Works until you get an audit or a B2B customer refuses to pay without a VAT invoice.

Stripe Tax is a fourth option that most founders overlook. It costs 0.5% of taxable transactions (capped at $2 per transaction), handles rate calculation automatically, and gives you the data you need to file -- without rebuilding your checkout flow.

How to Wire Up Stripe Tax in a Next.js SaaS

Three things need to happen:

  1. Enable Stripe Tax in your Stripe dashboard. Go to Settings > Tax in Stripe and toggle it on. You can configure your home country and the tax behavior for your products.

  2. Set the tax behavior on your Stripe Products. Tax behavior can be inclusive (tax is baked into the price) or exclusive (tax is added on top). Most SaaS products in the US use exclusive pricing. EU businesses often display inclusive prices to consumers.

  3. Pass automatic_tax to your Checkout session. This is the change in your Next.js code:

const session = await stripe.checkout.sessions.create({
  mode: 'subscription',
  line_items: [{ price: priceId, quantity: 1 }],
  automatic_tax: { enabled: true },
  customer_update: { address: 'auto' },
  success_url: `${process.env.NEXT_PUBLIC_BASE_URL}/dashboard`,
  cancel_url: `${process.env.NEXT_PUBLIC_BASE_URL}/pricing`,
});

The customer_update: { address: 'auto' } line tells Stripe Checkout to collect the customer's address during checkout so it can calculate the correct rate. Stripe handles the rest -- it knows the VAT rate for a subscription sold to a customer in France, for example, without you having to maintain a rate table.

For subscription renewals, once Stripe Tax is enabled on your account and the product, it applies automatically on every invoice. You do not need to change your webhook handling.

What About EU VAT IDs for Business Customers?

B2B customers in the EU expect to enter their VAT ID and be exempt from VAT (the "reverse charge" mechanism, where the buyer accounts for the tax instead of the seller). Stripe Checkout supports this natively.

Enable it in your Stripe Tax settings and the VAT ID field appears in checkout automatically. Stripe validates the ID against EU VIES and, if valid, zeroes out the tax line. No custom code required.

Invoices and Receipts

Stripe generates tax-compliant invoices automatically for subscription payments. For one-time purchases, Stripe receipts include the tax breakdown. If your B2B customers need a more formal PDF invoice -- with your company details, their address, and line items -- that is a separate build. See PDF Invoice Generation in Next.js for the pattern.

For most early-stage SaaS, the Stripe invoice is sufficient for customer accounting.

What Stripe Tax Does Not Do

Stripe Tax calculates and collects tax. It does not:

  • Register you in any tax jurisdiction
  • File your tax returns
  • Tell you when registration is legally required

What it does do: the Stripe Tax dashboard shows total taxable revenue by country, tax collected per jurisdiction, and a transaction-level breakdown. You give this data to your accountant at filing time. In the EU, that means filing a VAT return in each country where you are registered, or using the EU OSS (One Stop Shop) scheme if you are based in the EU.

When to Add Stripe Tax

The EU threshold for digital services sold to consumers is EUR 10,000 total across all EU countries. Below that, you can charge the VAT rate of your home country (if you are EU-based) or no VAT at all (if you are not). Above it, you must register and collect at the rate of each buyer's country.

In the US, every state has different rules. Stripe Tax tracks your economic nexus exposure by state and flags when you are approaching a threshold.

If you are pre-launch or under these thresholds, you can defer -- but configure automatic_tax now. Enabling it later is a one-line change. Retrofitting uncollected tax is not.

The Decision Framework

Ask yourself three questions before deciding:

  • Am I already billing international customers? If yes, check whether you are above registration thresholds in any country.
  • Do my customers expect VAT invoices? B2B customers in Europe almost always do. B2C customers rarely ask.
  • Can I justify a $99/month compliance tool before product-market fit? Probably not -- that is where Stripe Tax's transaction-based pricing makes sense.

For most founders, the answer is: enable Stripe Tax when you get your first European customer who asks for a VAT invoice. The 0.5% cost is negligible compared to losing the sale.

One Clear Next Step

If you are using this Next.js SaaS boilerplate and already have Stripe subscriptions wired up, adding tax collection takes about 20 minutes. Enable Stripe Tax in your dashboard, set the tax behavior on your products, and add automatic_tax: { enabled: true } to your checkout session creation. After that, you can say yes when the German customer asks for their VAT invoice.