#sarfaraj_82227
1 messages · Page 1 of 1 (latest)
Hello sarfaraj_82227, we'll be with you shortly! Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
• sarfaraj_82227, 1 day ago, 22 messages
Hi 👋 in that case you'll want to use price_data, to create an adhoc Price, instead of using price:
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data
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, price_data is a hash that has fields within it that allow you to construct a Price adhoc. The link I provided takes you to our API ref where you can see the full structure of that hash.
You'll need to provide at least:
price_data.currency
price_data.product (or use price_data.product_data if you aren't using an existing Product)
price_data.unit_amount or price_data.unit_amount_decimal
okay thanks mate