MyNearStoresPartners
Square

Square OAuth callback

GET
/square/oauth/callback

Square redirects the popup here; do not call it directly. On success the page posts { type: 'SQUARE_OAUTH_SUCCESS', buId, terminalId, merchantId } to window.opener and closes after 2 seconds.

Query Parameters

code?string
state?string
error?string

Set by Square when the merchant declines.

error_description?string

Response Body

Success page.

response?stringtext/html
curl -X GET "https://example.com/square/oauth/callback"
"string"