Skip to main content

Errors

Audience: Developer

Standard Error Shape (Most APIs)

Most merchant/public endpoints return:

{
"error": "human readable message",
"code": "machine_code",
"details": null
}

OAuth Error Shape

OAuth endpoints use OAuth-style error bodies:

{
"error": "invalid_client",
"error_description": "invalid client credentials"
}

Common HTTP Statuses

StatusMeaning
400Invalid input, invalid mode, unsupported parameter
401Missing/invalid auth token
403Authenticated but not allowed (scope/role/mode mismatch)
404Resource not found
409Conflict (example: payment routing locked)
422Validation/business constraint failure (module dependent)
429Rate limited (where limiter is enabled)
500Internal server error

Frequently Seen Error Codes

CodeTypical Cause
authorization_requiredMissing token on /api/public/v1/*
invalid_api_keyKey missing/invalid/revoked/expired
api_key_mode_mismatchKey mode does not match request mode
invalid_oauth_tokenOAuth access token invalid/expired/revoked
oauth_mode_mismatchOAuth token mode mismatch
insufficient_scopeToken/key lacks required scope
unauthorizedMerchant/admin endpoint called without valid auth
invalid_bodyJSON decode failed
not_foundResource ID not found
internal_errorUnhandled server failure

Troubleshooting Checklist

  • Capture x-request-id from response headers for incident tracing.
  • Confirm token type matches endpoint class (/api/v1/merchant vs /api/public/v1).
  • Confirm test/live mode alignment.
  • For OAuth, verify client_id, client_secret, redirect_uri, and scope set.