#negative10xprogrammer
1 messages · Page 1 of 1 (latest)
Hi there!
sup!
PaymentIntent and SetupIntent work very similarely.
And once a SetupIntent is succeeded, then it generates a PaymentMethod that you can reuse in the future.
I recommend reading this: https://stripe.com/docs/payments/setupintents/lifecycle
My current flow looks like this, using the .net sdk
stripe is called on the client, asking for a paymentmethod token... we then use this to create a setupintent.
but this needs to be confirmed again on the client right via the returned clientsecret due to off-session usage etc? this flow sohuld work?
at this point, it is processing, until authorized on the client, afte rwhich it should be marked as successful? waht happens if they don't proceed with authorization?
nvm it will be requires_action, not processing
and processing should be very quick?
The correctly flow is:
- Create a SetupIntent on the backend
- Use the client_secret on the frontend to collect payment information with the Payment Element
- Confirm the SetupIntent on the frontend. at this step the user may need to take some actions
- Once done, the SetupIntent should become successfull
yes, but first the client gets the paymentmethodtoken and apss that into the backend, so that we can create a customer before creating a setup intent, no?
client => paymentmethodtoken => create customer on backend => create setup intent and pass that customer in => confirm
setupintent is now requires action => if they authorize => processing => succeeded?
client => paymentmethodtoken => create customer on backend => create setup intent and pass that customer in => confirm
That's possible, but that's not the recommended flow.
You can learn more about this here: https://stripe.com/docs/payments/save-and-reuse?platform=web&ui=elements
ok, i think it's already done so i won't change it for the time being. But it sohuld work?
anyway, it says there's a chance it might be processing for days... does the same apply for payment intents? anand should it eventually become succeeded? like can i treat it as succeeded?
hm ill check out the link
its not entirely obvious to me why it's not recommended?
also, for cards, processing is almost always near instant?
i.e. never more than a few minutes?
usually client side confirmaiton is recommended because it makes it easier to handle 3D Secure and other authentication actions
cards never enter the processing state, that is for other payment methods
@remote lanternbut we do return the clientsecret ot the client for final authorization
ok nice!
and that goes for setupintents as well? is "processing" the same idea here
yes
one last question, does this apply also for klarna?
once they have confirmed in the klarna popup, it will be marked as succeeded, right? because klarna takse it from there?
with Klarna there is immediate confirmation of success yes, you get a webhook when the customer authorises