#Lunarspear
1 messages · Page 1 of 1 (latest)
Hi there!
Can you share the ID (req_xxx) of the failing API request?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
yes thanks for sharing
thank you for helping me! I've been trying all night and day to find a solution for this
The tax rate txr_1IHVvFGyvLw1g1hBj9HJuLzA belongs to the account acct_1I9V9kGyvLw1g1hB while you are creating a Subscription by the account acct_1MbUUeCtlXRHGdkD
2 sec, need to check in my .env if there are different stripe keys used
am I right to check this no?
ok so my stripe key is STRIPE_KEY=pk_test_51MbUUeCtlXRHGdkD.........
Yes you need to use the same key, when creating the tax rate, creating the subscription with the tax rate and all actions...
but I have on my Tax Settings page off
I think I found a solution, I need to attach the tax id from my stripe account to the method that creates the newSubscription $tax_rate_id = 'txr_1234567890'; // Replace with your tax rate ID
$tax_rates = [['tax_rate' => $tax_rate_id]];
$business->newSubscription($subType->name, $price_id)
->defaultTaxRates($tax_rates)
->create($request->payment_method);
yeah, you need to use the client secret of the same account for all resources.
found it <#
the application is a migration
from an old application
and the tax rate associated is set in a config file 😐
Ah that's it so, try creating a new tax rate then with the new account.
it works
so there are 2 thinks I did
maybe others have the same problem in the future, you know what ot do
to tell them fast, so first, make sure you have a tax in the Settings - Tax Settings for your country
then, go to Products, Create a Tax Rate for your country with your Country tax rate Default ( for my country is 19% )
and then when you create a product, make sure you use the same currency as the one in your country
one more think is
the tax rate should be Inclusive
Glad to hear that you managed to solve the issue!
don't hesitate to come back if you need any follow up question.
Cheers man, have a great productive day!!!!