Closed lsmith77 closed 4 years ago
@mpociot FYI ^
Thanks, I'll try to have a look at this when I'm back from vacation in two weeks.
@lsmith77 I only see CRUD operations in your examples and no real other use cases. There's lots of other CRUD operations that aren't directly integrated into Cashier and which you can simply use the Stripe SDK for. So I don't think it's necessary to add anything to Cashier as most of it will only be minimal syntactic sugar on top of the Stripe SDK.
I've btw already added methods to the Billable trait to easily determine if a customer is tax exempt or not.
FYI Stripe now supports validation for some countries. If the status changes there is a webhook that is triggered https://stripe.com/docs/billing/taxes/tax-ids?lang=php#validation
related to https://github.com/laravel/cashier/pull/830
Stripe supports setting customer Tax IDs https://stripe.com/docs/billing/taxes/tax-ids This is useful for the following purposes:
It is a MUST to set the Tax ID for B2B cases. Therefore it IMHO would make sense to add native support into the
Billable
class (less code to write, automate setting the tax exemption status) and provides a clear API that packages like https://github.com/mpociot/vat-calculator can target to add additional features.Here is some code I have added in my current project to make it work without cashier support. It would of course be nice to support more different country formats of course.
FYI the Stripe Tax ID API is not very mature yet, ie. its not possible to fetch a Tax ID object by VAT ID and more importantly it is not possible to update a Tax ID status, which is actually quite critical, since the company status needs to be validated regularly, to for example determine if the customer is in fact tax exempt or not.
I created a simple command to validate the Tax ID status over night, since this depends on government API's that are not really reliable: