topup_not_pending: The top-up already ran

Each top-up session authorizes at most once. The top-up page (GET /pay/topup/{token} and the Authorize click, POST /pay/topup/{token}) answers this code when the session is no longer waiting for the end user:

A funded top-up does not answer this code: the page shows the funded budget again.

The multi-tenant hosted tier answers the same way: the front door checks the link's token and passes the request to the account's core.

What to do

On the wire

HTTP 409. A browser gets a short HTML page naming the code; a client that sends Accept: application/json (and not text/html) gets:

{
  "error": "state",
  "errorDetail": {
    "type": "state_error",
    "code": "topup_not_pending",
    "message": "this top-up is failed",
    "param": null,
    "doc_url": "…/developers/topup.md#topup-not-pending",
    "fix": "the top-up already ran; create a new top-up session"
  }
}

See all error codes.