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:
-
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.
-
Update Spark Configuration:
- Ensure that your
spark.phpconfiguration file is correctly set up for VAT collection. You have already enabledeuVatCollectionwith'home-country' => 'GB', which is correct for the UK. However, make sure that the rest of your configuration does not conflict with this setup.
- Ensure that your
-
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.
-
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.
-
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.
-
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.
-
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.