#yungfetus
1 messages · Page 1 of 1 (latest)
mind sharing an example request ID for the error'ing request? I can have a look
also, hello!
req_jZHHabe4yVXnR9
Also just to mention my goal here is to have set a fixed tax rate based on a users geolocation, different tax rates for each location
Using ruby
error is occuring in Stripe::Checkout::Session.create
thanks, looking
that's an unrelated request
ah you meant this https://dashboard.stripe.com/test/logs/req_DIIH3A398RGczG
yes, sorry
ok looking, give me a sec
thanks
yeah so you need a Price object which you aren't using. What you need to do instead is to dynamically create a Price using the price_data hash: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data
so instead of passing amount and currency and currency under line_items , you pass those under price_data
so inside line items it's price:{price_data: ...}
and this works without a price_id?
yes, price_data allows you to pass any custom amount and behind the scenes it creates a Price for that amount (but you don't need to touch that Price ID as part of your request)
the API ref link I sent will help
np!