#rsihota-charge-components
1 messages · Page 1 of 1 (latest)
You could add Stripe Tax to Checkout and accept payments that way: https://stripe.com/docs/tax/set-up
Checkout is built on top of payment intents and it can charge your customers immediately, so that feels like the ideal path
okay I see. So is Checkout then different than PaymentIntent?
And would you suggest I would need to create new products and prices on the fly? Since the amount that our customers will be paying is not a set amount, it's dynamic
Yeah. Checkout is a prebuilt payment page that creates Payment Intents and can be used to charge Tax: https://stripe.com/docs/checkout/quickstart
And would you suggest I would need to create new products and prices on the fly? Since the amount that our customers will be paying is not a set amount, it's dynamic
That's correct. You would want to create the Checkout session with:line_items.priceto handle creating the Price on the fly with all the relevant amounts.
Okay that's starting to make more sense. And I also only want to apply tax to one of the prices. So if I have multiple line_items, is there a way to apply tax to only one of the items?
Is your plan to use Stripe Tax? If you only want certain prices to not be taxed you could specify a specific tax_code: txcd_00000000 (see https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data-product_data-tax_code) to signify that it's nontaxable. You can read more general documentation on how taxes work with checkout here: https://stripe.com/docs/payments/checkout/taxes
Thanks so much! I think those documents point me in the direction I was looking for. I will give that a try.