#rookiemonkey_kw
1 messages · Page 1 of 1 (latest)
hello! Can you share a Checkout Session id for me to take a look?
cs_test_a1w7iR8X6XXkwFbLAW7XMQbzegsNl6TPavAvPQQ6FYC5FIqz8o46f3bS4Q
this one has payment_intent_data with shipping address and disabled automatic tax
if you disable automatic tax, you're going to need to include a tax rate : https://stripe.com/docs/payments/checkout/taxes?tax-calculation=tax-rates
if you enable automatic_tax, that should automatically calculate tax based off the shipping address - can you share a Checkout Session with automatic tax enabled
i see i probably need dynamic tax rates since we aren't only serving US customers
hmmm we have alaready tax registrations on WA state, which autocalculates tax if enabled automatic_tax, in this case how can i get the same tax percentage based on our available tax registrations?
you can define the amount (percentage) of tax to calculate for Tax Rates
oh i guess i can use the amount coming from here https://stripe.com/docs/api/tax/calculations
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
i see i probably need dynamic tax rates since we aren't only serving US customers
i'm not super familiar with tax, but if you have businesses outside of US, and have a tax id in those countries, you could register more than one tax location in automatic tax, wouldn't that work for you instead of having to manually calculate it?
we actually need to do this as well https://stripe.com/docs/api/tax/calculations
since we have a order review page (that will show the tax will come from the tax calculation API) once ready to pay they will get redirected to Stripe Checkout Page
ah i see
i think your recommendation works
but there is one last thing, the shipping isn't included in the tax when calculated
cs_test_a1st8NGJsMy0C7W8BurLsA0UwoAvmG7cbwVmo92EvqSJxaVh97yBaGu1ng
its only calculating the 10.2% of the Subtotal
i've already added the tax_code as well for this one
shipping_options: [
{
shipping_rate_data: {
display_name: order.determine_shipping_method,
type: "fixed_amount",
fixed_amount: {
currency: "usd",
amount: (order.shipping_price * 100).to_i
},
tax_behavior: "exclusive",
tax_code: "txcd_92010001"
}
}
]
if i look at the request log : https://dashboard.stripe.com/test/logs/req_ImxQk3AsGqhg0h - the tax behaviour you defined is inclusive
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
oh thats weird
now this is exclusive but still the same
amount tax is 714 (7.14) which suppose to be 1173 (11.73)
gimme a while to look into this and get back to you
no wories
hmmm, so you need to use Stripe Tax if you want automatic tax on the ShippingRate. TaxRates was built for Billing/Subscription use cases and doesn't interact with shipping.
Alternatively, if you only have one shipping option, you could calculate the amount of tax appropriate yourself and add a Checkout line item for it.