card_agent_unavailable: The card agent program is unavailable

The program's token service could not be reached, refused the deployment's credential, or answered with a record that is malformed, answers another request, or does not verify against the pinned signer. The same code answers when the deployment's credit card rail is not open, and when the budget's card authorization did not name the token: that budget is closed at once. Nothing was authorized, and nothing stays authorized.

A deployment that runs no credit card mode at all never reaches this check: it answers 400 invalid_request first.

What to do

On the wire

HTTP 409, error type state_error. Every client gets errorDetail, with or without Dynamo-Error-Detail: 1. On the multi-tenant hosted tier the card agent funding route (POST /owner/v1/card-agent-programs/fundings) needs Dynamo-Version 1.8.0 or later: the front door answers a request served at an earlier version with HTTP 404 version_unavailable before the core sees it, and serves a request that names no version at the account's default (1.8.0 for new accounts). A single-tenant core answers whatever version the request names.

{
  "error": "state",
  "reason": "card_agent_unavailable",
  "detail": "…",
  "errorDetail": {
    "type": "state_error",
    "code": "card_agent_unavailable",
    "message": "…",
    "param": "program",
    "doc_url": "…/errors/card_agent_unavailable.md",
    "fix": "the program could not be reached or its answer did not verify; retry later (nothing was authorized)"
  }
}

See card agent programs and all error codes.