Errors

Branches returns JSON errors shaped like Stripe API errors.

{
  "error": {
    "type": "invalid_request_error",
    "code": "parameter_invalid",
    "message": "Human-readable explanation.",
    "param": "external_id",
    "request_id": "req_123"
  }
}

Fields

Field Notes
type Error category, such as invalid_request_error, api_error, or idempotency_error.
code Optional machine-readable code.
message Human-readable explanation.
param Optional field or parameter related to the error.
issues Optional validation detail.
request_id Optional request identifier. Also returned in the Request-Id response header when present.

HTTP status codes

Status Meaning
400 The request body could not be parsed as JSON.
401 Missing or invalid API key.
404 Resource or route not found.
422 JSON parsed successfully, but the body failed schema validation.
500 Internal API error.

Validation errors

Schema validation failures return 422.

{
  "errorName": "HttpRequestValidationsError",
  "content": [
    {
      "fieldName": "subscriber_primary",
      "humanReadableMessage": "subscriber_primary is required when responsible_party is INSURANCE_PAY"
    }
  ]
}

Unknown routes

Unknown /api/* paths return JSON instead of HTML.

{
  "error": {
    "type": "invalid_request_error",
    "message": "Unrecognized request URL (GET: /api/unknown)."
  }
}