#anthony_api

1 messages ยท Page 1 of 1 (latest)

agile tuskBOT
#

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

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

tender fox
wanton rose
#

thanks. my question is more, how do we call that API from within the apple pay component?

tender fox
#

No you can't, you can only call the tax calculation API from your server.

wanton rose
#

to confirm, there is no way then to preview the tax in the apple pay component โ€“ unless we use address data from elsewhere and call the tax preview before?

tender fox
#

Yes you are right. You'll want to collect the billing address from your customer first, calculate the tax before presenting the Apple Pay paymentsheet to your customer.

wanton rose
#

for shipping address, can i use the onshippingaddresschange to trigger a tax preview API call?

tender fox
#

You can, but you won't be able to update the new payment amount on the already opened Apple Pay paymentsheet.

wanton rose
#

got it. thanks so much for your help, this question can be closed!