topup_declined: The credit card authorization was declined
The end user clicked Authorize on the top-up page (POST /pay/topup/{token}), and the card network declined the authorization hold. Nothing was charged. If the budget had already been opened, it is closed again. The top-up is marked failed with this code and cannot be retried.
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: ask the service for a new link and try another card.
- Developers: create a new top-up session;
GET /owner/v1/topups/{id}showsstate: "failed"andfailureCode: "topup_declined". - See the top-up guide.
On the wire
HTTP 402. 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_declined",
"message": "the credit card authorization was declined; nothing was charged",
"param": null,
"doc_url": "…/developers/topup.md#topup-declined",
"fix": "the credit card authorization was declined; nothing was charged"
}
}
An authorization that fails for any other reason answers topup_funding_failed. See all error codes.