ElebneElebneDocs
Reference

Error Codes

Complete catalog of error codes returned by the Elebne Developer API, with HTTP status codes, descriptions, and troubleshooting steps.

Error Codes

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.

Error response format

{
  "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.

Authentication errors

CodeHTTPDescriptionTroubleshooting
MISSING_CREDENTIALS401No Authorization header was included in the request.Add Authorization: Bearer sk_test_YOUR_KEY to your request headers.
INVALID_AUTH_HEADER401The Authorization header is present but malformed.Ensure the format is exactly Bearer <key> with a single space.
INVALID_API_KEY401The 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.

Authorization errors

CodeHTTPDescriptionTroubleshooting
API_ACCESS_NOT_ACTIVE403The API key has been suspended or revoked.Check the key status in Commerce > Developer. Generate a new key if needed.
LIVE_ACCESS_NOT_APPROVED403A 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_REQUIRED403The endpoint requires a secret key (sk_) but a publishable key (pk_) was used.Use your secret key for write operations. See Authentication.
SCOPE_REQUIRED403The 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_ALLOWED403The 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.

Feature errors

CodeHTTPDescriptionTroubleshooting
FEATURE_DISABLED503The Developer API feature is currently disabled for your account or globally.Contact support at [email protected].

Request validation errors

CodeHTTPDescriptionTroubleshooting
IDEMPOTENCY_KEY_REQUIRED400A write endpoint was called without the X-Idempotency-Key header.Add a unique X-Idempotency-Key header. See Idempotency.

Sandbox errors

CodeHTTPDescriptionTroubleshooting
SANDBOX_ONLY403The endpoint (e.g., simulate-payment) only works with test keys.Switch to a sk_test_ or pk_test_ key.
SANDBOX_MISMATCH403A 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.

Payment intent errors

CodeHTTPDescriptionTroubleshooting
INTENT_NOT_FOUND404The 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_PENDING400You 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_STATUS400The 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_STATUS400The payment intent cannot be refunded in its current status.Only CONFIRMED intents can be refunded. Check the intent status first.

Store API errors

CodeHTTPDescriptionTroubleshooting
SHOP_NOT_FOUND404No 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_FOUND404The specified variant was not found on the product.Verify the variant ID or label matches an existing variant on the product.
VARIANT_LABEL_AMBIGUOUS400Multiple variants match the provided label.Use the variant _id instead of the label, or rename variants to be unique.

Webhook errors

CodeHTTPDescriptionTroubleshooting
ENDPOINT_NOT_FOUND404The 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_REACHED400You have reached the maximum of 5 webhook endpoints.Delete an unused endpoint before creating a new one.
EVENTS_NOT_PERMITTED403Your 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_EVENT400An unknown event type was specified.Check the event name against the Webhook Events reference.
INVALID_WEBHOOK_URL400The webhook URL is not a valid HTTPS URL.Webhook URLs must use https:// and be publicly reachable.

General errors

CodeHTTPDescriptionTroubleshooting
ENDPOINT_NOT_FOUND404The API route does not exist.Check your URL against the API reference. Ensure you include the /api/v1/dev base path.

Next steps

  • Rate Limits -- understand rate limiting and retry behavior
  • Idempotency -- safely retry failed requests
  • Support -- get help with persistent errors

Was this page helpful?

On this page