#jmillard-confirm-paymentintent

1 messages · Page 1 of 1 (latest)

ivory delta
#

@inland locust that isn't really how PaymentIntents have been designed/built

inland locust
#

Thanks mate, one more thing to confirm. We also have a requirement to be able to complete a payment using a stored card. I did a prototype with the following flow: Create Stripe Session -> Redirect Customer to Payment URL -> Customer fills form and presses submit -> Redirect Back to Site Success page -> Retrieve Session with session_id -> retrieveSetupIntent with sessionId -> CreateCustomerObject -> AttachPaymentMethod to Customer -> RetrievePaymentObject -> Store the PayMethodId.

Then in the future I use that PayMethodId to make stored card payments by creating paymentIntents.

Does that above sound like the correct solution for stored card payment flows?

solar quest
#

to clarify, are you using Stripe Checkout with mode=setup?

inland locust
#

Hey Alex, yes we have mode=setup and we are using the url returned from the session create (I think that's checkout?)

solar quest
#

i would have done it differently

#

i would have

  1. created a Customer,
  2. created a Stripe Checkout with that Customer id
  3. Upon successful completion of the Checkout, you would receive a setup_intent.succeeded event (amongst other events), and the PaymentMethod is already automatically attached to the Customer