Square payment form

Built an application using square payment form almost 2 years ago and were both tested in sandbox and production, everything worked but the client put it all on hold and only just got back to it to find that it’s not working.
First the http post url that was working originally was:
Reading the docs this is now depreciated and instead use:
and put the location id in the body with card_nonce and amount_money etc, is this correct ?
I any case I’m getting:
Card payment failed.
Reason: The Authorization http header of your request was malformed. The header value is expected to be of the format “Bearer TOKEN” (without quotation marks), where TOKEN is to be replaced with your access token (e.g. “Bearer ABC123def456GHI789jkl0”).
Can anyone help ?

Hi @akos welcome to the forums!

Authorization errors are typically due to incorrect access tokens (or expired/revoked access tokens). If you’re using your personal access token, please make sure you’re using the correct environment. For example, if you’re using your sandbox access token, be sure to use connect.squareupsandbox.com instead of connect.squareup.com as the domain for API requests.

Hi there, thank you for coming back to me. Yeah the issue was that I was using the correct credentials but the url itself changed to [connect.squareupsandbox.com](http://connect.squareupsandbox.com/)
There were a number of changes I had to make which all seem to be different from about 2 years ago.
We haven’t found any emails containing updates/changes as to what might be changed in the API or payment form structure.
Is this likely to change again in the future if so how do we get notified ?

Yeah the old sandbox was retired quite awhile ago, which used the same url as production. You can definitely subscribe to our developer newsletter which I believe gets sent out at the end of the month, every month: https://www.workwithsquare.com/developer-newsletter.html.

I have same error. Can someone tell me where to place or change this API request. I changed this in SquareClient. But there is same error. I am using this example from github. Please help me. I have also contact the support by email but they said they can’t help.

Here is some more details.
accessToken: "SANDBOX_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
environment: "sandbox"
customUrl: "https://connect.squareupsandbox.com"

If you’re actually prepending SANDBOX to your access token, then that would do it. You need to just paste your access token directly, do not add “SANDBOX” to it.

That help I think but there is another error now. Which is “total requested amount 1 is below the minimum allowed”.

What currency are you trying to use? I think most countries have a minimum of 100 (this is in the lowest denomination, so for USD that would be cents). USD and CAD do have a minimum of 1 if I recall correctly, though.

I am using GBP. Can you tell me what is the minimum amount for "“GBP”. I tried 150 and I got the response, but In my case, there maybe payment of 10 GBP. Is this mean that Square is not for me? Should I use other payment method?

I believe the lowest in GBP is 100, which is £1.00; there’s no way to charge lower than that at this time unfortunately.