Yesterday I was improving my shopping cart on my website then when I did some basic testing, I notice your web SDK tokenize() method takes a while to complete. I’m calling it as
result=await info.tokenize();
The problem is that many times the function takes a while to return. As of last test, it took over 5 minutes to return a result which IMO is a terrible checkout experience.
For my test, I used the card payment method (where people type in their financial info without going to a 3rd-party site).
I also deliberately left the fields blank and made the submission in hopes I’d get a response fast from tokenize(), but I don’t.
I never received such an issue if I used my sandbox keys instead of the production keys.
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
I used web developer tools.
For the screenshot I showed you, I mentioned in my previous post that I used console.log on the object before applying the tokenize method to it.
Also, that URL that you highlighted along with other files (including css stylesheets) is available as a list in the network tab of firefox web developer tools after 'https://web.squarecdn.com/v1/square.js` is loaded.
I did notice that since I first posted this issue that you guys must have fixed something at your end because the waiting time has returned to seconds instead of 6 minutes.
I should mention I ran all tests on a strong internet connection in the city.
I’m experiencing a dramatic delay in the time it takes to process the tokenize function as well.
This all started about 24 hours ago, and there haven’t been any code changes from our end. Indeed we saw a few Square payments go through yesterday morning, so we know things were working then.
Has anything changed at the Square end to cause this sort of delay?
Things other than Web Payments are working, such as OAuth and Locations. It’s just this massive degradation in the response time for the tokenize function.
Only thing i can suggest is to run a timer but today I discovered that this should only be done on the card object because if its done through any other object and the customer has the second payment window for the duration of the timeout, then the transaction wont complete.
We are getting numerous reports from customers trying to enter payment details into the Web Payments widget that their details are never processed.
There appears to be a bug in the tokenize function that allows an internal routine to loop forever and never return. At a minimum, there needs to be a timeout so that an error can be reported back to the user in a reasonable amount of time.
When I last measured the longest delay at my end, it was 6 minutes which is still painfully slow.
I bet that it responds faster at certain times of day, particularly off-peak hours, but still, this is bad and square devs need to look into it or they will have a hard time making their commission from everyone that relies on square online.
I can’t see any customers lasting that long. I can see my merchants are going to be asking some serious questions about how long they can last with Square and keep losing sales.
There were times where I used the card payment on the web sdk production version and I deliberately submitted blank fields. When clicking the pay button, the tokenize method is called and sometimes takes forever.
For the majority of my tests I use Seamonkey 2.53.19 and on some occasions I use Firefox 131 and yes firefox is memory hungry.
I wonder if one’s location may have something to do with it. I’m in Ontario Canada.
At this moment there is no issue with the card object at my end, but I’ll run more tests sometime later to see what happens.