Skip to main content
Every error from the widget API is a JSON body with a stable, machine-readable moonPayErrorCode. This page documents the response shape, the codes you can encounter, and what to do about them.

Error response shape

Code format

Codes follow the pattern {category}_{space}_{name}:

System codes

These can occur on any endpoint:

1_SYS_UNKNOWN is not always a server error

1_SYS_UNKNOWN means the error didn’t carry a specific code. The HTTP status tells you whose problem it is:
  • With a 4xx status, it is a validation error from an older code path. The message is accurate and actionable; treat it exactly like a 4_SYS_* error. For example, URL signing failures return 400 with 1_SYS_UNKNOWN and messages like Invalid signature, Missing signature, or Invalid API key. That means your URL signing implementation needs fixing, not that MoonPay had an internal error.
  • With a 500 status, it is a genuine unexpected error on MoonPay’s side. The message is Internal Server Error. Retry with backoff; if it persists, contact support with the request details and timestamp.

Common domain codes

Domain codes (5_*) are stable and their messages are descriptive. The ones you’ll most commonly encounter: If you hit a 5_* code that isn’t listed here, the message describes the cause. The code is stable, so it’s safe to handle specific cases in your integration.

Worked examples

403 + 4_SYS_FORBIDDEN + “Bank account verification is not enabled”: your account doesn’t have the named feature enabled. No request change will fix it; ask your account manager or support to enable bank account verification. 400 + 1_SYS_UNKNOWN + “Invalid signature”: your widget URL signature doesn’t match what MoonPay computes. Verify you’re signing the exact query string (after URL encoding) with your secret key, HMAC-SHA256, base64-encoded; see URL signing.