Error codes

Reseller API

All errors follow RFC 7807. Body is application/problem+json with fields type, title, status, detail, request_id and optionally reason or errors[].

{
  "type": "https://www.kernelhost.com/en/reseller-api/errors/payment_required",
  "title": "Payment required",
  "status": 402,
  "detail": "The order could not be paid.",
  "request_id": "01HX7Z3K8Q...",
  "reason": "insufficient_credit_and_no_card"
}
HTTPtypeMeaning
400validation_failedInput validation failed. See errors[] for per-field detail.
401auth_failedAuthentication failed. reason indicates why: missing_headers, bad_key, bad_timestamp, timestamp_out_of_window, bad_nonce, bad_signature, signature_mismatch, replay_detected, unknown_or_locked_key, ip_not_allowed.
402payment_requiredPayment required. reason see below.
403forbidden_scopePermission missing. reason: missing_scope.
404not_foundResource does not exist or is not visible to this key (prevents tenant enumeration).
409idempotency_conflictIdempotency-Key already used with a different body.
429rate_limitedRate limit exceeded. Honor the Retry-After header.
500internal_errorInternal server error. Provide request_id for correlation with the audit log when contacting support.

Payment-required reasons (HTTP 402)

When the order cannot be paid, the API returns HTTP 402 with a machine-readable reason in the JSON body.

  • insufficient_credit_and_no_card (Credit insufficient and no card on file. Solution: top up credit or add a card in the customer portal.)
  • card_declined (Card was declined by the bank/gateway. Solution: try a different card or contact your bank.)
  • card_expired (Card expired. Solution: add a new card in the customer portal.)
  • client_not_found (Account id not found (should practically never happen, contact support).)