> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shorpay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API errors

> Understand public API error codes and the action to take next.

Errors return `{ error: { type, code, message, status, requestId, details? } }`. Retain the request ID when contacting support; do not log credentials or sensitive request bodies.

| Status/code | Next step |
| - | - |
| 401 `INVALID_CREDENTIAL` | Check credential, expiry and environment |
| 403 `INSUFFICIENT_SCOPE` | Check grant and current membership role |
| 403 `INTEGRATION_DISABLED` / `WRITES_DISABLED` | Contact the workspace administrator or Shor |
| 409 `STALE_RESOURCE_VERSION` | Fetch and review current state before a new intent |
| 409 `IDEMPOTENCY_KEY_REUSED` | Use the original payload or a new intentional operation |
| 409 `OPERATION_IN_PROGRESS` | Retry the same request after a short delay |
| 409 `OPERATION_EXPIRED` | Reconcile resource state; do not blindly repeat the action |
| 409 `EXTERNAL_REFERENCE_EXISTS` | Look up the contract using `externalReference` |
| 429 | Honor `Retry-After` |
| 503 | Retry with backoff; balance is unavailable, not zero |

See [Rate limits](/developers/rate-limits) for request budgets and [Idempotency and retries](/developers/idempotency) before repeating a write.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.