Skip to content
KOI Games Developer

Reference

Errors

The KOI partner API uses HTTP status codes and a JSON body. Callback errors you return to KOI are covered in Refusing a transaction.

Response format

json
{
  "statusCode": 401,
  "message": "Invalid token",
  "error": "Unauthorized"
}
FieldTypeDescription
statusCodenumberHTTP status code.
messagestringHuman-readable reason. Do not parse it; it can change.
errorstringHTTP reason phrase. Not always present.

Validation errors

422 Unprocessable Entity lists the invalid fields and their messages:

json
{
  "user_id": ["user_id is a required field"],
  "game": ["game is a required field"]
}

Status codes

StatusMeaningWhat to do
200Success.—
400The request is valid JSON but cannot be processed (unknown currency, inconsistent dates, missing configuration).Fix the request or the account configuration.
401Missing or invalid access token, or the resource is not available to your account.Check the Authorization header and the enabled games.
403The operation is not allowed for your account.Contact your account manager.
404The resource does not exist in your account.Check the identifier.
422Field validation failed.Fix the listed fields.
500Unexpected error in KOI.Retry with backoff. Report persistent failures with the time and request.
502Your own endpoint, called by KOI on your behalf, failed.Check your wallet endpoint.

KOI never returns stack traces, database errors or third-party responses in an error body.