#mattwiner_api
1 messages ¡ Page 1 of 1 (latest)
đ 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/1308147028382978171
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- mattwiner_tax-calcuation-address, 22 minutes ago, 9 messages
Note that this field will not be presented for all countries
ah. good point.
But where it is available, you could use this two-step pattern to create & inspect a ConfirmationToken that include the payment method details, prior to final confirmation of the payment:
https://docs.stripe.com/payments/build-a-two-step-confirmation#create-ct
The payment_method_preview there contains the billing_details collected in Payment Element (and/or Address Element in billing mode), including the postal code:
https://docs.stripe.com/api/confirmation_tokens/object#confirmation_token_object-payment_method_preview-billing_details-address-postal_code
gotcha. ok that makes sense.
This would give you a chance to grab that address detail, calculate the tax, optionally show it to your customer before a final buy button to confirm the payment.
so I would get the confirmation_token_object, do the tax calculation based on the returned info. Display to customer, and then they can click pay
Yep, and you pass the confirmation token ID in that confirm call to carry forward the already-entered payment details
got it. thank you