#bachir2921
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- bachir-paymentelement-order, 17 hours ago, 6 messages
- bachir2921, 23 hours ago, 10 messages
- bachir2921, 1 day ago, 5 messages
- bachir2921, 2 days ago, 39 messages
- bachir2921, 6 days ago, 4 messages
Hmm, why do you need to use paymentMethodCreation: manual?
To create the payment method first, then attach it to the customer before creating the subscription. I was following this https://stripe.com/docs/payments/finalize-payments-on-the-server?platform=web&type=subscription
Is there another way ?
To be more specific this is the doc https://stripe.com/docs/payments/accept-a-payment-deferred
(I want to do the confirmation on the client, not the server)
Why specifically do you need to attach it to the Customer manually? That should just happen as part of the default Subscription flow when the Payment/Setup Intent is confirmed
So I just need to set the PaymentElement mode to "subscription" and that's it ?
That flow will attach the generated pm_xxx to the cus_xxx specified, yes
(it has to be attached in order to be reusable)
Okey thanks, I'll give it a try
Sorry got mixed up with all the docs
Actually, I can't really pass the "mode: subscription" to the PaymentElement because I'm instantiating the PaymentElement using a payment intent client_secret.
We can either process one-time or subscription payments based on what the customer is buying. How can I handle this switch ?
I'm confused. How are you combing a mix of both the deferred and non-deferred flows?
Which part, specifically? If you have a pi_xxx_secret_yyy it shouldn't matter?
I just started implementing the flow for subscriptions (deferred), but I'm wondering how to do it
But how do I handle the subscription flow afterwards ? For one-time payments :
- I call elements.submit()
- I call stripe.confirmPaymentIntent()
For subscriptions, what should I do to make a recurrent payment ?
If you're using the deferred flow then you don't have a PI/SI secret upfront. You defer the creation of the intent/sub until after you collect payment details
Well a subscription can initially return either a PI or an SI depending on if there's an initial payment. You'd check for what is returned in the response (pending_setup_intent will be null) and then call confirmPayment or confirmSetup accordingly
Can I use the non-deferred flow for recurrent payments ?
I suppose this is if I use the deferred flow ?
Yes, of course
Well it's true for both deferred and non-deferred