x

Sandbox error when testing

When I go to checkout this is the error I receive:

Square Exception when calling CheckoutApi->createCheckout:[HTTP/2 401] {"errors":[{"category":"AUTHENTICATION_ERROR","code":"UNAUTHORIZED","detail":"This request could not be authorized."}]}

 

I have double checked my Sandbox Location ID and Sandbox Access Token and those are correct.

 

What am I missing?

791 Views
Message 1 of 2
Report
1 REPLY 1
Alumni

If you’re sure the access token you're using is correct, then the most likely explanation here is that you have not set the correct host domain. For sandbox, you'll need to make sure to use https://connect.squareupsandbox.com - instead of https://connect.squareup.com.

 

This error only happens when the access token is incorrect, so it sounds like you may be using sandbox credentials against production, @ekyoung. Let us know here if anything else come up!

Valentina
Community Moderator, Square
Sign in and click Mark as Best Answer if my reply answers your question.
723 Views
Message 2 of 2
Report