#selby14 - dynamic price + tax

1 messages · Page 1 of 1 (latest)

merry pond
#

Good question, checking in to how you may be able to do this

lament halo
#

Hi 👋 I"m stepping in for @merry pond

onyx oxide
#

hello

lament halo
#

This would require you to manage the creation of specific rates but would allow you to set them yourself on Checkout Session line items

onyx oxide
#

isn't that for a flat tax rate on every order? I would need it to only apply to orders being shipped to Florida

lament halo
onyx oxide
#

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.

lament halo
#

Are you using line_items.price_data to fill out the dynamic pricing in your requests?

onyx oxide
#

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.

lament halo
#

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.

onyx oxide
#

if I sent the name, quantity and amount in the line_item, the session was being created. Not sure why or how, but it was, so I was going with it. Testing using price_data now.

#

That was the ticket! Thank you!