#dechichi_api

1 messages ¡ Page 1 of 1 (latest)

fast rivetBOT
#

👋 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.

unreal carbon
#

What's the actual issue here? You only described what you've done so far

slow topaz
#

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

unreal carbon
#

Do you have an example Checkout Session ID I can look at?

slow topaz
#

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}`,
        })

unreal carbon
#

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?

slow topaz
#

Sure, just tried that. Got the same result unfortunately though: cs_live_a1Poo4dFKbhW0Sz3OBVa2z93j0yqbYFz6uSFcve8Ec9y7nNkFifXSj2qjf

I'm using a vpn + us credit card and billing address

unreal carbon
#

What does the information bubble show when you hover over it in that first screenshot?

slow topaz
unreal carbon
#

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

fast rivetBOT
slow topaz
#

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}`,
        })

onyx forge
#

Hello
Taking over here as two-shoes had to step away

#

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.

slow topaz
#

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.

onyx forge
#

Sure

slow topaz
#

Nevermind, we did set up tax code for the current product

onyx forge
#

Gotcha. Taking a look

slow topaz
#

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?

onyx forge
#

It is usually the tax registration or the tax code on the product...

#

what happens if you turn on shipping address collection?

slow topaz
#

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}`,
        })

onyx forge
#

yeah most likely.. I don't expect it to change anything but just curious if address is related to this

slow topaz
#

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?

onyx forge
#

I thought we asked for it with the Stripe Tax registration details

#

Oh wait, looks like video games are exempt in CA

slow topaz
#

Oh, so in that case the $0.00 makes sense?

#

Indeed I was just trying to register California again and saw this:

onyx forge
#

Yeah, try product with a different tax code

slow topaz
#

Yeah if I try something different it shows sales tax

onyx forge
#

Great!

slow topaz
#

Thanks a lot for the help!