#ferguson-subscription-defer
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.
- ferguson_goose, 5 hours ago, 8 messages
- ferguson_goose, 5 hours ago, 5 messages
Hi 👋 you have two options there. You can either wait until your customer selects what they want to subscribe to before creating the Subscription, or you can look into our deferred flow where creating a Subscription object happens pretty late:
https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=subscription
I'm not 100% certain the Payment Request Button (if you're building a new integration you may want to look at our newer Express Checkout Element instead) supports processing Subscription payments. If it does, I'd expect that you would create the Subscription first, and then use the client secret from the Payment Intent for it's first Invoice to process the payment with the Payment Request Button. Essentially skipping the step to create the Payment Intent and using the client secret from another intent.
https://stripe.com/docs/stripe-js/elements/payment-request-button?client=react#react-create-payment
I guess there is no way to create a user and subscription after creating a payment intent?
The reason I ask this question is that we don't collect users email - we get it from billing_details. So we can't event check if we already have the user. Now our flow is - create a blank user => create a subscription => collect the payment => update user's email using email provided from charge.billing_details.email.
Maybe there is some workaround?
You could, but it likely wouldn't be terribly clean. To do that you'd have to first create a distinct Payment Intent to process the payment. Then create a Customer and Subscription, but at that point you'd also want to create the Subscription in such a way that it doesn't try to immediately process a payment (since you already handled that with a separate Payment Intent).
ferguson-subscription-defer
We usually recommend an integration like this now: https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=subscription
That will work for me. Thanks!
But it's still not clear for me what to do with payment request button. You advice me to try not to create a payment intent using stripe.confirmCardPayment but create a subscription item and use the intent from subscription?
You should move to using ExpressCheckoutElement https://stripe.com/docs/elements/express-checkout-element instead of PaymentRequestButton.
Or just move to PaymentElement and let us do it all for you including ApplePay and GooglePay: https://stripe.com/docs/payments/payment-element
I got it. Thanks a lot