#bhanu365 - Subscriptions
1 messages · Page 1 of 1 (latest)
HI 👋
You can use either since both are just ways to capture payment method details. We recommend the Payment Element as it covers more use cases but if all you want is cards then the Card Element will work just fine
We just have 3 subscription (1 month, 6 months and 12 months) so i just need a functionality that customer can buy a subscription. We can show that subscription on our dashboard date time and next due date. There are auto renewal checkbox if customers checked the checkbox so the subscription will automatically renew on every month or depends on their subscription plan.
Okay...what is your real question then?
What should I need to use for this functionality like which element (payment or card ) and what steps I need to use
Okay, thats a lot bigger than just which element works. I would recommend you start here: https://stripe.com/docs/billing/subscriptions/build-subscriptions
There are 4 subscription as you can see in the screenshot. 1st one is one time payment and other 3 is recurring subscription
All Subscriptions are recurring. A one time payment is just that, a payment
The word Subscription implies a recurring charge
Can you describe me the steps as well because i have read the documents so many times but unable to do implement. There are so many confusion in the doc. I already wasted 2 weeks on it
Can you help me
Please
Okay but that's just the front-end. Do you have recurring Prices in Stripe? Customers?
As I said the first time, you can use either
Yes this is just for front-end.
Yes I have created products with recurring prices
Okay so if you already have the Payment Element up and running then it's just the basic Subscription integration.
Which is the doc I linked.
Your users select a recurring price. Your server creates the Subscription for the Customer record for that user
Your server sends the subscription.latest_invoice.payment_intent.client_secret to your front-end
Your front end uses the client_secret to create the Payment Element and you collect payment
Yes. It sounds like you have a fully functional subscription integration. Can you share a request ID for one of the subscriptions so I can check?
sub_1LZaLiFmM52WOkSo0KQDIKdW
If a user want to update their card details on our portal then what I need to use for it?
Either card or payment element will work
So I need to update payment method? Or which API i need to use for update their card details so the next time when payment automatically deduct updated card details
You would use a Setup Intent to create the new payment method for the customer
https://stripe.com/docs/payments/save-and-reuse
And then set the new Payment Method as the default for invoices by updating the Customer record with this parameter: https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method