#krista_unexpected

1 messages ยท Page 1 of 1 (latest)

prime radishBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1334603772093005887

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

candid mauve
#

Correct calculations (no shipping used in the checkout session):
https://checkout.stripe.com/c/pay/cs_test_b1zk4ZFXgrifCGjBI4qY8ymoBKqrSeJNH5KPfUcdEiZtIplZS9IDt3lJdz#fid2cXdsdWBEZmZqcGtxJz8nZGZmcVo0VUR%2FaGlGUn1jV2pSVH9GJyknZHVsTmB8Jz8ndW5acWB2cVowUmldNm5gNEtVSzFIYjdIcnB9PVxjQGEnKSdjd2poVmB3c2B3Jz9xd3BgKSdpZHxqcHFRfHVgJz8naHBpcWxabHFgaCcpJ2BrZGdpYFVpZGZgbWppYWB3dic%2FcXdwYHgl

Incorrect calculations (shipping used in the checkout session):
https://checkout.stripe.com/c/pay/cs_test_b1RuKa235xicNtzubGDgDUckhy4r17Hv6ilcYj90WZlCYzwLBUlIKtz5i4#fid2cXdsdWBEZmZqcGtxJz8nZGZmcVo0VUR%2FaGlGUn1jV2pSVH9GJyknZHVsTmB8Jz8ndW5acWB2cVowUmldNm5gNEtVSzFIYjdIcnB9PVxjQGEnKSdjd2poVmB3c2B3Jz9xd3BgKSdpZHxqcHFRfHVgJz8naHBpcWxabHFgaCcpJ2BrZGdpYFVpZGZgbWppYWB3dic%2FcXdwYHgl

In the incorrect example, you can see the subtotal with the item and shipping is $20. The D.C. 6% tax would be $1.20 which is correctly being charged but on the left hand side it says Sales tax (12%). Then another issue arises if you select pickup, the tax is still the exact same rather than being reduced since the checkout subtotal has changed. We have not seen this issue with any other location outside of Washington D.C.

fluid summit
#

Hi there ๐Ÿ‘‹ looking at the examples you shared.

#

It looks like those sessions have already been completed, so I'm stripping the links you shared down to just the IDs of the Checkout Sessions.
cs_test_b1zk4ZFXgrifCGjBI4qY8ymoBKqrSeJNH5KPfUcdEiZtIplZS9IDt3lJdz
cs_test_b1RuKa235xicNtzubGDgDUckhy4r17Hv6ilcYj90WZlCYzwLBUlIKtz5i4

Since these are completed, I can't see the UI you're referring to. Did you capture screenshots?

fluid summit
#

And your concern here is that the shipping amount isn't being taxed?

candid mauve
#

No that is not the issue

#

Issue #1: In the first screenshot, the cost breakdowns are correct ($10 item, $10 shipping, $1.20 tax and $21.20 total) but on the left hand side, it says "12%" for the tax. which is not correct. I have no idea where that number is from. Washington D.C. tax is 6% which is the $1.20 being charged. Why does it say 12% tax even tho thats not the DC tax or the amount being charged.

#

Issue #2: When you then click pickup, the shipping cost is no longer being charged which is correct. But the tax is not updated and is still taxing $1.20 instead of $0.60

fluid summit
candid mauve
#

One second let me add a log to check

#

I get an error that the session doesn't exist when I just run stripe.checkout.Session.retrieve("cs_test_b14XStzELvb2NPsbweAqdKwQvU1goZdbGI9rXbi7eGU0iKf1vqY1bvlI5F") ... " No such checkout.session: cs_test_b14XStzELvb2NPsbweAqdKwQvU1goZdbGI9rXbi7eGU0iKf1vqY1bvlI5F"

#

When I log the response from session = stripe.checkout.Session.create(**create_session_data) the response does not include total_details.breakdown.taxes

fluid summit
#

Yes, taxes are not calculated until the customer details are provided, and we know what taxing jurisdictions are involved.

#

Do you have a request ID from when you encountered that error? My guess currently is that the request to retrieve the Checkout Session was either made from the wrong Stripe account.

candid mauve
#

req_myEZzEDSJfjK1v

fluid summit
#

You have to provide the ID of the Connected Account when retrieving the Checkout Session, since you did so when creating it and therefore the Checkout Session resides on the Connected Account.
https://docs.stripe.com/api/connected-accounts

candid mauve
#

Got it.. here is the request I sent stripe.checkout.Session.retrieve("cs_test_b14XStzELvb2NPsbweAqdKwQvU1goZdbGI9rXbi7eGU0iKf1vqY1bvlI5F", stripe_account="acct_1PAzmlCWxfRoWQzC")

And that response also does not have the total_details.breakdown.taxes field.

#

The response from stripe when i created the session and the response when i retreiev the sesion are the same. Both have this ... "total_details": {
"amount_discount": 0,
"amount_shipping": 1000,
"amount_tax": 120
},

fluid summit
#

Ah, sorry, I think that field is includable, so you have to use expand to get it in the response.
https://docs.stripe.com/api/expanding_objects
Can you try that request again, but use the expand feature to expand the total_details.breakdown field.
expand=['total_details.breakdown']

candid mauve
#

I see ok... I see that it lists the percentage as 12% but the amount as 1.20. When we create the stripe.TaxRate we provide the % and the location. Somehow, it must be on our side that for DC the rate being passed is incorrect. We are using taxjar so im guess thats a bug on their end, not stripes

#

thank you for showing me that expand option. Ill continue to look into this with taxjar, sorry to have wasted your time.