#rookiemonkey_kw

1 messages · Page 1 of 1 (latest)

wispy trellisBOT
vapid moon
#

hello! Can you share a Checkout Session id for me to take a look?

tame quarry
#

cs_test_a1w7iR8X6XXkwFbLAW7XMQbzegsNl6TPavAvPQQ6FYC5FIqz8o46f3bS4Q

this one has payment_intent_data with shipping address and disabled automatic tax

vapid moon
#

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

tame quarry
#

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?

vapid moon
#

you can define the amount (percentage) of tax to calculate for Tax Rates

tame quarry
vapid moon
#

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?

tame quarry
#

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

vapid moon
#

ah i see

tame quarry
#

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"
            }
          }
        ]
vapid moon
tame quarry
#

oh thats weird

#

now this is exclusive but still the same

#

amount tax is 714 (7.14) which suppose to be 1173 (11.73)

vapid moon
#

gimme a while to look into this and get back to you

tame quarry
#

no wories

vapid moon
#

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.

tame quarry
#

oh i see it got it

#

so instead of adding it as shipping_options i'll add it as line item

#

that makes sense as a workaround