IZZIPAYDocumentation

Error Handling

IZZIPAY uses standard HTTP status codes to indicate the success or failure of an API request.

Error Response Format

json
{
  "error": {
    "code": "INVALID_AMOUNT",
    "message": "Amount must be greater than 0",
    "status": 422,
    "request_id": "req_abc123",
    "details": [
      {
        "field": "amount",
        "message": "Must be a positive integer"
      }
    ]
  }
}

HTTP Status Codes

400

Bad Request

The request was malformed or missing required parameters.

Solution: Check your request body and ensure all required fields are provided with correct types.

401

Unauthorized

Authentication failed — invalid or missing API key/token.

Solution: Verify your API key is correct and the Authorization header is properly formatted.

403

Forbidden

Your API key does not have permission for this resource.

Solution: Check your key permissions in the dashboard or upgrade your plan for access.

404

Not Found

The requested resource does not exist.

Solution: Verify the resource ID and endpoint path. The resource may have been deleted.

409

Conflict

The request conflicts with the current state of the resource.

Solution: The resource may have been modified. Fetch the latest version and retry.

422

Unprocessable Entity

The request was well-formed but contained semantic errors.

Solution: Check field values meet validation rules (e.g., amounts > 0, valid currencies).

429

Too Many Requests

You have exceeded the rate limit for your plan.

Solution: Implement exponential backoff. Check the Retry-After header for timing.

500

Internal Server Error

An unexpected error occurred on our servers.

Solution: Retry with exponential backoff. If persistent, contact support with the request ID.

Rate Limits

PlanRequests/minRequests/day
Starter601,000
Growth600100,000
EnterpriseUnlimitedUnlimited

Retry Strategy

javascript
async function apiCallWithRetry(fn, maxRetries = 3) {
  for (let attempt = 0; attempt < maxRetries; attempt++) {
    try {
      return await fn();
    } catch (error) {
      if (error.status === 429 || error.status >= 500) {
        const delay = Math.pow(2, attempt) * 1000;
        await new Promise(resolve => setTimeout(resolve, delay));
        continue;
      }
      throw error;
    }
  }
  throw new Error('Max retries exceeded');
}