#cnguyen
1 messages · Page 1 of 1 (latest)
Hi,
When building Subscription using Stripe you should be following this recommended flow:
https://stripe.com/docs/billing/subscriptions/build-subscriptions
Yes but I don't want to use the recommanded flow with upfront subscription
Could you share your motivation about this ?
We don't like the stripe way for that
but i don't know to talk about business
i want to talk about tech
😄
Sure, then you'd create an off_session Payment Intent
Because I'm not on the sales or business part so I can 't change the flow. No power to to it ^^
Where is the doc to handle customer + pm + pi + confirm ?
We can create a PI with a PM (mandatory), but it's not mandatory to add customer information so ?
It will be if you wish to re-use the pm_xxx object. They need to be saved/attached to a Customer object to be re-used (which I guess is critical for recurring payments)
And, is it possible to do, just an authorize first. Listen the authorize successful event and create the free trial subscription if OK. And few days after, if he is not happy, we release the authorize (and cancel the free trial subscription) . And if he is happ, we capture the PI and validate the subscription ?
OK. And there is 2 ways to do it :
1 - I create the customer. I create the pm adding the customer. Then I create the pi according to the pm (with the customer already associated to the PM)
2 - I create the pm and create the pi and add the customer info on the pi creation
Or there is only one way ?
If there's no initial payment, like a free trial, then this is the best way: https://stripe.com/docs/payments/save-and-reuse?platform=web
Here, I'm asking if the best way is to create the customer and attach the the PM then do the PI. Or, if there is other way to attach the customer to a pm and do a pi ? And the address in the pm has to be fill with the customer info? Or it's automatic if there is a customer attached to the pm ?
The steps outlined above are the best way (i.e. create Customer first, then PI, then collect payment info on confirmation). Just swap out Setup Intent for Payment Intent, and pass in capture_method: 'manual'
You don't talk about the pm. When do you create the pm? Between the customer and the PI. Right?
You don't create the PM directly, we handle that during the confirmation call when you pass the Elements instance to confirmPayment function. Here: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-submit-payment