#hendr1x
1 messages ยท Page 1 of 1 (latest)
So normal flow of checkout is collect address data, shipping, payment, confirm. Sometimes they might go back to payment step
How do I handle that?
I should not show the form like the first time right?
Do you mean by using Checkout, Stripe's product? or you're creating your own Checkout Custom flow?
in that case, leave the payment to the last step
once a PI is confirmed you can't change anything
or do a 2-step confirmation as described here https://stripe.com/docs/payments/build-a-two-step-confirmation
I would rather the validations run instantly
this step https://stripe.com/docs/payments/build-a-two-step-confirmation#payment-method-details will do the validation
how did you get to that conclusion?
Your example code is only showing node so its hard for me to understand what is going on.
first I need to create a payment method.
Does this do a redirect under any situtation?
Its nbd...I'm just not used to it
you only have node available for the confirmation page
I'm using php + vanilla js
Hmmmmm you mean for step 6?
5
nbd
I got it
first I need to create a payment method.
Does this do a redirect under any situtation?
you can use Setup Intents in that case if you want
I just want the simpliest approach
there are several ways to achieve the same thing
it really depends on what you want, and think is the simplest
I just spent all yesterday coding a dynamically saving billing address form because confirmPayment forced a redirect and I was told any delay in sending that request could result in errors. I would LOVE to get rid of that. Does payment method or setup intents get rid of that. Essentially do any of these NOT require a redirect when collecting the payment information?
The other requirement is to be able to have a confirm page and the ability to go back and edit or delete existing payment collected information if needed
@hybrid nebula please do not jump into someone else's thread unless you're contributing to their concern/problem.
okay sorry
@stone widget ?
Hi ๐ I'm jumping in as my teammate needed to step away. Whether a redirect is required when collecting payment method details is dependent on the type of payment methods that you plan to accept.
under every available option?
sorry for being unclear
for every payment collection method you offer?
Did you see my post above about having to save a bunch of address data via ajax while they enter it because of your redirect requirement?
I would love to remove that complexity
but i need to have the payment form and billing address info on the same page during checkout
I've reviewed the thread's history, but don't think I see the context that you're referring to.
Yes, if a type of payment method that is being used requires a redirect to occur to complete it's authentication process, then all of our approaches will use that redirect.
is it possible to delay the authentication process until the confirmation page?
That is what I meant...its just a few minutes ago
No, the authentications occur when you confirm the Payment Intent/Setup Intent.
I was just shown a new approach...createPaymentMethod. Does this do a redirect when it runs?
it looks like I can use that method to delay confirmPayment until later
I'm not sure offhand.
so I need to submit a ticket or something?
This is going to require a complete recode on my end and I don't want to do that unless I know it will work
Um, maybe, it'd probably be faster to build a POC and test if it behaves the way you want it to though. (That's what I was planning to do if I got a break between answering questions)
it looks promising because there is no return_url parameter
However these is this rather vague "caution" on the docs : A created PaymentMethod must be immediately used to confirm a PaymentIntent or SetupIntent and attached to a Customer if intended for future use.
I have no idea really what that means...how long is immediately?
I'm not sure, that's a pretty new document, but I don't think it necessarily means immediate. Are you encountering errors in your test flow that indicate you're waiting too long?
no...I just got introduced to the payment element
I guess I'm gonna just build it and see
If tarzan comes back maybe you could ask him to look at this thread? He is the one that introduced it to me
@stone widget
Hello ๐
Taking over, let us know if you had a chance to test out the above and have a follow up
๐
You don't know the answer to that question difinitively do you? If payment method function requires redirect during any situations?
which function exactly are you referring to? (its a long thread so there's ton of context ๐ might take me a while to read up)
createPaymentMethod()
If I can just summarize what I want.
I want to have a "payment" step on a custom checkout flow that has the payment form (elements) along with address data. The redirect that confirmPayment has (what I coded before) requires me to save the address via ajax which I don't like. So I want a solution to collect payment details that doesn't require redirect. I also need the way to modify payment (either update or delete/create) after it has been provided. Lastly I need a confirm page during my checkout flow.
So basically what you want is to create a PaymentMethod before you proceed with intent confirmation?
I just learned about paymentmethod. I think what you said is correct however
I don't know if you're familiar with deferred intent approach that we recently introduced but that allows you to collect a PaymentMethod and other details without having an intent (PaymentIntent OR SetupIntent)
Seems to be the same as the guide I am working with : https://stripe.com/docs/payments/build-a-two-step-confirmation
As I said, I just want to be sure that createPaymentMethod never requires a redirect
I am 99% sure createPaymentMethod would not require a redirect, it would be easier to just test this out tbh. That way you can be certain of the expected behaviour
Ok. I'm coding it up now...was just hoping to spare the work but nbd. Thanks for your help