# Error codes reference (https://docs.chargeflow.io/docs/reference/error-codes)



A quick lookup of the codes the Chargeflow API returns. For how to **handle and retry**
each status - which are retry-safe, how to back off, and how to diagnose a `403` - see
[Error handling](https://docs.chargeflow.io/docs/reference/api-fundamentals/error-handling).

## HTTP status codes [#http-status-codes]

| Status | Name                  | Meaning                                                                                                                                                |
| ------ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `400`  | Bad Request           | Malformed syntax or incorrect parameters.                                                                                                              |
| `401`  | Unauthorized          | Missing or invalid API key (or bad HMAC signature, if enabled).                                                                                        |
| `403`  | Forbidden             | Valid key without permission for the resource, or an invalid key. [Diagnose which →](https://docs.chargeflow.io/docs/reference/api-fundamentals/error-handling#http-error-codes) |
| `404`  | Not Found             | The resource or URL does not exist.                                                                                                                    |
| `429`  | Too Many Requests     | Rate limit exceeded.                                                                                                                                   |
| `500`  | Internal Server Error | Unexpected server error.                                                                                                                               |
| `502`  | Bad Gateway           | Upstream/gateway error.                                                                                                                                |

For which of these are safe to retry and how, see
[Error handling → retry safety](https://docs.chargeflow.io/docs/reference/api-fundamentals/error-handling#retry-safety-at-a-glance).

## EaaS-specific error codes [#eaas-specific-error-codes]

| Error Code                   | Description                               | Resolution                                       |
| ---------------------------- | ----------------------------------------- | ------------------------------------------------ |
| `422_dispute_invalid_state`  | Dispute must have status `needs_response` | Check dispute status before generating evidence  |
| `409_generation_in_progress` | Evidence generation already in progress   | Use `idempotency-key` header to avoid duplicates |
| `404_*_not_found`            | Resource not found                        | Verify the ID in your request                    |
| `403_eaas_not_enabled`       | API key not entitled to EaaS              | Contact your account manager                     |
| `504_generation_timeout`     | Generation timed out                      | Retry the request                                |

## Next steps [#next-steps]

<Cards>
  <Card title="Error Handling" href="/docs/reference/api-fundamentals/error-handling">
    How to handle and recover from each status code
  </Card>

  <Card title="Rate Limits" href="/docs/reference/api-fundamentals/rate-limits">
    What to do when you hit a 429
  </Card>

  <Card title="Authentication" href="/docs/reference/api-fundamentals/authentication">
    Fix 401 and 403 responses
  </Card>

  <Card title="Support" href="/docs/reference/support">
    What to include when you contact the team
  </Card>
</Cards>
