I get following response while list Payment,
"Provided merchant_id and merchant_id in authorization do not match up"
Are you using the Square App or on your website?
I am getting the same issue!
Please help.
https://connect.squareup.com/v1/LOCATION_ID/items
{
"type": "unauthorized",
"message": "Provided merchant_id and merchant_id in authorization do not match up"
}
curl -H "Authorization: Bearer *****" https://connect.squareup.com/v2/locations
{"errors":[{"category":"AUTHENTICATION_ERROR","code":"FORBIDDEN","detail":"You have insufficient permissions to perform that action."}]}
Hey @happy and @namankhator, thanks for surfacing! I don't have the answer for you off the top of my head, but I'll check in with our engineering team for more insight.
In the meantime, feel free to check out Square Connect's Stack Overflow page. It's been a great resource for our developer community, and there's already a ton of questions that have been answered there.
Appreciate your patience, and we'll be in touch as soon as we have an update.
Just heard back from our Developer Team, and it appears that y'all are using OAuth credentials for one merchant but attempting to retrieve data for another merchant. For example, if you have OAuth tokens for merchant A with location B but try to list payments for location token X that belongs to a different merchant Y, you will get this error.
@namankhator - In regards to "You have insufficient permissions to perform that action," the developer merchant account for the app (based on client ID) that you are using needs to be activated to take payments. This is a current limitation for using V2 APIs.
Hope this helps!
Square Community