Nijipe DevelopersREST API SPECIFICATION
Access Merchant Hub

9. Error Reference Table

Nijipe uses standard HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted), and codes in the 5xx range indicate an error with our servers.

HTTP CodeError TypeDescription
200 - 201SuccessThe request was successful.
400Bad RequestThe request was unacceptable, often due to missing a required parameter or invalid JSON.
401UnauthorizedNo valid API key provided or API key is incorrect.
403ForbiddenThe API key doesn't have permissions to perform the request.
404Not FoundThe requested resource doesn't exist.
429Too Many RequestsToo many requests hit the API too quickly. We recommend an exponential backoff of your requests.
500, 502, 503, 504Server ErrorsSomething went wrong on Nijipe's end. (These are rare.)
Standard JSON Error Format:
{
  "error": {
    "code": "invalid_request",
    "message": "The 'total' parameter is required for invoice generation."
  }
}

Common Authentication Errors

{"error": "Unauthorized"}

Cause:

You hit the Bitcoin RPC node (which uses Basic Auth) instead of the Next.js API. Check your Base URL to ensure you are targeting the main application domain, not the `api.` subdomain.

{"error": "Missing or malformed Authorization header. Must provide a Bearer token."}

Cause:

Your HTTP client dropped the header. Ensure you are sending the `Authorization: Bearer <key>` header and that you aren't hitting a URL that redirects (like missing the `www.` prefix).

{"error": "Invalid API key. Store not found or key was revoked."}

Cause:

The key is correctly formatted and received, but the SHA-256 hash does not match an active store in the database. Ensure you are using the correct live or test key for your store.