Home > Enterprise >  When using `automatic_tax`, each shipping option needs to have a defined `tax_behavior` set. error w
When using `automatic_tax`, each shipping option needs to have a defined `tax_behavior` set. error w

Time:08-18

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

CodePudding user response:

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

  • Related