#ziwengames_best-practices

1 messages ¡ Page 1 of 1 (latest)

vestal jayBOT
#

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

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

uneven meteorBOT
errant stump
#

To add to above, if a user buys the subscription with address X, but then buys an additional product with address Y, I would need to set the address from X to Y back to X. I'm trying to understand if there's a better way to manage addresses for tax purposes.

karmic moth
#

As in the user buys from you twice and puts in two different full addresses? Or are you talking about if a user switches between two credit cards with different ZIP codes?

errant stump
#

Either case would fit

#

I guess the 2nd question might not even be necessary if I better understand a proper process to use automatic tax

karmic moth
#

Yeah, the credit card switch shouldn't change your tax location as far as I am aware, so you shouldn't need to change anything there

errant stump
#

I think the tax location is based on the address provided by the credit card info?

#

Btw I'm using stripe elements

karmic moth
errant stump
#

If I don't set the customers address, it ends up using the address associated with the card

#

If the transaction is tied to a payment method with full billing details we use that billing address.

karmic moth
#

Ah, my apologies for being wrong there.

errant stump
#

No worries

karmic moth
errant stump
#

Yea my point was if I finalize an invoice before they even submit a payment method, how would stripe calculate the correct tax

#

I've tried that (without setting a customer address) and I had an API error

#

So it seems like it's necessary to set the customers address if using automatic tax

#

This point leads to my 2nd question, which I describe was annoying to constantly set the customers address every time they paid using a different address

karmic moth
#

Yep, unfortunately that is a tricky situation with elements. One solution I have heard of is to use our upcoming invoice endpoint to preview the price as the customer puts in different addresses at checkout https://docs.stripe.com/api/invoices/upcoming

errant stump
#

Just taking a look give me a sec

#

A related question to clarify my understanding: Once a customer's billing/shipping address is set, does the billing/shipping addresses collected from all future credit cards used not affect the tax?

It seems like it only takes the address associated with the customer object.

karmic moth
#

Yes, we use the first item in that list that exists fr the customer. So if the shipping or billing address is set, we would always use that over the address set on the payment methods

errant stump
#

How do tax codes per product affect this process

#

Does it just choose the tax rate based on the customer address AND tax code id

#

I guess to clarify, is it the developers job for automatic tax to charge the right tax percentage (which might be wrong if it takes the wrong type of address)

#

I think certain products are supposed to be taxed the shipping vs billing address

karmic moth
errant stump
#

Ok thanks for the link. Back to the first question (I viewed the links you sent and it didnt answer this question):

Suppose I create a subscription charged to location A with card A. Then they purchase a product to location B with card B. Then the subscription renewal will automatically charge card A. Does this mean I will have to change the customers address to location B right before they charge card B, then change the address back to location A for tax purposes?

karmic moth
#

Unfortunately that is also more of a compliance question so I don't know enough to speak to how that would work. This server is more for the coding side of things so I know how to update these fields with code but don't know the complexities of what is expected to charge the proper amount of tax here. I have not heard of other users having to switch this this frequently but I don't know enough to say for sure one way or the other

errant stump
#

Ok thank you