Integrate Stripe Tax with your Bubble app and automatically collect taxes for payments.
December 28, 2023
Note: Nothing in this article is tax or financial advice. It is always recommended to work with a tax advisor to ensure you are fully compliant with the relevant tax requirements of your country.
If you're building an eCommerce store with Bubble or selling products as part of your app, there's a very good chance you're using Stripe as your payment processor. There are a number of ways of accepting payments with Stripe in your Bubble app and a range of plugins available to help you.
However, incorporating sales tax (or VAT) can be a trickier task.
In this article we'll show how you can automatically calculate and collect sales tax using Stripe Tax and the Stripe Checkout (Shopping Cart) plugin so that you can include tax in your Checkout Sessions like this:
In the above example, we're charging an additional 23% VAT, but the actual tax type, rate and description will be automatically modified by Stripe depending on what location your business is based in and what taxes you've registered for.
Stripe Tax is a product developed by Stripe that integrates with their Payment Links and Checkout products. In this article, we'll show how you can integrate Stripe Tax with Checkout (as that is what the Stripe Checkout (Shopping Cart) plugin is built on). Before getting into setting up Stripe Tax, you'll need to ensure you've registered for a Stripe account and have provided all the necessary details so that you can accept payments.
Please note that Stripe Tax is a paid product. You will be charged an additional 0.5% of the the total transaction cost for using Stripe Tax with Checkout. You can see the full details on Stripe tax pricing here.
You can register for Stripe tax by going to the 'Settings' tab of your Stripe dashboard and navigating to the 'Tax' section. Then click on the 'Get started' button as seen in the image below:
There are then 5 steps required to fully configure Stripe Tax. You can see the full details here, but this is what's involved at a high level:
Ensure the business address you have provided to Stripe is correct as it will have an impact on the tax rates Stripe Tax calculates.
Stripe will use a tax code to decide what taxes are applicable to your transactions. To access your preset tax code, navigate to the Product Settings section of your Stripe dashboard and click on Tax Settings.
You'll then be able to select a preset product tax code. In the example below I've selected 'General - Tangible Goods', but you can also choose options like 'Software as a service (SaaS) - business use' and 'Downloadable software - business use' from the dropdown.
Prices shown on the Checkout page (and paid by the customer) can either include or exclude tax. For example, in the below image, prices have been set to exclude tax from the price:
The €28.75 is added onto the subtotal of €125.00.
However, if you set prices to include tax, the tax will be considered part of the cost of the individual line items. In the image below the amount of tax paid is shown, but it is included in the $91.00 which is the subtotal of all the items.
You can choose whether you want your prices to include or exclude tax in the Tax Settings section of your Stripe dashboard.
You can also choose to set this option to 'Automatic'. If you choose this option, Stripe will decide whether or not to include tax in prices based on the currency being used in the transaction. Tax will be excluded in USD and CAD, but included in all other currencies.
Next, you'll need to choose what specific types of taxes you want to register for. You can do this by navigating to the 'Registrations' section in the tax section of your Stripe dashboard and clicking the 'Add registration' button.
You'll then be prompted to select a tax jurisdiction. In this example I'm selecting 'United Kingdom' as my country. You will note that I'm required to confirm that I'm currently registered to collect VAT in the United Kingdom. It is up to you to register for the appropriate taxes in your country - Stripe does NOT handle this part of the process for you.
On the next screen, Stripe will show us the type tax rate that they will calculate for transactions and what % it is. This will vary depending on what country you register.
For example, in the above example I'm registering for VAT in the UK. However, if I select the United States as my country and California as my Washington as my state, you'll see Stripe is going to calculate sales tax of 6.5% + the local tax on any transactions made.
Once you're happy with your registration, click on the 'Start collecting' button.
Please note that you can select multiple tax registrations. In the example below, I've registered for tax in the UK, the US and Ireland.
The final step is to enable Stripe Tax in your Stripe integration. Thankfully, this is very simple with the Stripe Checkout (Shopping Cart) plugin - see the next section for full details.
A full guide on how to set up and use the Stripe Checkout (Shopping Cart) plugin can be found here. You can also watch a detailed tutorial video on how to create shopping cart functionality with the plugin here.
Enabling Stripe Tax with the Stripe Checkout (Shopping Cart) plugin is very simple. When creating a Checkout Session, you simply need to set the 'Enable Stripe Tax' field to 'yes'.
Please note that you MUST have successfully registered for Stripe Tax by following the steps listed in the 'Registering for Stripe Tax' section of this article before enabling Stripe tax in Checkout Sessions.
If you've successfully implemented all the steps in this article, your Checkout Sessions should now include the relevant tax.