Get order v2 API RATE_LIMIT_ERROR

Hi, we find that this intermittent error occurs, especially around 8:30 am to 10:30 am (CDT). It badly hurts our business as this API cannot work in the morning on those days.

{“errors”: [{“code”: “RATE_LIMITED”,“detail”: “This request was rate limited. Please retry later.”,“category”: “RATE_LIMIT_ERROR”}]}

Ex:
request:
{ method: ‘GET’,
url:
https://connect.squareup.com/v2/orders/IKOsUKRTB2yzv4HrvCFmapzH6kBZY’,
headers:
{ ‘user-agent’: ‘Square-TypeScript-SDK/10.0.0’,
authorization:
‘Bearer xxxxxxxxxx’,
‘Square-Version’: ‘2021-04-21’,
accept: ‘application/json’ } },
statusCode: 429,
headers:
{ date: ‘Wed, 18 Aug 2021 14:46:46 GMT’,
‘frame-options’: ‘DENY’,
‘x-frame-options’: ‘DENY’,
‘x-content-type-options’: ‘nosniff’,
‘x-xss-protection’: ‘1; mode=block’,
‘content-type’: ‘application/json;charset=utf-8’,
‘content-length’: ‘133’,
‘strict-transport-security’: ‘max-age=631152000; includeSubDomains; preload’,
connection: ‘close’ },
body:
'{“errors”: [{“code”: “RATE_LIMITED”,“detail”: “This request was rate limited. Please retry later.”,“category”

To clarify, we do not increase the call rate durning that time. So I think maybe Square reduces it durning a specific period.

:wave: Square does have rate limits but we don’t document the limits. We encourage you to handle the limit gracefully by building a retry mechanism. This mechanism should have an exponential backoff schedule to reduce requests when volume is necessary. Also some randomness wouldn’t hurt to avoid a thundering herd effect. :slightly_smiling_face: