#imox29
1 messages · Page 1 of 1 (latest)
hello! how can I help?
i am creating a checkout
return await api.stripe.checkout.sessions.create({
customer: stripeCid,
automatic_tax: {
enabled: true,
},
customer_update: {
shipping: 'auto'
},
metadata: {stripeCid, newPlanId, quantity, uid},
allow_promotion_codes: true,
line_items: [
{
price: newPlanId,
quantity: quantity
},
],
shipping_address_collection: {
allowed_countries: ['US', 'IN']
},
mode: 'subscription',
success_url: ${hostList[config.env]}/success,
cancel_url: ${hostList[config.env]}/failure,
});
tax is always 0
hi there, can you share the request id [0] of an attempt? it'd look like req_xxx
you can also share the Checkout Session id if that's easier for you, it'll look like cs_test_xxx
cs_test_b1Y1SnccH9qlgs7Z2q0Yxaw4CoW4s9GWMysvm4AZESFFFzX4OuQVMhVGCc#fidkdWxOYHwnPyd1blpxYHZxWmozSEdyS2ozcGNNMVRCQW9fczFIZmZTZycpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPydocGlxbFpscWBoJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9x
i have created tax rates too
gimme a while to take a look
cool
do you have a checkout session where you completed payment with the shipping address set to an address in NY?
can you share that checkout session id whereby you completed payment?
let me see
i creatd a new customer
and it looks like tax is being applied when i do first checkout
why is tax not applied on when i cancel my current subscription and choose a new subscription?
also how does stripe calculate automatic tax
based on the tax rate for the region defined on my stripe account
like these rated
you're using Stripe Tax, which automatically calculates the Tax so the Tax Rates you've defined won't apply
enabled: "true",
},```
as to the first request id you provided
i'm guessing it's because you already had an India shipping address set on that customer provided and you're using Stripe Tax (which you're registered for tax in US (NY)) that's why the US tax doesn't apply
if you want to have Checkout automatically update the Shipping Address on an existing customer when they pass in a new Shipping Address, you can use this parameter - https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer_update-shipping
but the sales tax it applied for ny is 8.875 which i had set up as tax rates
so it looks like it picked from there
can you complete the payment for the second screenshot share the checkout session id?
It's coincidence that the percentage for tax ended up as 8.875% which is what you setup as the tax rate - sorry to redirect you but US tax is not something which we're familiar here on this channel so I'd suggest writing in to https://support.stripe.com/contact/email with this checkout session id : cs_test_b1hjcvwo2ebKQF58R97qajysAF4jeOGS92ppskyqC9tJ419XIdrAUwAuYV to ask them to explain the breakdown of the tax for NY if you need the details
cool thanks