Payment API returning an empty response

Greetings.

I’ve been with Square for awhile, and don’t remember having this problem before. Curl calls to the payment API via PHP are returning an empty response.

I’ve called square twice today, and have talked to six people, two of them being just now. The reason I called back is I wondering if the IP address of my website was being blocked. The gentleman said it wasn’t.

My second question was, Under what circumstances will Square return an empty response from its payments API? The fellow suggested that I ask that question here.

Again, my question is, What would cause Square to return no response at all?

Everything was working. The PHP code can write test files before and after the curl function, and so the curl function isn’t causing a fatal error. But the file written that should contain the response is empty, even after changing to the most recent version, even when using a new access token, and even when using the sandbox. I can ping the production and sandbox access points just fine.

The one suspicious thing is that a few weeks ago I had to work on my site in order to upgrade my USPS interface, because somehow I wasn’t allowed to upgrade by January 25. But that part of the site is working just fine.

My cart is proprietary. I made it myself.

The response is supposed to be a string, right?

: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

Make your First API Call
Test Authorization with Web Server
Develop for Japan

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.

Do these guides tell me under what circumstances an empty response gets returned? If they don’t, then they’re not going to help.

Everything was working. Now it’s not, and the response returned is entirely empty, 0 bytes long.

Or maybe it should be said that no response is returned. I don’t know.

It was working fine, and now it’s not. What could have happened?

Were payments taken for the timeframe and location you looking at? If so whats your application ID and location_id? :slight_smile:

Thanks for your reply, Bryan.

Things were fine until sometime between July 23 and September 15. I don’t have a way to narrow it down further than that.

I don’t feel right about posting the location_id and application_id. But do you think those could have changed?

We don’t update those on the backend. Also the location_id and application ID are okay to share publicly. Only the access token should never be shared publicly since they’re secret. :slight_smile:

Thank you Bryan. I have in the meantime found the problem. While it isn’t back up and running yet, I will be able to troubleshoot it further. If I have further difficulties, I will post again, which may take a little while.