#Satya
1 messages · Page 1 of 1 (latest)
I'm following this guide: https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet#react-native-flowcontroller
Hi there, tax information is not presented in PaymentIntent. Are you using Invoices or Billings?
I think technically I'm using Connect (allowing businesses to accept payments). I've been following the Payments guide I linked above. I don't necessarily need to include tax info in the payment intent, but I do want to calculate it and show it to the end user before they confirm their purchase
So you just want to calculate the tax yourselves and then specify the amount in PaymentIntent?
Thats right. So if the price of a ticket is $10, I want to calculate the sales tax (ex. $0.20), show the customer the total price of $10.00 + $0.20 = $10.20 and actually charge them the $10.20. Is that a normal flow?
Tax is complicated and I'll usually recommend user to use Stripe Tax (https://stripe.com/docs/tax) and let Stripe calculate the tax for you.
Right, I want to use Stripe Tax
Note that Stripe Tax doesn't support PaymentIntents API directly. The workaround is to create an invoice first, and pass the invoice's payment_intent's client_secret to payment sheet in your mobile app
Sorry, I'm a little confused. How would I actually use Stripe Tax to calculate the tax amount given the purchase price?
The tax calculated based on the
- Your tax settings
- The customer’s tax settings and location
- The product tax code and price tax behavior
I'd suggest you to start from this doc https://stripe.com/docs/tax/invoicing
Ok taking a look
Could I add a tax_behavior: external on a price I create, and then pass that price into a paymentIntent?
I'm afraid that's not how it works.
Stripe Tax works with Invoicing, Billing, Payment Links and Checkout integrations. So you need to use one of them so that Stripe Tax can kick in and calculate the tax, which will be reflected in the generated PaymentIntent (The PaymentIntent amount will include the tax). It also means that you don't need to create the PaymentIntent by yourself, in your case you should just use the paymentIntent created by the Invoice.
Ok, so I can't add tax with the approach im using right now? https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet#react-native-flowcontroller And I would have to switch to a different flow for charging users?
I'd say just a little variation to this flow.
Instead of creating the PaymentIntent, you should create an invoice and pass the invoice's payment_intent's client secret to the payment sheet.
Ok, how would I be able to collect the user's address?
It's entirely up to you. But I'd suggest you to use the built-in AddressSheet (https://stripe.dev/stripe-react-native/api-reference/index.html#AddressSheet) that's included in the stripe-react-native SDK.
Documentation for @stripe/stripe-react-native