#sumitp07

1 messages · Page 1 of 1 (latest)

remote nicheBOT
timid ravine
#

hello! how can I help?

vital sigil
#

I want implement different tax behaviour for selected country or region on checkout process

My requirement is

  1. if the customer is from France then apply French Tax (20%)
  2. if the customer is from an EU country then apply EU Autoliquidation Tax (0%): and they provide a valid VAT number
  3. if the customer is outside the EU then apply Default Tax Rate (0%)

what is the solution for this requirement?

#

Hi

timid ravine
vital sigil
#

I need to create tax rates for all the countries in the world then, right?

timid ravine
#

you listed 3 requirements which from what I understand, only requires you to create 3 kinds of tax rates. Why do you need to create tax rates for all the countries in the world?

vital sigil
#

Is there any solution to identify tax id for non EU countries at the time of tax rate creation

#

?

#

Excluding france, for other EU countries the vat number is required

timid ravine
#

i think if you don't want to create a tax rate for each country in FR and the EU, you can check the country of the customer beforehand, and then set the appropriate tax rate which you've predefined.

Alternatively, you can also consider using Stripe Tax that will auto apply the correct tax rates for where your business is registered for tax

vital sigil
#

How can I check the country of the customer in the checkout page

#

and another one how I can ask the EU customers to enter the vat number on checkout page?

timid ravine
#

How can I check the country of the customer in the checkout page

you would pre-collect that information upfront, or if you already have a Customer object, check the address on the Customer.

and another one how I can ask the EU customers to enter the vat number on checkout page?
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-tax_id_collection

vital sigil
#

I have a customer object and I am passing the customer ID with the create checkout session but then also it is not taking address from the customer object

timid ravine
#

Actually, if i look at your requirement again, aren't you only applying tax if the customer is in FR? This means that you only need to create one tax rate

My requirement is

  1. if the customer is from France then apply French Tax (20%)
  2. if the customer is from an EU country then apply EU Autoliquidation Tax (0%): and they provide a valid VAT number
  3. if the customer is outside the EU then apply Default Tax Rate (0%)
#

I have a customer object and I am passing the customer ID with the create checkout session but then also it is not taking address from the customer object

What does it is not taking address from the customer object mean? Where do you expect to see the address from the customer object?

vital sigil
#

Could you please explain more about how the checkout page will handle "if the customer is from an EU country then apply EU Autoliquidation Tax (0%): and they provide a valid VAT number" this requirement?

timid ravine
#

So do you mean, you only want to apply 0% tax if they're from EU and provide a valid VAT number? If they don't provide a VAT number, what tax rate are you going to apply?

vital sigil
#

Tax rate will remain the same but the checkout process will not get processed forward.

timid ravine
#

what does but the checkout process will not get processed forward mean?

vital sigil
#

the checkout button will be disabled, beacause the vat number field is required field

timid ravine
#

I'll recommend you test it out yourself by creating a Checkout Session. If the customer is in the EU, and select the checkbox I'm purchasing as a business, VAT id is a required field. However, if it's not a business, the customer can proceed with the payment without providing a VAT ID

vital sigil
#

there is no way to show these fields directly without checking the checkbox?

#

And in the country or region dropdown can we set the default value as country from customer object?

timid ravine
#

there is no way to show these fields directly without checking the checkbox?

you can create your own custom field to collect VAT information : https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-custom_fields, but if you do that, Stripe won't validate that info for you.

And in the country or region dropdown can we set the default value as country from customer object?

Stripe auto detects the location that the customer is in and displays the corresponding country

vital sigil
#

to create custom fields to collect VAT information, we have to know the country of the customer right?

timid ravine
#

yep

vital sigil
#

Actually it is not detecting the customer country and not setting default value for country or region dropdown on checkout page, so the customer will get confused for different behaviour on same page for tax rate and billing address we are taking on checkout page?

So how can I handle this?

remote nicheBOT
honest sphinx
#

Hi! I'm taking over from my colleague. Please, give me a moment to catch up.

vital sigil
#

ok

honest sphinx
vital sigil
#

how it will happen?

#

I don't see the preselected country on checkout page?

#

can we take a call for better understanding?

honest sphinx
#

My engineering team doesn't do calls, unfortunately. But I am happy to help here if you share a bit more context.

vital sigil
#

My requirement is

  1. if the customer is from France then apply French Tax (20%)
  2. if the customer is from an EU country then apply EU Autoliquidation Tax (0%): and they provide a valid VAT number
  3. if the customer is outside the EU then apply Default Tax Rate (0%)

Our application flow is like the customer needs to subscribe for the product to get access for paid things. so for that we are using stripe checkout process.
So at the time of subscription on checkout page we product details section and billing section.
In product details section we have product details and tax details as I have mentioned above, and in billing section, we need to ask vat number of the customer if the customer is from EU region and country is not France.

honest sphinx
#

I understand. I think the conditions are a bit too complex for Stripe Checkout settings to handle. You might want to implement your own checkout page for that, with Stripe Payment Element, for example.

vital sigil
#

With payment element, I am not able to get the selected country or region after customer picks the any country from dropdown on change event

honest sphinx
vital sigil
#

I gone through the stripe docs but I don't see the solution for custom subscription process, can you please explain me how can I achieve this flow?

honest sphinx
vital sigil
#

I mean whatever we are doing with stripe checkout process, that all the things I want to achieve in customized checkout process with the expected tax behaviour with vat number collection

honest sphinx
#

You can achieve everything with and custom flow that you can with Checkout Session.

#

Except you will need to implement a VAT collection field yourself.

remote nicheBOT