#paulC-adhoc-prices

1 messages ยท Page 1 of 1 (latest)

low dome
#

Hi there ๐Ÿ‘‹ there is, you can pass values into the line_items.price_data parameter to set the price. If you don't already have a product created, then you'll need to pass in at least a name to line_items.price_data.product_data.
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data

fickle plank
#

Hi toby ! Thanks for the prompt reply !

#

Can this name be some random variable , for ex some uuidv4?

low dome
#

Yup, we aren't picky about that. I'd just recommend you test the flow and make sure it won't look confusing to your users.

fickle plank
#

Got it ! Many I ask , do these have to be unique ? Or can I just hard-code it ?

low dome
#

No, the name doesn't need to be unique.

fickle plank
#

Thanks a lot ! Cheers !

low dome
#

Any time! ๐Ÿ˜„

fickle plank
#

Sorry to bother you again , but it seems like in the docs all the prices are based on the quantity , how can I pass the amount without relying on a quantity, basically computed by myself ?

low dome
#

The easiest way would be to pass in the desired amount as the unit_amount and then just always set the quantity to 1.