#aer1al-checkout-plans

1 messages · Page 1 of 1 (latest)

untold narwhal
#

Hey! How do you have these plans modelled in Stripe? Are they separate Products?

gray arch
#

Hey, thanks for your quick reply. Yes I have them modelled in my Stripe dashboard as two separate products

untold narwhal
#

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

gray arch
#

sure

untold narwhal
#

Probably not applicable for your use case where the actual service is difference

gray arch
#

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?

untold narwhal
gray arch
#

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 ?

untold narwhal
#

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

gray arch
#

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

untold narwhal
#

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

gray arch
#

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

untold narwhal
#

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

gray arch
#

okay, i will try that thanks for your help so far