Errors
Every error from the public Energy API and Developer API management routes uses one JSON envelope:
{
"error": {
"code": "unsupported_duration",
"message": "The requested duration is not supported.",
"details": {
"allowed_durations": ["5m", "1h"]
}
}
}
error.code is stable and intended for program logic. error.message is a
human-readable English explanation and may be refined without a version change.
error.details is optional structured context.
#HTTP behavior
| HTTP | Meaning | Retry guidance |
|---|---|---|
400 |
Invalid request or malformed JSON | Fix the request before retrying. |
401 |
Missing or invalid authentication | Check key, timestamp, signature, and raw body. |
402 |
Insufficient merchant balance | Fund the deposit address, then retry safely with the same client_order_id. |
403 |
IP blocked or product unavailable | Update configuration or contact support. |
404 |
Merchant, order, credential, or route not found | Check the identifier and account. |
409 |
Idempotency or state conflict | Do not create a replacement until the conflict is understood. |
413 |
JSON request body exceeds 100 KB | Reduce the request body. |
415 |
Unsupported content encoding | Send uncompressed UTF-8 JSON. |
422 |
Webhook test or URL validation failed | Correct the webhook endpoint. |
500 |
Internal server error | Retry with backoff and the same client_order_id. |
502 |
Upstream TRON operation failed | Retry with backoff where appropriate. |
503 |
Authentication or a required service is unavailable | Retry with backoff. |
504 |
Upstream TRON request timed out | Retry with backoff and preserve idempotency. |
#Public API error codes
| Code | Typical HTTP | Description |
|---|---|---|
missing_auth_headers |
401 |
One or more HMAC headers are absent. |
request_expired |
401 |
Timestamp is invalid or outside the five-minute window. |
authentication_failed |
401 |
API key or HMAC signature is invalid. |
api_key_disabled |
401 |
The credential was disabled. |
api_key_expired |
401 |
The credential has expired. |
ip_not_allowed |
403 |
Client IP does not match the credential allowlist. |
api_auth_not_configured |
503 |
API authentication is temporarily unavailable. |
authentication_error |
500 |
Authentication could not be completed. |
invalid_json |
400 |
Body is not valid JSON. |
invalid_request |
400 |
Request validation failed without a more specific public code. |
route_not_found |
404 |
No /api/v1 route matches the request. |
payload_too_large |
413 |
JSON request body exceeds the 100 KB limit. |
unsupported_content_encoding |
415 |
Request content encoding is unsupported. |
invalid_from_address |
400 |
Smart sender address is invalid. |
invalid_to_address |
400 |
USDT recipient address is invalid. |
invalid_address |
400 |
Direct-order destination is invalid. |
missing_client_order_id |
400 |
Required merchant order identifier is missing. |
invalid_client_order_id |
400 |
Identifier does not match length or character rules. |
unsupported_currency |
400 |
Currency is not USDT. |
unsupported_duration |
400 |
Duration is not one of the allowed values. |
invalid_energy_quantity |
400 |
Direct quantity is not an integer. |
energy_quantity_out_of_bounds |
400 |
Direct quantity is below or above public limits. |
energy_estimate_failed |
502 or 504 |
TRON simulation did not produce a usable result. |
energy_purchase_not_required |
409 |
The sender already has sufficient energy. |
insufficient_funds |
402 |
Merchant balance cannot cover the total order price. |
client_order_id_conflict |
409 |
The ID is already attached to different parameters. |
merchant_not_found |
404 |
Credential references a missing merchant. |
firaenergy_not_enabled |
403 |
Product access is disabled for the merchant. |
order_not_found |
404 |
No API order matches this merchant and ID. |
internal_error |
500, 502, 503, or 504 |
A safe generic error hides internal implementation details. |
#Developer dashboard error codes
These can be returned while managing credentials and webhooks in the dashboard:
| Code | Description |
|---|---|
invalid_credential_id |
Credential ID has an invalid format. |
active_credential_not_found |
Active credential does not exist for this merchant. |
credential_not_found |
Credential does not exist for this merchant. |
active_credential_limit_reached |
Three active credentials already exist. |
invalid_ip_allowlist |
Allowlist contains invalid input. |
ip_allowlist_too_large |
Allowlist exceeds 50 entries. |
missing_webhook_url |
Enabled webhook requires a URL. |
invalid_webhook_url |
URL cannot be parsed. |
webhook_url_must_use_https |
URL is not HTTPS. |
webhook_url_must_not_contain_credentials |
URL contains username/password. |
webhook_url_must_not_contain_fragment |
URL contains a fragment. |
webhook_url_host_not_allowed |
URL resolves to a non-public address. |
webhook_url_dns_failed |
Hostname could not be resolved. |
webhook_not_configured |
No enabled webhook is available for testing. |
webhook_test_failed |
Receiver did not acknowledge the test with 2xx. |
Do not parse message or infer behavior from undocumented internal failure
strings stored in an order's error field.