Square Payment Authorized failed. Please Try again

We are seeing the error as per screenshot on our site. We have made 0 changes and our users reported this error last night. Only 1 payment went through. Today the error kept appearing. We have been pulling our hair out trying to figure out the root cause and suddenly it started working again… Has anyone else experienced this?

CMS: Wordpress
Plugin: Restropress
Category: Pizza Online Ordering
Updates: Yes all applied latest versions for all plugins and core site etc.

:waving_hand: 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:

Additional Documentation

Handling Errors
Handling Errors
Handling Errors

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.

To add to this, we have 2 sites with the exact same configuration, but this is only happening randomly on one site. Nothing has changed on our side to cause this…

Looking forward to receiving a dev response, as there is no other way to contact your team.

Hello, rams! Try to check logs in Dev Dashboard or plugin and send here. It is hard to guess what problem is.

Hi Yason, I’m getting 0 insights from dev tools and also when putting the site into debug mode.

The error is not a bank decline or a tokenization failure. From a full HAR capture, that error string is RestroPress’s server-side gateway_error, rendered into the admin-ajax.php?payment-mode=square (rpress_load_gateway) response. The gateway sets it server-side at one specific point: when the purchase form is POSTed to the backend with the rpsquare_token field empty.

We confirmed it’s not a front-end tokenize failure by reading the gateway’s own inline script: on card.tokenize() failure it writes “Payment Failed” inline and does not submit. The error we see is the server path, which means the form was submitted — with no token.

The SDK itself initialises cleanly. In the HAR, pci-connect.squareup.com/payments/hydrate returns 200 and we see a MAIN_IFRAME:OK telemetry event. The two pci-connect.../mtx/v2 calls returning 204 are Square’s metrics beacons (request bodies are {"metrics":[…]}), not the tokenize call.

We found and resolved one real blocker that was masking things: Brave Shields was blocking the tokenize POST with net::ERR_BLOCKED_BY_CLIENT. With Shields off that’s gone — but the intermittent failures persist on other browsers, so that was a separate, browser-specific issue, not the root cause.

We also confirmed a session-persistence artifact: once gateway_error is set, RestroPress re-prints it on every gateway reload until the session clears, which made one failure look permanent on desktop. A fresh session cleared it.

Usually we see an error in the Square API logs, though now they are empty: because no CreatePayment with a token ever reaches Square. The RestroPress backend rejects the empty rpsquare_token before calling the Square API, so there’s nothing for Square to log. The empty logs are consistent with the failure, not a contradiction.

The honest question: under what conditions can card.tokenize() return or resolve such that the token field ends up empty at submit time — e.g. tokenize latency, an iframe not fully attached, or the SCA/verifyBuyer step being absent? And does anything in the SDK’s behaviour on iOS WebKit (storage partitioning / cross-site tracking prevention on the payment iframe) change tokenize timing or success?

Hi rams600,

Thanks for the thorough debugging! Based on your findings, the failure is occurring before any request reaches Square. This is something the RestroPress team would need to investigate and address in their plugin code.

We’d recommend reaching out to them directly with your findings.

We have been working with the Restropress team. They are baffled, as we have a replica site for a different store with the exact same setup that is working fine. This issue only appears randomly on this specific store across different devices/browsers.

I just tested it, and I got a positive result on my Brave desktop browser, but on mobile using the Google browser, it failed. It’s never consistent, and we can’t see any errors to figure this one out, which is why we are reaching out to Square devs to help…

I have been trying so hard to pinpoint the root cause, but I can’t seem to identify what it could be. It will work once, then we get a report from a user that it’s not working on their device, and we have to close the store. Then we test it on the same device where we saw it was working, and then get this random error.