Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

rpickz's avatar
Level 2

Laravel Spark - VAT not working for UK?

Hi Everyone,

I hope you're well :-).

I'm trying to use Laravel Spark for a B2B SaaS product that I'm working on, and I'm unable to get VAT collection working for the UK.

I can see in the documentation here that VAT collection is supported (but only referenced with regards to the EU): https://spark.laravel.com/docs/spark-stripe/taxes.html#taxes

Does Laravel Spark support UK VAT collection? Are there any tricks that have to be done in order to get this working?

More information about the setup:

  1. Stripe products have been set up for annual and monthly subscriptions, and have Stripe Tax disabled. Stripe tax has also been disabled at the Dashboard level, and across the Test environment that I'm working with.
  2. I have activated the EU VAT Collection feature within the 'features' block in the 'spark.php' config file.
'features' => [
         Features::billingAddressCollection(['required' => true]),
        // Features::mustAcceptTerms(),
         Features::euVatCollection(['home-country' => 'GB']),
         Features::invoiceEmails(['custom-addresses' => true]),
        Features::paymentNotificationEmails(),
    ],
  1. When I try and subscribe to the product and specify that my address is within the UK, it displays no VAT added to the total (i.e. a $40 subscription is listed as being charged at $40, no added tax). If I change this to a European country, it adds tax of $7.60 (for Germany).

I would like to get VAT collection organised in the best way possible for my business, allowing this to also be displayed on invoices. Is this possible?

0 likes
1 reply
LaryAI's avatar
Level 58

To address the issue of VAT not being applied for UK customers in Laravel Spark, you need to ensure that your configuration and setup are correctly aligned with the requirements for VAT collection. Here are some steps and considerations to help you resolve this:

  1. Check Stripe Tax Settings:

    • Even though you mentioned that Stripe Tax is disabled, ensure that your Stripe account is set up to handle VAT for the UK. This might involve enabling tax settings specifically for the UK within your Stripe dashboard.
  2. Update Spark Configuration:

    • Ensure that your spark.php configuration file is correctly set up for VAT collection. You have already enabled euVatCollection with 'home-country' => 'GB', which is correct for the UK. However, make sure that the rest of your configuration does not conflict with this setup.
  3. Verify Address Collection:

    • Make sure that the billing address collection is working correctly and that the country is being correctly identified as the UK. This is crucial for applying the correct VAT rules.
  4. Check for Updates:

    • Ensure that you are using the latest version of Laravel Spark and any related packages. There might be updates or patches that address VAT collection issues.
  5. Custom Tax Logic:

    • If the built-in VAT collection is not working as expected, you might need to implement custom logic to handle UK VAT. This can be done by listening to the subscription creation events and applying the necessary tax calculations manually.
  6. Testing in Live Mode:

    • Sometimes, test mode might not fully replicate the tax calculations as they would occur in live mode. Consider testing with a live setup (with caution and possibly minimal charges) to see if the issue persists.
  7. Consult Stripe Documentation:

    • Review Stripe's documentation on tax settings and ensure that your account is configured to handle VAT for the UK. This might involve setting up tax rates manually if automatic tax calculation is not available.

Here's a basic example of how you might manually apply a tax rate if needed:

use Laravel\Cashier\Subscription;

$subscription = Subscription::create([
    'customer' => $customerId,
    'items' => [['price' => $priceId]],
    'default_tax_rates' => ['txr_1JH8Y2IyNTgGDVfzj9l0aQ2z'], // Replace with your tax rate ID
]);

In this example, replace 'txr_1JH8Y2IyNTgGDVfzj9l0aQ2z' with the actual tax rate ID you have set up in Stripe for UK VAT.

By following these steps, you should be able to troubleshoot and resolve the issue with UK VAT not being applied in Laravel Spark. If the problem persists, consider reaching out to Laravel Spark support or the community for further assistance.

Please or to participate in this conversation.