#usama_sa
1 messages · Page 1 of 1 (latest)
Hi
I don't want to charge them again as they paid for first month already through payment intent.
You should'nt use your own PaymentIntent here at all. You should be using the Subscirption's invoice's payment_intent
I invite you to follow this guide:
https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
Can I use that to load the payment form directly into the webpage without using stripe checkout page
Also 2nd thing is the entire scenario here is dynamic as we don't know what will be the price for the subscription, as that depends on usage client selects, So based on that I create the product and price on stripe for subscription. So will that work with subscriptions invoicing?
You create the Subscription and then use it's invoice's PaymentIntent in order to display Stripe Element and accept the payment
I don't understand this part yet sorry, however you need to create the Subscripion and accept the payment after you know the prices.
So the subscription price is not fixed at all in our application. Take it like this...
We give a form to user to select how many emails they want per month, based on what they choose we calculate the per month price for the subscription using the parameters we set. Once the user confirms their usage at that time we know the exact price for which we are creating subscription. So if use subscription invoice can I use it for dynamic prices or is it for fixed pricing.
Check the image once client clicks the subscribe buttons thats when we know what will be price we come to stripe for all the processing
This can be handled by Stripe metered prices, check this guide:
https://stripe.com/docs/products-prices/pricing-models