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:
- It is being funded right now (
funding), for example after a double click or a second tab. - It failed (
failed): the authorization was declined or did not complete. The message names the state.
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
- End users: wait a moment and reload; if the top-up failed, ask the service for a new link.
- Developers: create a new top-up session (
POST /owner/v1/topups);GET /owner/v1/topups/{id}shows the state andfailureCode. - See the top-up guide.
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.