Hi Square Team,
I’m looking for some clarification regarding OAuth token lifecycle and refresh token expiration for our integration.
For context, we have built a platform that supports multiple restaurants/merchants. Merchants connect their Square account to our platform, after which we:
- Pull their Square Catalog/menu into our system.
- Allow customers to browse and select items through our application.
- Create/place orders through Square.
- Process payments using Square Terminal.
We previously confirmed with Square that OAuth is the recommended authentication method for this type of multi-merchant integration, rather than merchants providing personal access tokens.
Our plan is to implement the standard OAuth flow and securely store the merchant’s access token and refresh token. When the access token expires, we would use the refresh token to obtain a new access token.
I would like to clarify what happens when the refresh token itself expires.
- What is the current expiration period/lifetime of a Square OAuth refresh token?
- When we use a refresh token to obtain a new access token, does Square also issue a new refresh token that we should replace the previous one with?
- If the refresh token eventually expires or becomes invalid, does the merchant need to go through the OAuth authorization/consent flow again to reconnect their Square account?
- Is there a recommended token-refresh strategy we should follow to prevent a merchant’s integration from unexpectedly becoming disconnected?
- Are there any other token lifecycle or rotation best practices Square recommends for a production multi-merchant platform?
We want to make sure we implement the OAuth flow correctly so merchants do not have to reconnect their Square accounts unnecessarily.
Thank you.