Skip to main content
When a request to the FraudTrace AI API cannot be completed successfully, the API returns an HTTP error status code alongside a JSON body that describes what went wrong. Understanding these codes and building appropriate error handling into your integration will make your application more resilient and easier to debug in production.

Error Response Format

Every error response uses the same JSON structure regardless of the status code. The error field contains a machine-readable code you can use for programmatic handling, while message provides a human-readable explanation.
Always check the error field — not just the HTTP status code — when building error-handling logic. The error value is stable and versioned; the message text may change over time.

Error Code Reference

The table below covers every error code the API can return, what triggers it, and how to resolve it.

Common Error Examples

401 Unauthorized

Returned when the Authorization header is missing, malformed, or contains an invalid API key.
Common causes:
  • The Authorization header is missing entirely.
  • The token is prefixed incorrectly (e.g. Token or Basic instead of Bearer).
  • The API key has been rotated or revoked in the dashboard.

400 Bad Request

Returned when a required parameter is absent or a parameter value is in the wrong format.
Common causes:
  • The upi query parameter is missing from a GET /v1/verify/upi request.
  • A UPI VPA is not in valid handle@provider format.
  • A batch request body is missing the vpas array.

429 Rate Limit Exceeded

Returned when you send more requests than your plan’s rate limit allows within a given window.
The response also includes a Retry-After header (in seconds) that tells you exactly how long to wait before sending the next request. See Rate Limits for the full breakdown of headers and handling guidance.
Do not immediately retry a 429 response. Hammering the API after a rate-limit error will not accelerate recovery and may extend your backoff window.

Retry Strategy

Different error codes call for different retry behaviors. The wrong strategy — such as retrying a 400 — wastes quota and delays diagnosis.

When to Retry

Exponential Backoff Rules

  • 429: Start at 1 second, double on each attempt, cap at 32 seconds. Add random jitter (±0–500 ms) to prevent thundering-herd effects when multiple clients hit the limit simultaneously.
  • 500 / 503: Retry up to 3 times using the same doubling pattern (1s → 2s → 4s).
  • 4xx (except 429): Do not retry. The request is semantically invalid — retrying will produce the same error.

Python Retry Example

The example below shows two approaches: a simple manual loop and a cleaner implementation using the tenacity library.
If you are processing large volumes of VPAs, use the batch endpoint (POST /v1/verify/upi/batch) to verify up to 100 VPAs in a single request. This reduces the total number of API calls and makes rate limit management much simpler.

Getting Help

If you consistently receive 500 errors that do not resolve after retrying, or if you believe an error is caused by a platform issue rather than a request problem, contact the FraudTrace AI support team with the full response body and the timestamp of the failing request. Including the X-Request-Id response header (if present) will significantly speed up diagnosis.