#ashish_code

1 messages ¡ Page 1 of 1 (latest)

spark bobcatBOT
#

👋 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/1261356497971974157

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

wicked cove
#

Is there a way that I can use Address element and it will automatically take care of tax calculation ?

wraith hill
wicked cove
#

Nope, I don't have request Id

#

Soprry

#

here is the one

#

req_8kr6AZDfbORHWx

#

I tried Address element but still tax is null in subscription

#

invoice

wraith hill
#

I meant a Request ID for the request that gave you the error

wicked cove
#

req_8kr6AZDfbORHWx

#

req_4KVQ7ZCqxkAWF8

wraith hill
wicked cove
#

Ah this is the one that failed recently
req_4KVQ7ZCqxkAWF8

#

This one is from Canada
req_oeLHbNacP0Jvys

#

Company is registered as BC, Canada

wraith hill
wicked cove
#

is

wraith hill
#

You have to enter a full address on the Customer. It can't be just a country and a state

wicked cove
#

How about when we create subscription without automatic_tax. And then before client pays we update customer address and update the subscription and use latest_invoice's payment_intent to create the element to capture the payment ?

#

Will that latest_invoice will have tax automatically calculated ?

wraith hill
#

Not if there's not a full address

wicked cove
#

So is this what I can do ?

Subscription (without proper address / no auto tax) --> Collect address using AddressElement --> Update Address of Customer --> Update Subscription(auto-tax) --> CheckoutElement --> This should have now tax.

wraith hill
#

I'm not sure what CheckoutElement is, but other than that it should work

wicked cove
#

Sorry it's PaymentElement(React Element) to capture Payment

wraith hill
#

You can actually combine the Address Element and the Payment Element into one step. You just display them in the same form

wicked cove
#

But I cannot create subscription with autocollect atx

#

So if I use AddresElement and PaymentElement together, I don't have to change subscription(automatic_tax) to true to calculate tax automatically ?

wraith hill
#

You do, you just don't have to collect a Payment Method and update the Customer address in different steps.

#

I would recommend building a prototype of the payment flow and just experimenting at this point

wicked cove
#

Thank you

#

That should be all.