How to integrate Stripe subscriptions in y app? Is this good flow?
From frontend i call direclty this.stripe.createPaymentMethod and pass card details to stripe.
Than i call BE route ‘/create-subscription’ and pass to it PaymentMethodID, price, subscription interval etc and details about customer.
Then Be will create customer and sub for him.
Price is dynamic and it is calucalted based on what user defined in system. I can not have fixed price in stripe and just pass some priceID to stripe. I need to pass from FE price to BE. But it is not good i guess?
What do you think about this whole flow?
Importan thing is that form should be embeded.
I am FE developer and i need to find the best way how to handle this integration. They expect that from me.
user25584098 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.