#dechichi_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1260300241261826131
đ Have more to share? Add details, code, screenshots, videos, etc. below.
What's the actual issue here? You only described what you've done so far
Apologies, I overlooked that. The issue is that calculated tax is always $0.00. Even on jurisdictions we are registered and should be collecting taxes
Do you have an example Checkout Session ID I can look at?
Sure: cs_live_a1apu06aKZjTuvy5UnImAnngmmv97swGd5VqwtdTYO6Od1BZqNxcerdoRq
And the nodejs request if it's helpful
const stripeSession = await stripe.checkout.sessions.create({
ui_mode: 'embedded',
automatic_tax: { enabled: true },
customer_email: customerEmail,
line_items: [
{
price: priceId,
quantity: 1,
},
],
currency,
mode: 'payment',
return_url: `${baseUrl}/checkout/return?sessionId={CHECKOUT_SESSION_ID}`,
})
So the Price you specified only works for usd currency, but the customer_email you provided maps to a Canadian credit card. Can you try removing the customer_email, then setting your proxy to United States, and try again?
Sure, just tried that. Got the same result unfortunately though: cs_live_a1Poo4dFKbhW0Sz3OBVa2z93j0yqbYFz6uSFcve8Ec9y7nNkFifXSj2qjf
I'm using a vpn + us credit card and billing address
What does the information bubble show when you hover over it in that first screenshot?
Can you try passing product_data.tax_code: 'txcd_10201001' in the Checkout Session? I didn't think that part was required, but the docs mention it explicitly, so I'm wondering if it is
Sure, trying it now!
Ok just tried it and unfortunately it continues to show 0.
cs_live_a1EKT4Dxdiug4lRDYDNSsGLT4UVXKYTePaX4tLgxIsfmCZFvluJy54niEI
code:
const stripeSession = await stripe.checkout.sessions.create({
ui_mode: 'embedded',
automatic_tax: { enabled: true },
// customer_email: customerEmail,
line_items: [
{
// price: priceId,
quantity: 1,
price_data: {
tax_behavior: 'exclusive',
currency: 'USD',
unit_amount:1299,
product_data: {
name: 'Suck Up!',
tax_code: 'txcd_10201001'
}
}
},
],
currency,
mode: 'payment',
return_url: `${baseUrl}/checkout/return?sessionId={CHECKOUT_SESSION_ID}`,
})
Hello
Taking over here as two-shoes had to step away
Can you check this guide and see if you missed a step?
https://docs.stripe.com/payments/checkout/taxes
Mainly the tax registration in the dashboard
in test mode
ah whoops sorry!! you did mention that you've registered it in live mode and this is a live mode checkout session.
Yeah this one is in live. For context here is the product id and price id I'm using:
prod_QPMbRdPJFxU9j3
price_1PaiX2CpeZjMxtJkKNNbMKIR
Going over the documentation now
So going over the documentation there is only one thing I believe we didn't do, which is to specify the tax_code (marked as optional). But let me try creating a new product/price and see if that works.
Sure
Gotcha. Taking a look
I'm wondering, if the setup looks correct, and the embedded checkout does calculate taxes, it's just always $0.00, is it possible to check if perhaps the calculation is indeed happening, but for some reason always returning zero, and what could be the reason? For instance, because Stripe thinks we don't need to pay taxes in the specific state?
It is usually the tax registration or the tax code on the product...
what happens if you turn on shipping address collection?
That would be on the api request?
const stripeSession = await stripe.checkout.sessions.create({
ui_mode: 'embedded',
automatic_tax: { enabled: true },
customer_email: customerEmail,
line_items: [
{
price: priceId,
quantity: 1,
},
],
shipping_address_collection: {allowed_countries: ['US', 'CA']},
currency,
mode: 'payment',
return_url: `${baseUrl}/checkout/return?sessionId={CHECKOUT_SESSION_ID}`,
})
yeah most likely.. I don't expect it to change anything but just curious if address is related to this
No luck :/ cs_live_a1sgQktm8Q5TDHt5PN0PahDKwSGObWnlCprIrp0ppRHd49DwK0dxF1dqN6
We've noticed stripe never asked us for our Sales Tax Id. Is this something we should need to setup on the Dashboard?
I thought we asked for it with the Stripe Tax registration details
Oh wait, looks like video games are exempt in CA
Oh, so in that case the $0.00 makes sense?
Indeed I was just trying to register California again and saw this:
Yeah, try product with a different tax code
Yeah if I try something different it shows sales tax
Great!
Thanks a lot for the help!