When using `automatic_tax`, each shipping option needs to have a defined `tax_behavior` set. error while automatic tax in stripe


While calculating tax according to the shipping region I am getting this error

Error while hitting the checkout API

I have used the following code the checkout

Code for the checkout


If you’re using Shipping Options with Checkout and automatic tax, then you need to set shipping_options.shipping_rate_data.tax_behavior when you create the Session. You can see it in the API reference here: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-shipping_options-shipping_rate_data-tax_behavior

Answered By – karbi

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published