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.
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.
{ "code": "POLICY_DENIED", "reason_code": "HARD_CAP_EXCEEDED", "message": "...", "details": {}, "request_id": "req_..." }| Status | code values |
|---|---|
| 400 | VALIDATION_ERROR (field errors in details.errors) |
| 401 | UNAUTHENTICATED, AGENT_CREDENTIAL_INVALID |
| 403 | FORBIDDEN, PASSKEY_REQUIRED, POLICY_DENIED, ROLE_NOT_GRANTABLE |
| 404 | NOT_FOUND |
| 409 | IDEMPOTENCY_CONFLICT, ILLEGAL_STATE, CONFLICT, APPROVAL_NOT_ALLOWED, CONSENT_REQUIRED |
| 422 | MERCHANT_NOT_PAYABLE |
| 429 | RATE_LIMITED |
| 502, 503 | MERCHANT_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_actionand 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
| Code | Decision | What the owner sees | What the agent should do | Retry |
|---|---|---|---|---|
| KILL_SWITCH_ACTIVE | DENY | Payments are paused. Payments are paused by the operator. | Stop; retry later. | yes |
| AGENT_CREDENTIAL_INVALID | DENY | Agent credential is invalid. The agent's credential is invalid, rotated or revoked. | Stop; ask the developer to rotate the credential. | no |
| AGENT_FROZEN | DENY | Agent is frozen. This agent was frozen by support or risk. | Stop; ask the owner. | no |
| MANDATE_REVOKED | DENY | Spending rules were revoked. The spending rules for this agent were revoked. | Stop. | no |
| MANDATE_EXPIRED | DENY | Spending rules expired. The spending rules for this agent have expired. | Stop. | no |
| MANDATE_MISSING | DENY | No active spending rules. This agent has no active signed spending rules. | Stop; ask the owner to sign rules. | no |
| RAIL_NOT_ALLOWED | DENY | Not allowed by your rules. This payment method is not allowed by the spending rules. | Choose another service. | no |
| CHAIN_NOT_ALLOWED | DENY | Not allowed by your rules. This network is not allowed by the spending rules. | Choose another service. | no |
| ASSET_NOT_ALLOWED | DENY | Not allowed by your rules. This asset is not allowed by the spending rules. | Choose another service. | no |
| CATEGORY_NOT_ALLOWED | DENY | Not allowed by your rules. This service category is not allowed by the spending rules. | Choose another service. | no |
| MERCHANT_TIER_NOT_ALLOWED | DENY | Not allowed by your rules. Merchants of this trust tier are not allowed by the spending rules. | Choose another service. | no |
| PAYTO_MISMATCH | DENY | Payment details don't match. The merchant's pay-to address doesn't match its listing. | Do not retry; report. | no |
| ASSET_MISMATCH | DENY | Payment details don't match. The merchant's asset doesn't match its listing. | Do not retry; report. | no |
| NETWORK_MISMATCH | DENY | Payment details don't match. The merchant's network doesn't match its listing. | Do not retry; report. | no |
| AMOUNT_MISMATCH | DENY | Payment details don't match. The merchant's price doesn't match its listing. | Do not retry; report. | no |
| SERVICE_MISMATCH | DENY | Payment details don't match. The merchant's resource doesn't match its listing. | Do not retry; report. | no |
| MERCHANT_BLOCKED | DENY | Blocked for safety. This merchant, address or domain is on a block list. | Do not retry. | no |
| PAYTO_CHANGED | DENY | Blocked for safety. The merchant changed where it gets paid. | Do not retry. | no |
| INJECTION_FLAG | DENY | Blocked for safety. Text in this purchase looks like a prompt injection. | Do not retry. | no |
| HARD_CAP_EXCEEDED | DENY | Above 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_EXCEEDED | DENY | Not enough budget left. Not enough {scope} budget left for {amount}. | Call get_spending_status. | no |
| NO_FUNDED_CHAIN | DENY | No 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_MISSING | DENY | Wallet permission removed. The spending permission on the owner's wallet is missing or used up. | Ask the owner. | no |
| APPROVAL_REJECTED | DENY | Owner rejected. The owner rejected this purchase. | Stop. | no |
| APPROVAL_EXPIRED | DENY | Approval expired. Nobody answered the approval request in time. | Stop. | no |
| APPROVAL_INVALIDATED | DENY | Details changed. This request changed after it was sent. Nothing was paid. | Stop. | no |
| POLICY_UNKNOWN_CASE | DENY | Couldn'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
| Code | Decision | What the owner sees | What the agent should do | Retry |
|---|---|---|---|---|
| RISK_REVIEW | REQUIRE APPROVAL | Unusual purchase. This purchase looks unusual and needs approval. | Poll status. | no |
| PRICE_JUMP | REQUIRE APPROVAL | Unusual purchase. The price jumped more than 50% since the last purchase. | Poll status. | no |
| VELOCITY | REQUIRE APPROVAL | Unusual purchase. More than 5 purchases in a minute. | Poll status. | no |
| FIRST_PURCHASE | REQUIRE APPROVAL | Unusual purchase. First purchase at a merchant that is not verified. | Poll status. | no |
| UNKNOWN_MERCHANT_LIMIT | REQUIRE APPROVAL | New merchant above your limit. New merchant above your {limit} limit. | Poll status. | no |
| ABOVE_AUTO_THRESHOLD | REQUIRE APPROVAL | Above your auto-approve limit. Above your {limit} auto-approve limit. | Poll status. | no |
Policy version policy-2026-11-15.1 · 6 codes
Allowed
| Code | Decision | What the owner sees | What the agent should do | Retry |
|---|---|---|---|---|
| WITHIN_POLICY | ALLOW | Within your rules. This purchase is within your spending rules. | no |
Policy version policy-2026-11-15.1 · 1 codes
Card declines
| Code | Decision | What the owner sees | What the agent should do | Retry |
|---|---|---|---|---|
| CARD_NO_MATCHING_INTENT | DECLINE | Card use outside the gateway. A card authorization arrived with no matching purchase. | no | |
| CARD_AMOUNT_MISMATCH | DECLINE | Card 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 is | The 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 approval | Poll the purchase status. A person decides within the approval window or the request expires. |
WITHIN_POLICY | Nothing; the payment proceeds and a receipt follows. |