> ## Documentation Index
> Fetch the complete documentation index at: https://kb.paymentsmojo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> Every refusal says what went wrong and what to change.

When a request can't be done, the answer is a **problem details** document (RFC 9457,
`Content-Type: application/problem+json`):

```json theme={null}
{
  "type": "https://tools.ietf.org/html/rfc4918#section-11.2",
  "title": "Check the request",
  "status": 422,
  "detail": "Enter the invoice number (up to 50 characters).",
  "traceId": "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"
}
```

* `title` is short and stable: use it in your code to tell errors apart.
* `detail` says what to change, in words you can show to a person.
* `errors` (on some `400`s) lists messages by field.
* `traceId` identifies the request. Include it when you contact Mojo Payments about a failure.

## Common refusals

| Status | Title | What to do |
| - | - | - |
| `401` | (none) | Get a new token: it expired or is missing. |
| `401` | API key revoked | The key was revoked in the portal. Use a new key. |
| `403` | Not permitted | The key doesn't have the permission named in `detail`. Make a key with it. |
| `403` | Not available to API keys | The endpoint isn't part of the published API. Use only endpoints in the API reference. |
| `403` | Organization not active | Your account is suspended or closed. Contact Mojo Payments. |
| `422` | Check the request | Fix the field `detail` names. |
| `422` | Invoice payments isn't on | Mojo Payments turns invoice payments on for you; contact us. |
| `422` | Unknown MID | Use a MID id from `GET /accounts` that your key can use. |
| `429` | (none) | Slow down: see [Rate limits](/developers/rate-limits). |
| `500` | An error occurred while processing your request. | Mojo Payments is alerted. Retry later; for invoices, retry with the same `Idempotency-Key`. |

Questions about an error: [hello@paymentsmojo.com](mailto:hello@paymentsmojo.com), with the `traceId`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.