# Errors

```json
{
  "code": 422,
  "status": "failed",
  "message": "invalid ktp"
}
```

| HTTP status | Meaning | Common messages |
| --- | --- | --- |
| `400` | A dependency, OCR provider, billing, or usage request failed. | `access timeout` or a provider error message |
| `401` | Credentials, merchant key, or channel configuration could not be authenticated. | `invalid authorization`, `invalid merchant key`, `authentication failed` |
| `403` | The integration cannot use this service or has insufficient balance. | `forbidden`, `insufficient balance` |
| `404` | A configured result or required field mapping was not found. | `result config not found`, `field not found` |
| `422` | The JSON body, transaction ID, KTP image, or an enabled image-quality check is invalid. | See validation messages below. |
| `503` | The service is under maintenance. | `service is currently under maintenance` |

Validation can return:

- `invalid payload`
- `empty trId`
- `trId length must be between 1 and 36`
- `invalid trId`
- `empty ktp`
- `invalid ktp`
- `ktp above image size requirement`
- `Invalid KTP Image` when an enabled KTP detection or blur check fails
