#devparry
1 messages · Page 1 of 1 (latest)
Hi there!
is this a one time payment or recurring payment?
recurring
by "checkout" do you mean Checkout Session?
yes
then here's the guide you should follow: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=stripe-hosted
and how i can fetch the stripe plans ?
with this, if needed. but it's probably simpler to store these plans on your end directly (in a database, or hard coded somewhere): https://stripe.com/docs/api/prices/list
okay do Stripe have any webhook that helps to know when any plan create on stripe ? so that all plans are async with stripe with my database ?
sure, like price.created https://stripe.com/docs/api/events/types#event_types-price.created
sure, what's your question?
first of all, we have to create a product under the stripe then we have to assign or create price under it ?
that's what we recommend yes, but you don't have to. it's possible to use Checkout Session without any Price by using price_data instead: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-price_data
👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
how may I help?
let me explain what is our requirment
please based on that suggest me the steps
-
We have a course website,
-
First we have to display All the subscription Products under the course create | edit pages where Admin can assign multiple products to a single course. ( these assign product id we will store under our local DB )
-
On the course page for front-end users we have to display assigned plans in the drop-down list. so that the user can select one subscription plan and based on the selected plan system will redirect to stripe session checkout for payments
-
Once the payment done we have to store the success subscription detail on localDB
could you please suggest to me how I can achieve this?
are you managing the product catalog in Stripe?
Yes
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
then you don't really need to store the products under your DB
since they are already stored in Stripe
this is a guide on "how to manage products and prices at Stripe"
once that's done you move to creating the subscription https://stripe.com/docs/billing/subscriptions/build-subscriptions
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
but you also need the prices https://stripe.com/docs/api/prices/list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
is products also contain price related data?
no that's why I suggested also the List Prices API
but we have to display product details
do we need a add a loop for this to get product price list ?
Yes you need to iterate on both APIs my colleague shared with you