#Pavan
1 messages · Page 1 of 1 (latest)
hello! I'm sorry, but i don't quite understand the question, can you try elaborating with an example?
https://stripe.com/docs/api/checkout/sessions/create
In this, how do I add a product and not the price id in line items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so you want to create the product inline?
yes
there's no way to do that now unfortunately
but how price id is dynamic right?
you can create the price id inline for Checkout Sessions if that's what you're asking
My use case is I want to create a checkout session for my Customers, where they should have the option to choose if this is a one-time or recurring mode
When I am creating a checkout session I should link my customer and product
The reason why we are willing to link product is as the price keeps on updating on timely basis
is there any reason why you can't just have the same product everytime, and creating your price inline?
oh sorry, my bad, you can actually create the Product inline as well for a Checkout Session : https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data-product_data
but in this mode can be dynamic?
what do you mean by dynamic - can you provide an example?
In checkout page my user should have the option to choose either it is a single payment or recurring payment