Posting to online-checkout/payment-links results in Invalid location id error, but I have confirmed the id.
It worked before, what should I check?
thanks!
Posting to online-checkout/payment-links results in Invalid location id error, but I have confirmed the id.
It worked before, what should I check?
thanks!
Do you have an example link? Also what’s your application ID?
not sure what else I can share since it might be considered confidential?
the link is in production, but I’m testing from postman as I made a slight adjustment after it went live.
I just realized my folly… production location, sandbox endpoint…
BUT now i receive:
“errors”: [
{
“category”: “AUTHENTICATION_ERROR”,
“code”: “UNAUTHORIZED”,
“detail”: “This request could not be authorized.”
}
is square checking that I am sending from my computer rather than the prod server?
Is the base path URL correctly set to the right environment?
I’m not sure I understand the question. I am attempting to post to https://connect.squareup.com/v2/online-checkout/payment-links via postman from my desktop
Okay, is the access token your using your production access token?
It is. Currently using prod link & prod token, receiving “unauthorized”
(When I was using sandbox link & prod token, I was getting invalid location, which is what prompted the thread, but I’m past that)
EDIT: Actually I think you nailed it… I forgot about that piece (and was thinking you were saying “location id.” I will confim/deny and report back (once I figure out where to find that).
EDIT 2: OK that was what was wrong with my testing, and the reason I needed to test was because the end user didn’t have their phone number formatted how Square wants… so I need to find the rules on that, but otherwise this is resolved, thanks!!
Glad to hear that you figured it out. With phone numbers the phone number must be valid and can contain 9–16 digits, with an optional +
prefix and country code. For more information, see Customer phone numbers.