#cuperdino_best-practices

1 messages ยท Page 1 of 1 (latest)

vale stratusBOT
#

๐Ÿ‘‹ 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/1284063731126636609

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

graceful depot
#

Hi, let me help you with this.

#

Checkout is hosted by Stripe, meaning you will need to redirect your customers outside of your app.

#

For iOS, I recommend you to stick to Mobile Payment Element with PaymentIntents, handle the items on your own, and just send the total amount to Stripe. You can of course still use Stripe Prices/Products as database for your assortment, if you want, just to keep track of the amounts.

glad axle
#

Thanks for the response! How would this work with regards to tax calculation? We want to have automatic tax calculation, and since tax can be different for different product categories, or even based on the amount within a product category (clothing under 110 USD is not taxed in NY, while over is etc). Is it even possible to then do automatic tax calculation, or should we manually call out to the tax calculation api for example, and then provide the total amount?

#

And also do note we have just started looking into all of this, so I probably have a lot of misconceptions about how everything works ๐Ÿ˜„

graceful depot
#

Stripe Tax (automatic) is suppored for custom integrations with PaymentIntents, you will just need to provide the correct information to the tax calculation request: https://docs.stripe.com/tax/custom

glad axle
#

So the flow would be, create payment intent, calculate taxes, and provide the total amount to stripe, and that's it basically?

graceful depot
#

Correct

glad axle
#

So the tax would have to be calculated and attached to the amount of payment intent (as the payment intent is the object that contains the amount) I am asking since the payment intent might be created many times, meaning the taxes might be calculated quite a few times without a purchase being ever completed. And from what I see, there is a cost attached to the Taxes API (0.05 per calculation if I am not mistaken). So just trying to see how to best approach that

graceful depot
#

Yeah, that's true. You might want to save the tax calculation to the last step in your checkout, but yeah, some will be wasted, unfortunately.

glad axle
#

Ok, thanks for the repsonses, vanya, I appreciate it, you were very helpful!

graceful depot
#

Happy to help.

glad axle
#

Is it possible to update the amount on a PaymentIntent somehow? For example return the intent without taxes, and upon payment calculate the taxes and attach them to the intent before finalising it?

glad axle
#

Awesome, thanks for the link