#billwind_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/1229913071250706497
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
I hope this message finds you well. We are currently in the process of integrating Stripe into our mobile app and require some guidance on setting up our payment flow, especially concerning the tax calculations based on the credit card billing address.
Payment Flow Overview:
Checkout Page: Users see the total payment amount, with tax to be determined post credit card entry.
Payment Method Selection: Users select and save their payment method.
Return to Checkout: After saving the payment method, users are directed back to the checkout page where the tax is then calculated using the Stripe Tax API based on the billing address provided.
Final Payment: Users review their total amount, now including the calculated tax, and proceed to payment upon pressing the "Pay" button.
Stripe API Interactions:
Entering Payment Information: Capturing and saving the user’s payment method details.
Calculating Tax: Utilizing the Stripe Tax API to calculate tax after the payment method is saved.
Executing Payment: Processing the final payment with the tax amount included.
As our team is relatively inexperienced with developing payment systems tailored for the US market, we are particularly keen on understanding the best practices for implementing the aforementioned flow. We are unsure about the technical steps involved in transitioning between saving the payment method and recalculating the checkout total to include the appropriate tax.
Could you provide us with:
Detailed guidance or documentation specific to implementing such a payment flow using Stripe APIs?
Any examples or references to similar setups that might help our developers better understand the process?
Recommendations on handling tax calculations efficiently within our app’s checkout process?
We appreciate your support and look forward to your expert advice to streamline our payment integration and ensure a smooth user experience.
Thank you very much for your assistance.
Hi there!
Hi!
I recommend starting here:
https://docs.stripe.com/tax/how-tax-works
Thanks for getting back
When you say "integrating Stripe into our mobile app", do you have more details? Are you using one of Stripe's mobile SDKs?
Yes, I believe we are using the mobile SDKs. Actually we already did the Tax part, but currently the tax is calculated based on IP address, which we do not prefer.
I am not from the development teams, they don't speak English, so I will try to give you as much detail as possible
We want the flow to be like this, this is from Turo. I believe they are using Stripe as well
This is our current payment part. We do not want this. We want a more intergraded version which is what I just showed you. Beside, this one will not be able to help calculating Tax, given that we have a Credit point system where customer can use the credit to pay part of the payment
Just to be clear, you don't want to use the Payment Sheet to collect card details?
What do you mean for the payment sheet? Like after entering the card details it goes straight to the paying button?
Actually we already did the Tax part, but currently the tax is calculated based on IP address, which we do not prefer.
We fall back to IP address if we don't have customer addresses or an address for a PaymentMethod: https://docs.stripe.com/tax/customer-locations#address-hierarchy
I'm comparing the screenshots your shared above. The three panels are from Turo, the single panel is from your app? The single panel uses the Payment Sheet to collect card numbers, while Turo seems to be using something else, or perhaps a heavily customized sheet
Understood, yes, IP address will be our second choice to calculate tax. We would prefer calculating it firstly based on billing address. If we do not have it, we will use IP
Yes, we want to use the Turo version
If we are using the payment sheets, how do we calculate the TAX based on billing address? is there a page after entering the card details that can shows the amount detail before the final pay action?
Do you have an example PaymentIntent or Customer ID I can review?
Do you mean our Stripe account? Or the APP itself?
No, I'd like to look at an example payment where tax was collected based on IP address
pm_1Ox30OE4cN2szyO0pW3ODjEC
this is one of the ID for the testing payment. will this help?
pm_1P5G1eE4cN2szyO0R0KAyh7o another one
Where do you see that tax was calculated based on IP address?
Taking a step back, the two IDs you shared are PaymentMethods. In this case, these represent test card numbers.
I'm not sure if we can see it through Stripe. But it showed on our app before the payment
like the total payment already included the calculated tax
I see each of these PaymentMethods was created when confirmin two different PaymentIntents. These PaymentIntents were created directly using some Java code. Your code sets the amount for the PaymentIntent.
So, for one of the PaymentIntents, your code created it with an amount of 20000: https://dashboard.stripe.com/test/logs/req_L440XVEbNWuJcK
For the other PaymentIntent, your code calculated tax first, using an IP address: https://dashboard.stripe.com/test/logs/req_m7hOqnD88c7BXW
No tax was determined for this amount of 847000
Sorry I'm not a technical person. What is your working time? I probably need to set up a meeting with our technical team to talk to you
We typically engage with developers in this channel so I recommend having someone from your technical team return here. We typically have this channel open 8am Singapore time on Mondays to 5pm Pacific time on Fridays
Thank you. So this one used the IP address. But why is the amount 847000?
Alternatively, you can reach out to our Support team and continue the conversation asynchronously, and cc any technical folks from your team to the thread: https://support.stripe.com/contact/
I recommend looking at the tax_breakdown in that response. The tax was in the amount of 0 based on CA sales tax and the tax code provided
got it. Before I talk to them. I need to figure out with a plan for our payment flow. Do you think the Turo version is doable?
Or if not, if we use the payment sheets, are we still able to calculate the tax based on billing address?
Do you know if your team plans on continuing to use Tax Calculations instead of Stripe Tax (where tax is calculated automatically)?
Wait, we are using Stripe tax
Aren't we?
Basically we want to use Stripe for every payment part. And we do use Stripe Tax
Yes, but specifically Tax Calculations. That means you have a bit more control over the parameters used when Stripe calculates tax: https://docs.stripe.com/tax/custom#calculate-tax
OK
So, in the example you shared, the reason IP address was used to calculate tax is because your code passed IP address (instead of a postal address) when creating the calculation
Depends on your integration. How are you currently collecting addresses from customers?
No. That is the problem here. That's why we want the card detail first.
We do not collect address now, because it
it's a service
I see your test logs show a mix of iOS and Android SDKs. Are you developing two mobile apps, one for iOS and one for Android?
I recommend using the AddressElement to collect complete addresses: https://docs.stripe.com/elements/address-element
The mobile payment sheets will only collect minimum required address information for a successful payment based on the payment methdo used
So we use this to collect their address first and let them fill in the card details afterwards?
Right. I recommend having your technical team reviewe the AddressElement guide and play around with it first to see this in action
how about this one https://docs.stripe.com/payments/save-and-reuse
Can we use this to collect all the information at once and use the address for TAX calculation?
You'd still have to use the AddressElement to collect address details in full
I don't know their exact integration design, no
OK, got it
Thank you for the help
Can we still talk here if I have any thing for help later?
Thank you