@stripe is there any way to take a subscription initial payment using handleCardPayment such that you don't have need to redirect if action is required?
-
Show this thread
-
Replying to @mattbrailsford
Unfortunately not—when handling SCA, there has to be a redirect in some form. You can present this as an iframe like Checkout (this is what `handleCardPayment` does), or you can create the PaymentIntent on the server and handle the rest on the client side:https://stripe.com/docs/payments/payment-intents/quickstart#automatic-confirmation-flow …
1 reply 0 retweets 1 like -
Replying to @stripe
Hmm, I have that working for one off payments, creating the payment intent server side then pass the client secret to front end to capture + auth via stripe.js which works great, but I can't see how to do the same for subscriptions?
1 reply 0 retweets 0 likes -
Replying to @mattbrailsford @stripe
The subscription docs says you still need to use createToken, then redirect to server to take payment, and redirect back if action is needed. I'd really like to have a way to create the subscription + a payment intent server side, then pass a secret client side...
1 reply 0 retweets 0 likes -
Replying to @mattbrailsford @stripe
...then complete that payment using stripe.js much like the one off payment so the capture of payment details + auth can happen in one.
1 reply 0 retweets 0 likes -
Replying to @mattbrailsford @stripe
This could then pay the subscription invoice, and use the same async approach for fulfilling the order server side. Does that make sense?
1 reply 0 retweets 0 likes -
Replying to @mattbrailsford @stripe
Actually, I think I might have found the answer here https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-1-handling-sca …. I think I should be able to create a customer + subscription without a card, but then grab the payment intent from the subscription.LatestInvoice.PaymentIntent ?
1 reply 0 retweets 0 likes -
Replying to @mattbrailsford
To create the subscription, you actually will need a card. At the moment, there is no flow for collecting payment details and going through SCA without calling the backend to create the subscription between those two steps. This is good feedback, though, so thanks for flagging!
1 reply 0 retweets 0 likes -
Replying to @stripe
Ahh, shoot. Then yea, that would be supper awesome if this could be added. I'm implementing this as a payment provider for an eCom platform so would be cool if I could have the same approach for single + subscription payments.
1 reply 0 retweets 0 likes
We'll definitely take this on board—thanks again, and good luck with the rest of the project! Feel free to reach out to us here if any other issues crop up.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.