Stripe Pro Forms - Users having to submit form twice

I’ve had several reports from users who say have gone through payments saying that when they post the form, the page just refreshes and they are left not knowing if the payment has gone through or not.

When I check the Stripe developer logs, I can see that a payment_method request and response were successfully fired, but the process stops here, no customer is created and no payment_intent request made.

When I check the logs I can see a lot of instances where there are two payment_methods requests made for one customer. Normally a few minutes apart. Making me think that a lot users are experiencing this behaviour and are being forced to go through checkout twice.

I’m hoping that someone in the community has seen something similar and can shed some light on this.

Any insights would be appreciated,

Allan

I had not seen this happen before, but sounds like it’s happening regularly for you. Let’s troubleshoot it.

I’m glad you had logging enabled to help us with it. Where you say it stops, what difference do you see with other entries where it went through fine? Does it mention any errors?

Could you quote one here? (changing any sensitive information)

I’m guessing you checked in the Stripe API log. Did you look for relevant entries in other logs in case there’s something else?

What s2 Framework and Pro versions are you using?

:slight_smile:

Thanks for getting back to me Cristián.

I don’t have s2Member logging enabled in my live environment, I was referring to the Stripe API logs and that is all I have to go on for the moment.

Is it safe/possible to enable s2Member logging for a few hours to try to capture this?

I have version 230815 for the Framework and Pro versions.

What I am seeing in the Stripe API logs, is that for between 30% and 50% of my sales flows there are two payment_methods calls made for one customer. The second call is normally made between 1 and 3 minutes after the first one. There is often no difference between the request and response body of each request, although sometimes the billing address info missing in the first call.

stripe-api-log

Given that that appears to happen so frequently, and only a few users have reported an issue (Nowhere near the 30% - 50%), I’m starting to think that perhaps this is normal behaviour and there’s something I’m not aware of in how s2member’s pro form is handling the flow of events.

Is anything happening on the stripe pro form that would cause a payment_methods call to be made to stripe before the user has submitted the form? Like when they enter their card details or modify the country drop down, maybe a javascript call is made?

Is it safe/possible to enable s2Member logging for a few hours to try to capture this?

Yes, that’s alright, even for days while troubleshooting. Then when you don’t need it, you can disable logging and remove the logs.

Is anything happening on the stripe pro form that would cause a payment_methods call to be made to stripe before the user has submitted the form?

The Stripe part of the form is an iframe from Stripe Elements, not handled by s2, s2 doesn’t see the payment details.

only a few users have reported an issue (Nowhere near the 30% - 50%), I’m starting to think that perhaps this is normal behaviour

Could be. Stripe’s logging shows many entries for a single payment, a lot goes on back and forth.

When you say they reported, did you look up the entries specific to the users reporting the problem? Would be great if you could spot those.

And keep s2’s logging enable for the time being, in case it can gives us some insight next time someone reports having this happen.

Did you try reproducing the behavior, and if successful, do you know the steps so I try it?

:slight_smile:

Yes, that’s alright, even for days while troubleshooting. Then when you don’t need it, you can disable logging and remove the logs.

Excellent. Thank you.

When you say they reported, did you look up the entries specific to the users reporting the problem? Would be great if you could spot those.

I did. So for the user who reported the problem, I could see a completed /v1/payment_methods call in the Stripe API logs. There was nothing unusual in the request or response other than the fact that the flow stops dead and no customer or payment_intents were created. The user emailed me to ask if the payment had gone through and said the page had refreshed when they submitted the form, and that they were hesitant to submit again for fear of being charged twice. This customer ended up not signing up, so I don’t have a successful flow to look at.

It was at this point that I noticed a lot of instances of ‘2 calls to /v1/payment_methods per sign up’ and thought that they were somehow related. Hopefully it’s not related and is just normal behaviour.

I’ll run debugging for a few days to try to capture this, I’ll also try to reproduce it myself.

I can see from the API logs this morning, that there’s another instance of a payment_method call successfully completing and then nothing happening. So I would like to get to the bottom of it.

Thanks for the help Cristián, I’ll update this post with what I find.

Allan

1 Like