Skip to main content
ArcenPay uses standard HTTP status codes for all REST responses and exposes a typed ArcenApiError class in the Node SDK so you can handle failure cases consistently in server-side code. Most integration errors fall into a small set of predictable categories: invalid credentials, missing resources, billing state conflicts, or on-chain failures.

HTTP status codes

Handling errors with ArcenApiError

The Node SDK throws ArcenApiError for any non-2xx response from the ArcenPay API. Catch it by checking instanceof ArcenApiError to access the structured fields:

Common error scenarios

Invalid or expired API key

Status: 401 Returned when the Authorization: Bearer header is missing, the key is not recognized, or the key has been revoked.
Verify that ARCENPAY_API_KEY is set in your environment and that the key has not been rotated or deleted in the dashboard. Check the endpoint auth matrix to confirm which key prefixes your endpoint accepts.

Company not found

Status: 404 Returned by GET /api/v1/companies/:id, PATCH /api/v1/companies/:id, and DELETE /api/v1/companies/:id when the supplied ID does not exist in your team.

Feature not entitled (“Upgrade required”)

Status: 403 Returned by entitlement check endpoints when the company’s active plan does not include the requested feature, or when the company’s metered usage has been exceeded. Handle this in your application to show an upgrade prompt:

Invalid webhook signature

Status: 401 (returned by your own handler) When the HMAC signature on an incoming webhook does not match, you should reject the request. ArcenPay signs webhook payloads with x-arcenpay-signature: sha256=<hex>.
Always verify the raw request body before parsing it as JSON. Parsing first will invalidate the signature check.

Wallet rejected or on-chain failure

Status: 409 Returned by POST /api/v1/subscriptions/activate when the payment account does not have enough token balance or has not approved sufficient allowance for autopay to collect the first charge.
Other 409 causes at activation:
Last modified on September 19, 2026