#raam
1 messages · Page 1 of 1 (latest)
Hi there!
To create subscriptions we recommend using Checkout Session. Here's a guide on how to do it: https://stripe.com/docs/billing/subscriptions/build-subscriptions
If you really want to use the Payment Element, it's also possible. Follow this guide: https://stripe.com/docs/stripe-js/react
But for the '{{CLIENT_SECRET}}', you will need to first create a Subscription in the backend, and then use the subscription.latest_invoice.payment_intent.client_secret
please explain the second method in detail please @crimson surge
I recommend reading this doc that explains everything for subscriptions: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
But at a high level:
- Create a subscription on the backend
- Retrieve the
subscription.latest_invoice.payment_intent.client_secretand send it to the frontend - Use the
client_secreton the frontend to collect the payment information
Thank you for your help,it worked @crimson surge