#JamieJames - Payment Flow Implementation
1 messages ยท Page 1 of 1 (latest)
Hello! To clarify, are you using the Card Element or the Payment Element? It sounds like it might be the latter?
I'm not sure off the cuff - one sec, let me look
Ah, elements.create('payment', {....
Yep, that's the Payment Element, which is not compatible with the payment flow you're describing. The Payment Element both collects payment info and confirms the Payment Intent at the same time. If you want to separate those two steps you would need to use the Card Element instead.
Or other individual elements, if you want to accept more than just cards.
Then you can use stripe.createPaymentMethod on page 3 to create a Payment Method: https://stripe.com/docs/js/payment_methods/create_payment_method
Thanks Rubeus, that is exactly what I needed!
And then on page 4 you can confirm the Payment Intent with the Payment Method created on page 3: https://stripe.com/docs/js/payment_intents/confirm_card_payment#stripe_confirm_card_payment-existing
I managed to get a long way without realising there were two options here
Looks like my long day is about to get longer. Hopefully the re-arrange wont be too tricky though. I'll let you know either way ๐
Thanks again, massively appreciated.
This is the guide you want I think: https://stripe.com/docs/payments/accept-card-payments?platform=web&ui=elements
But you'll need to modify it a bit for the flow you want (as I described above).
๐