#Pavan
1 messages · Page 1 of 1 (latest)
I need to create a checkout session for my User,
The user comes to the product page and selects the product,now how to create a checkout session over here
I don't want to take the price id as this keeps on archiving
always in Payout page it should show the product default price id
So it sounds like you are currently creating Prices inline?
As opposed to ahead of time and passing the Price ID to the Checkout Session?
yes, but i don't want this approach.
I want to create a checkout session for my Users who will be subscribing to a service on yearly basis and i on recuring basis
Ok. Sorry I still don't understand the issue you are having. I'm going to need a lot more details to be able to help you
What is the issue with creating a mode: subscription Checkout Session?
I want to know what is the key which will be passed in curl to link the product for payment process
can we please have a quick call on this?
No we can only do chat here. If you need a call you will want to work with our Support team via https://support.stripe.com/contact/login
You pass the Price ID to the Checkout Session: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price
As i mentioned before I don't want to pass price id
I want to pass product id as my price keeps changing
Your two options are to create the Price inline via price_data or pass a Price ID
There are no other options
-u sk_test_123: \
-d success_url="https://example.com/success" \
-d "line_items[0][price_data][product]"="prod_123" \
-d "line_items[0][quantity]"=2 \
-d mode=payment```
Then you would need to fill int he rest of the required price_data