-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stripe Tax: isTaxExempt() isNotTaxExempt() reverseChargeApplies() methods returns incorrect state #1645
Comments
Hey there, Unfortunately we don't support this version anymore. Please check out our support policy on which versions we are currently supporting. Can you please try to upgrade to the latest version and see if your problem persists? If so, please open up a new issue and we'll help you out. Thanks! |
@driesvints Unfortunately after upgrading to the latest version this remains the same. Looks like Stripe Tax and Laravel Cashier are incompatible. At least when generating invoices/receipts. It needs to rely on "taxability_reason" instead/and "tax_exempt" attribute: |
@sakalauskas forgive me but I'm confused. Cashier Stripe doesn't uses |
@driesvints Basically, the issue is that invoices/receipts that are being generated are a bit incorrect due to isTaxExempt() isNotTaxExempt() reverseChargeApplies() methods which uses "tax_exempt" state. Stripe Tax doesn't use the "Tax Status" state to determine taxability. Laravel Cashier does. At the moment, I have "resolved" this by providing original Stripe invoices instead of Cashier-generated invoices but Stripe invoices lack customizability. When a new customer is created, it is created with Tax Status: Taxable. Setting Tax Status manually would still be needed for the Laravel Cashier invoice/receipt to be generated correctly but that kind of defeats the purpose of Stripe Tax slightly. Let's take into account the following facts:
Please see some of the examples where the invoice is generated:
Let me know if that makes sense. I would love to open a PR but not exactly sure how to make the code lean. Potentially there could be multiple taxes and taxability reasons requiring refactoring the blade template. It might be that a simpler "solution" is to note that Stripe Tax are not compatible with Cashier-generated invoices. |
Gonna re-open this one. Will have a look when I find some time, thanks |
Cashier Stripe Version
14.14.0
Laravel Version
10.41.0
PHP Version
8.2
Database Driver & Version
No response
Description
When using Laravel Cashier with Stripe Tax, the automatic tax is applied on the Subscription but not on the Customer object. As a side effect, Invoices generated on Stripe do not match invoices generated via Laravel.
The "tax_exempt" attribute when creating a new customer is always "none" and this is where is the problem. Generally, "tax_exempt" attribute seems that should not be used when Stripe Tax is used.
This issue mainly affects invoice generation. Where it should say "Tax is exempted" or "Tax to be paid on reverse charge basis", it states e.g. Sales Tax - Texas (8.25%) - $0.00. Since I am not registered to collect taxes in Texas, "automatic_tax" state is "not_collecting", which is basically "Tax is exempted".
I have reached out to Stripe Support and they confirmed that "tax_exempt" attribute isn't used with Stripe Tax:
A simple hotfix may be just manually updating "tax_exempt" attribute. But that just contradicts with Stripe Tax purpose - automatically calculate taxes.
The correct fix would be to use total_tax_amounts fields instead of tax_exempt attribute when Stripe Tax is used.
Steps To Reproduce
Cashier::calculateTaxes();
$user = User::find(...);
$customer = $user->createOrGetStripeCustomer(['expand' => ['tax']]);
$user->createTaxId('eu_vat', 'LT123456789123');
$user ->newSubscription('default', 'my_price_name')->create($token)
The text was updated successfully, but these errors were encountered: