Errors and reason codes

Every reason code Abazi returns with a decision, what the owner sees, what the agent should do next, and whether a retry can help.

View as .mdUpdated
Every policy decision carries one machine-readable reason code. Agents act on next_action; owners read the title and body. The codes and their text come from one catalog, versioned with the policy.

The error shape

Every non-2xx response has one shape. code is the error class and maps to the HTTP status; reason_code is set when a policy or a rule decided.

Error body
{ "code": "POLICY_DENIED", "reason_code": "HARD_CAP_EXCEEDED", "message": "...", "details": {}, "request_id": "req_..." }
Statuscode values
400VALIDATION_ERROR (field errors in details.errors)
401UNAUTHENTICATED, AGENT_CREDENTIAL_INVALID
403FORBIDDEN, PASSKEY_REQUIRED, POLICY_DENIED, ROLE_NOT_GRANTABLE
404NOT_FOUND
409IDEMPOTENCY_CONFLICT, ILLEGAL_STATE, CONFLICT, APPROVAL_NOT_ALLOWED, CONSENT_REQUIRED
422MERCHANT_NOT_PAYABLE
429RATE_LIMITED
502, 503MERCHANT_UNREACHABLE, RAIL_UNAVAILABLE

Each operation page lists the statuses it can return. Do not parse message; branch on code and reason_code.

Where codes appear

The codes below are the ones the policy engine, the approval flow and the card authorization stream return.

  • To the agent: in the MCP tool result or the REST response, together with next_action and whether retrying makes sense.
  • To the owner: on the payment in the Console, with the policy trace, and on the receipt.
  • In webhooks: on payment and approval events.

The policy engine checks its steps in a fixed order and returns the code of the first step that hits. See Mandates and policy for the order.

Denials

CodeDecisionWhat the owner seesWhat the agent should doRetry
KILL_SWITCH_ACTIVEDENYPayments are paused. Payments are paused by the operator.Stop; retry later.yes
AGENT_CREDENTIAL_INVALIDDENYAgent credential is invalid. The agent's credential is invalid, rotated or revoked.Stop; ask the developer to rotate the credential.no
AGENT_FROZENDENYAgent is frozen. This agent was frozen by support or risk.Stop; ask the owner.no
MANDATE_REVOKEDDENYSpending rules were revoked. The spending rules for this agent were revoked.Stop.no
MANDATE_EXPIREDDENYSpending rules expired. The spending rules for this agent have expired.Stop.no
MANDATE_MISSINGDENYNo active spending rules. This agent has no active signed spending rules.Stop; ask the owner to sign rules.no
RAIL_NOT_ALLOWEDDENYNot allowed by your rules. This payment method is not allowed by the spending rules.Choose another service.no
CHAIN_NOT_ALLOWEDDENYNot allowed by your rules. This network is not allowed by the spending rules.Choose another service.no
ASSET_NOT_ALLOWEDDENYNot allowed by your rules. This asset is not allowed by the spending rules.Choose another service.no
CATEGORY_NOT_ALLOWEDDENYNot allowed by your rules. This service category is not allowed by the spending rules.Choose another service.no
MERCHANT_TIER_NOT_ALLOWEDDENYNot allowed by your rules. Merchants of this trust tier are not allowed by the spending rules.Choose another service.no
PAYTO_MISMATCHDENYPayment details don't match. The merchant's pay-to address doesn't match its listing.Do not retry; report.no
ASSET_MISMATCHDENYPayment details don't match. The merchant's asset doesn't match its listing.Do not retry; report.no
NETWORK_MISMATCHDENYPayment details don't match. The merchant's network doesn't match its listing.Do not retry; report.no
AMOUNT_MISMATCHDENYPayment details don't match. The merchant's price doesn't match its listing.Do not retry; report.no
SERVICE_MISMATCHDENYPayment details don't match. The merchant's resource doesn't match its listing.Do not retry; report.no
MERCHANT_BLOCKEDDENYBlocked for safety. This merchant, address or domain is on a block list.Do not retry.no
PAYTO_CHANGEDDENYBlocked for safety. The merchant changed where it gets paid.Do not retry.no
INJECTION_FLAGDENYBlocked for safety. Text in this purchase looks like a prompt injection.Do not retry.no
HARD_CAP_EXCEEDEDDENYAbove the per-purchase limit. Amount {amount} exceeds the per-purchase hard cap of {limit}.Choose a cheaper service or ask the owner to change the mandate. Do not retry this purchase.no
BUDGET_EXCEEDEDDENYNot enough budget left. Not enough {scope} budget left for {amount}.Call get_spending_status.no
NO_FUNDED_CHAINDENYNo allowed network has funds. None of the allowed networks has enough funds for this payment.Ask the owner to fund a spending wallet.no
DELEGATION_MISSINGDENYWallet permission removed. The spending permission on the owner's wallet is missing or used up.Ask the owner.no
APPROVAL_REJECTEDDENYOwner rejected. The owner rejected this purchase.Stop.no
APPROVAL_EXPIREDDENYApproval expired. Nobody answered the approval request in time.Stop.no
APPROVAL_INVALIDATEDDENYDetails changed. This request changed after it was sent. Nothing was paid.Stop.no
POLICY_UNKNOWN_CASEDENYCouldn't evaluate safely. The policy engine couldn't evaluate this purchase safely.Stop; report.no

Policy version policy-2026-11-15.1 · 27 codes

Asks for approval

CodeDecisionWhat the owner seesWhat the agent should doRetry
RISK_REVIEWREQUIRE APPROVALUnusual purchase. This purchase looks unusual and needs approval.Poll status.no
PRICE_JUMPREQUIRE APPROVALUnusual purchase. The price jumped more than 50% since the last purchase.Poll status.no
VELOCITYREQUIRE APPROVALUnusual purchase. More than 5 purchases in a minute.Poll status.no
FIRST_PURCHASEREQUIRE APPROVALUnusual purchase. First purchase at a merchant that is not verified.Poll status.no
UNKNOWN_MERCHANT_LIMITREQUIRE APPROVALNew merchant above your limit. New merchant above your {limit} limit.Poll status.no
ABOVE_AUTO_THRESHOLDREQUIRE APPROVALAbove your auto-approve limit. Above your {limit} auto-approve limit.Poll status.no

Policy version policy-2026-11-15.1 · 6 codes

Allowed

CodeDecisionWhat the owner seesWhat the agent should doRetry
WITHIN_POLICYALLOWWithin your rules. This purchase is within your spending rules.no

Policy version policy-2026-11-15.1 · 1 codes

Card declines

CodeDecisionWhat the owner seesWhat the agent should doRetry
CARD_NO_MATCHING_INTENTDECLINECard use outside the gateway. A card authorization arrived with no matching purchase.no
CARD_AMOUNT_MISMATCHDECLINECard use outside the gateway. The card authorization amount doesn't match the purchase.no

Policy version policy-2026-11-15.1 · 2 codes

How an agent should handle a code

If the code isThe agent should
A deny with retry "no"Stop and report. Retrying the same purchase gives the same answer: the engine is deterministic.
A deny with retry "yes"Wait and try later. Only a pause by the operator is retryable.
An ask for approvalPoll the purchase status. A person decides within the approval window or the request expires.
WITHIN_POLICYNothing; the payment proceeds and a receipt follows.

Next steps

On this page