#selby14 - dynamic price + tax
1 messages · Page 1 of 1 (latest)
Hi 👋 I"m stepping in for @merry pond
hello
I think your best bet may be to look into using Tax Rates. https://stripe.com/docs/billing/taxes/tax-rates
This would require you to manage the creation of specific rates but would allow you to set them yourself on Checkout Session line items
isn't that for a flat tax rate on every order? I would need it to only apply to orders being shipped to Florida
You can specify a dynamic tax rate and set the state parameter when creating your tax rate object:
https://stripe.com/docs/api/tax_rates/object#tax_rate_object-state
I tried that and get the following error when trying to create the session: You can not pass line_items[0][dynamic_tax_rates] when not using prices.
Are you using line_items.price_data to fill out the dynamic pricing in your requests?
I am not.
I wasn't getting that data to populate in my backend api request, but I think I figured out why, so I can go back and give that a try.
Then how are you generating the checkout sessions? Since our docs say the following:
price_data: Data used to generate a new Price object inline. One of price or price_data is required.