# Agent Decision Procedure for x402 Payments

> Agent Decision Procedure for x402 Payments is a paid API for AI agents from k2so.wrong.systems, paid per call via x402, $0.001/call, status down (last checked 2026-09-15).

Returns a structured decision brief explaining how an autonomous agent should safely handle x402 payment challenges, including parsing 402 responses, verifying receipts, checking budgets, and deciding whether to pay.

## Facts

- Endpoint: GET https://k2so.wrong.systems/api/services/agent-decision-procedure
- Price: $0.001/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-decision-procedure-for-x402-payments-1f9009c7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_H8Y0av6XIIexDTRENyJym

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent-decision-procedure-for-x402-payments-1f9009c7
```

Example prompt: Give me the full x402 agent decision procedure — walk me through how to parse a 402 response, verify the payment receipt, check my budget and allowlist thresholds, and decide whether to actually pay, including what to log and what the failure modes are.

## When to prefer this

Use this endpoint when building or auditing an x402 payment client that needs a clear, agent-consumable decision procedure for handling 402 responses autonomously. Prefer this over general documentation when you need a structured, machine-readable brief with explicit budget/allowlist logic, evidence logging requirements, and enumerated failure modes tailored for agent operation on Base (USDC).

## Known failure modes

- Payment not completed — handler returns ok:false if the $0.001 USDC payment fails
- Invalid HTTP method — only GET, HEAD, DELETE are accepted
- Malformed input object — missing required 'type' or 'method' fields returns a validation error
- LLM generation failure — generationSource may fall back to deterministic or reasoning if LLM unavailable
- Topic override not recognized — may return a generic brief if topic is not a known x402 topic

## How this service works

Agent decision procedure for x402 payments: inputs are task goal, budget remaining, latency budget, and required confidence. Auto-pay when expected value clearly exceeds price and failure is cheap to retry. Deliberate when price is material or upstream unproven. Defer when identity, refund path, or provenance missing. Keep request id, payer policy version, evidence hash, settle receipt. Handle failure modes like empty payload, wrong schema, double-charge with idempotency keys. Demands

## Output

A prose decision brief for agents covering: how to parse a 402 response, how to verify a payment receipt, how to check budget and allowlist thresholds, what evidence to log, and what failure modes to handle. Also includes service slug, generation source (llm/reasoning/deterministic), model used, and an ISO-8601 timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "meta": {
       "enum": [
        "0",
        "1"
       ],
       "type": "string",
       "description": "Set to 1 for free metadata JSON (no payment required)"
      },
      "topic": {
       "type": "string",
       "description": "Optional topic override for the decision procedure"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "title": "Agent decision procedure paid response",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "required": [
      "ok",
      "paid",
      "service",
      "provider",
      "result"
     ],
     "properties": {
      "ok": {
       "type": "boolean"
      },
      "paid": {
       "type": "boolean"
      },
      "result": {
       "type": "object",
       "required": [
        "ok",
        "service"
       ],
       "properties": {
        "ok": {
         "type": "boolean",
         "description": "Handler success"
        },
        "brief": {
         "type": "string",
         "description": "Decision procedure prose for agents"
        },
        "model": {
         "type": "string"
        },
        "topic": {
         "type": "string"
        },
        "service": {
         "type": "string",
         "description": "Service slug"
        },
        "procedure": {
         "type": "string"
        },
        "generatedAt": {
         "type": "string",
         "description": "ISO-8601 timestamp"
        },
        "generationSource": {
         "enum": [
          "llm",
          "reasoning",
          "deterministic"
         ],
         "type": "string"
        }
       }
      },
      "payment": {
       "type": "object",
       "properties": {
        "code": {
         "type": "string"
        },
        "payer": {
         "type": "string"
        },
        "detail": {
         "type": "string"
        },
        "selfPay":
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "paid": true,
  "result": {
   "ok": true,
   "brief": "plain prose decision procedure (120+ words)",
   "model": "deepseek/deepseek-v4-flash-0731",
   "topic": "string topic",
   "service": "agent-decision-procedure",
   "procedure": "same as brief",
   "generatedAt": "2026-01-01T00:00:00.000Z",
   "generationSource": "deterministic"
  },
  "service": "agent-decision-procedure",
  "provider": "K-2SO"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-decision-procedure-for-x402-payments-1f9009c7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from k2so.wrong.systems](https://www.zero.xyz/host/k2so.wrong.systems/llms.txt)
