How can I add the VAT number in the checkout

@charles Ok, thanks.
In the mean time I have implemented our own tax web hook service that takes care of this.
However, as a company in the EU we have to distinguish between customers in the EU that provide a VAT number and those who don’t. I can solve this by a custom field for products but would like to do this on a more general level. I see a “vatNumber” field in the billingAddress JSON object which is “null”. Is there a way to activate this field in the billing address tab? That would be great!

Hey @tliebig,

I’d suggest you use an order custom field. You could add this field in the billing-address component. It won’t populate the vatNumber field that you see in the billingAddress object, but, it will be available in the customFields of the order that you receive in the Webhook payload.

Let me know if that helps!

Hi @charles ,
Yes, that’s a solution. How can I apply this to version 2 of SNIPCART?

@tliebig you will find the documentation for order custom fields for v2 here

Hi @lea
Yes, thanks. Unfortunately there are no custom fields for the billing section in v2.
However, I solved the problem in renaming the Phone field to my needs. My tax computation then uses this field accordingly. It’s kind of a hack but …

Also mentioned this in this issue:

Can’t really understand why there’s a vatNumber property in billing if it’s not set in an input. Does that only work for setting it with the SDK?

Is it possible to link the VAT N° given by an EU customer (via a custom field) to the tax calculation? It should turn to 0% within EU.

Further, is there a smart way to verify automatically the VAT N°, for example with https://www.ust-id-prufen.de/ ?

Hi @Jerome,

This is currently not possible but I added this feature request in our system.

Thanks for your feedback!

Hi @rodrigojmr

The correct way to get the customer VAT number is with a custom field, the vatNumber field in billingAddress is not currently used and will be removed to avoid confusion.

In the future, we might add it back in the cart state if we have a feature reliant on this field.

Hope this helps,
Cheers!