#aer1al-checkout-plans
1 messages · Page 1 of 1 (latest)
Hey, thanks for your quick reply. Yes I have them modelled in my Stripe dashboard as two separate products
Got it. Right now there's no way to offer a selection UI in the Checkout page between 2 separate products. This is something you'd need to determine prior to creating the Checkout Session
sure
You can create an upsell, but that's between Price objects on the same Product object (i.e. a monthly subscription to yearly one): https://stripe.com/docs/payments/checkout/upsells
Probably not applicable for your use case where the actual service is difference
is there a way to pass in the ID of the product when calling on the checkout session?
so that the server can know which product to list as line item?
Only if you're using ad-hoc prices with the price_data parameter, as opposed to passing a Price ID: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data-product
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
okay so what i am understanding so far, as i am listing multiple products (standard and premium via one time payment) i should create two different checkout sessions? and i can pass the price ID of the product to the line item ?
Why would you create multiple Checkout sessions? Unless you're expecting multiple payments
Essentially you need to determine the Product the user is subscribing to before you create the Checkout Session
yeah that is fine, but how do i pass the product i just determined to the checkout session?
currently i only have a price ID for one product hard coded into the session line item
If you're using a Price ID, you can't separately pass a Product ID
The Price ID belongs to a single Product, so its just inferred
by price ID i mean the product api key
i guess it’s the product ID my apologies
so i want the user to select which product they want
and then to call the session
Yeah so you'd need to build a UI to facilitate that product selection in your own application prior to creating the Checkout Session
Then you can pass the selected Price ID to the API call
okay, i will try that thanks for your help so far