Reference
Error Codes
Complete catalog of error codes returned by the Elebne Developer API, with HTTP status codes, descriptions, and troubleshooting steps.
When a request fails, the API returns a JSON error response with a machine-readable code, a human-readable message, and the HTTP status code.
{
"success": false,
"error": {
"code": "INVALID_API_KEY",
"message": "The API key provided is not valid.",
"statusCode": 401
}
}
Use the code field for programmatic error handling. The message field may change over time and should only be used for logging or display.
| Code | HTTP | Description | Troubleshooting |
|---|
MISSING_CREDENTIALS | 401 | No Authorization header was included in the request. | Add Authorization: Bearer sk_test_YOUR_KEY to your request headers. |
INVALID_AUTH_HEADER | 401 | The Authorization header is present but malformed. | Ensure the format is exactly Bearer <key> with a single space. |
INVALID_API_KEY | 401 | The API key was not found or has an invalid format. | Check that the key starts with sk_test_, pk_test_, sk_live_, or pk_live_ and has not been rotated. |
| Code | HTTP | Description | Troubleshooting |
|---|
API_ACCESS_NOT_ACTIVE | 403 | The API key has been suspended or revoked. | Check the key status in Commerce > Developer. Generate a new key if needed. |
LIVE_ACCESS_NOT_APPROVED | 403 | A live key was used but your business has not been approved for live mode. | Complete the Going Live checklist and wait for approval. |
SECRET_KEY_REQUIRED | 403 | The endpoint requires a secret key (sk_) but a publishable key (pk_) was used. | Use your secret key for write operations. See Authentication. |
SCOPE_REQUIRED | 403 | The API key is missing a required scope for this endpoint. | Add the required scope to your API key in Commerce > Developer. See Scopes. |
IP_NOT_ALLOWED | 403 | The request originated from an IP address not in your allowlist. | Add your server IP to the allowlist in Commerce > Developer, or remove the allowlist for testing. |
| Code | HTTP | Description | Troubleshooting |
|---|
FEATURE_DISABLED | 503 | The Developer API feature is currently disabled for your account or globally. | Contact support at [email protected]. |
| Code | HTTP | Description | Troubleshooting |
|---|
IDEMPOTENCY_KEY_REQUIRED | 400 | A write endpoint was called without the X-Idempotency-Key header. | Add a unique X-Idempotency-Key header. See Idempotency. |
| Code | HTTP | Description | Troubleshooting |
|---|
SANDBOX_ONLY | 403 | The endpoint (e.g., simulate-payment) only works with test keys. | Switch to a sk_test_ or pk_test_ key. |
SANDBOX_MISMATCH | 403 | A test key was used to access live data, or vice versa. | Ensure you are using test keys for sandbox resources and live keys for production resources. |
| Code | HTTP | Description | Troubleshooting |
|---|
INTENT_NOT_FOUND | 404 | The payment intent reference number does not exist or does not belong to your business. | Verify the referenceNumber is correct and was created with the same API key environment (test or live). |
INTENT_NOT_PENDING | 400 | You tried to cancel or simulate a payment intent that is not in PENDING status. | Check the intent's current status. Only PENDING intents can be cancelled or simulated. |
INTENT_CANCEL_INVALID_STATUS | 400 | The payment intent cannot be cancelled in its current status. | Intents can only be cancelled while PENDING. Once paid, use a refund instead. |
INTENT_REFUND_INVALID_STATUS | 400 | The payment intent cannot be refunded in its current status. | Only CONFIRMED intents can be refunded. Check the intent status first. |
| Code | HTTP | Description | Troubleshooting |
|---|
SHOP_NOT_FOUND | 404 | No shop was found for your business account. | Ensure you have created a shop in the Elebne mobile app before using the Store API. |
VARIANT_NOT_FOUND | 404 | The specified variant was not found on the product. | Verify the variant ID or label matches an existing variant on the product. |
VARIANT_LABEL_AMBIGUOUS | 400 | Multiple variants match the provided label. | Use the variant _id instead of the label, or rename variants to be unique. |
| Code | HTTP | Description | Troubleshooting |
|---|
ENDPOINT_NOT_FOUND | 404 | The webhook endpoint ID does not exist or does not belong to your business. | Verify the endpoint ID. List your endpoints with GET /dev/webhooks. |
MAX_ENDPOINTS_REACHED | 400 | You have reached the maximum of 5 webhook endpoints. | Delete an unused endpoint before creating a new one. |
EVENTS_NOT_PERMITTED | 403 | Your API key scopes do not permit subscribing to the requested event types. | Add the required scopes to your key. For example, store.orders:read is needed for order.* events. |
INVALID_WEBHOOK_EVENT | 400 | An unknown event type was specified. | Check the event name against the Webhook Events reference. |
INVALID_WEBHOOK_URL | 400 | The webhook URL is not a valid HTTPS URL. | Webhook URLs must use https:// and be publicly reachable. |
| Code | HTTP | Description | Troubleshooting |
|---|
ENDPOINT_NOT_FOUND | 404 | The API route does not exist. | Check your URL against the API reference. Ensure you include the /api/v1/dev base path. |
- Rate Limits -- understand rate limiting and retry behavior
- Idempotency -- safely retry failed requests
- Support -- get help with persistent errors
Was this page helpful?