#BoB
1 messages ยท Page 1 of 1 (latest)
Hi there, so you are looking a solution to let Stripe automatically apply the tax_rate based on the customer's location and various inputs, am I right?
yes and no...i cannot use the country of the customer, so i cannot use billing addresses
I'll recommend you to take a look at Stripe tax and see if it can solve your problem
i cannot use stripe tax because tax_id comes from the country and i'ts collected from billing address of the customer.
i have to pass the country from my back end , i thinking on using metadata of paymet intent metadata
If you can't use Stripe tax, then you need to apply the appropriate tax_rate by yourself
but i don't really know if i have to use checkout.session or paymentintent and which is the appropriate parameter to pass to the object
i mean i know that the paramter to pass is the one that i have on my backend, but i don't know which parameter of the object i have to populate to process correct payment with the right price and tax
The PaymentIntent API doesn't accept a tax_rate. I'll recommend you to use Checkout Session API and specify the tax_rate in the line_items (https://stripe.com/docs/api/checkout/sessions/create?lang=php#create_checkout_session-line_items-tax_rates)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yes. You can pass in ad-hoc price through price_data (https://stripe.com/docs/api/checkout/sessions/create?lang=php#create_checkout_session-line_items-price_data), or price for pre-existing price that you created upfront
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.