Last year we wrote about our approach to handling European VAT rules with Stripe. I'm happy to report that Stripe has now implemented a much better tax handling system. Meanwhile we also learned some more about properly filing VAT tax returns. Let's see how we can use this new knowledge to achieve a better result with less code.
Previously, we implemented adding VAT to an invoice for a subscription by
adding an invoice line. Since API version 12/22/14 there's a tax_percent
field on the Subscription
object. When you
use this field, Stripe will automatically make the calculation and add
the VAT amount to every invoice that's generated for the subscription.
So the first step, if you use a similar approach as described in our earlier blog post,
is removing the extra logic on the webhook for invoice.created
. We don't need
to modify the invoice anymore. Instead we'll add the tax_percent
field to the
subscription. We still need to have a way to determine if a customer
needs to pay VAT though.
Our accountant informed us that even though we were applying the right VAT percentages to all invoices, we do need to separately categorize all the revenue from non-VAT paying EU customers. That's called "reverse charged" in accountancy parlance. So we now use these two methods to determine the right tax status:
Disclaimer: This is only accurate if you run a service that sells to businesses primarily. Please check with your accountant: we can't tell if things might be different in your specific situation. We're not providing you with legal or bookkeeping advice, and can't be hold accountable as such.
Now we know everything we need to know, and we can actually create a
subscription. All the logic we needed earlier is gone, as we just add the
tax_percent
field when updating the subscription for a customer in Stripe:
Whenever an invoice has been created and paid, we add it to our SaaS invoicing system MoneyBird. Instead of having one tax category for non-VAT invoices we now have two, and select the correct one like this:
That's all there is to it now. Big thanks to Stripe for making handling subscriptions nicer for their European customers!