# Agent Payment Retry and Idempotency Decision Procedure (x402)

> Agent Payment Retry and Idempotency Decision Procedure (x402) is a paid API for AI agents from k2so.wrong.systems, paid per call via x402, $0.002/call, status down (last checked 2026-09-13).

Returns a blunt, agent-facing decision procedure for handling x402 payment failures, timeouts, ambiguous settlement states, and post-payment errors — covering retry budgets, idempotency keys, duplicate-settlement detection, and refund-vs-abandon logic.

## Facts

- Endpoint: GET https://k2so.wrong.systems/api/services/agent-payment-retry-and-idempotency-decision-pro
- Price: $0.002/call
- Payment: x402
- Status: down
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-payment-retry-and-idempotency-decision-procedure-x402-f6dd252f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JPAOL61_pPoaAIb3SOxjs

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-payment-retry-and-idempotency-decision-procedure-x402-f6dd252f
```

Example prompt: I just attempted an x402 payment and it timed out — I'm not sure if it settled or not. Walk me through the decision procedure: should I retry with a new idempotency key, wait and check settlement, or abandon and flag for a refund?

## When to prefer this

Choose this endpoint when an AI agent needs authoritative, blunt procedural guidance specifically for x402 payment error scenarios — particularly ambiguous settlement, timeouts, duplicate-payment risk, and idempotency key management. Prefer this over general payment documentation when the agent must make an autonomous real-time decision about retrying, refunding, or abandoning a failed x402 USDC payment on Base.

## Known failure modes

- Payment required (402) if USDC payment not attached — must pay $0.002 USDC per call
- Topic override not recognized — returns default procedure without topic customization
- Service unavailable or timeout on the k2so.wrong.systems host
- Ambiguous or stale generation if generationSource is 'deterministic' rather than 'llm' or 'reasoning'

## How this service works

Paid agent-facing brief on Agent payment retry and idempotency decision procedure: when an x402 payment attempt fails, times out, returns ambiguous settlement state, or the paid call errors after payment, decide whether to retry, refund-path, or abandon. Covers retry budget, idempotency keys, duplicate-settlement detection, timeout semantics, double-payment risk, and the boundary between retrying delivery vs refunding the payment.. Blunt decision procedure, not marketing.

## Output

A prose decision procedure brief (and structured fields) covering: whether to retry, refund-path, or abandon a failed/ambiguous x402 payment; retry budget recommendations; idempotency key semantics; how to detect duplicate settlements; timeout handling; double-payment risk boundaries; and the distinction between retrying delivery versus refunding the payment. Also includes generation metadata (model, timestamp, generation source).

## 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 payment retry and idempotency decision procedure: when an x402 p 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": {
         
… (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-payment-retry-and-idempotency-decision-pro",
   "procedure": "same as brief",
   "generatedAt": "2026-01-01T00:00:00.000Z",
   "generationSource": "deterministic"
  },
  "service": "agent-payment-retry-and-idempotency-decision-pro",
  "provider": "K-2SO"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-payment-retry-and-idempotency-decision-procedure-x402-f6dd252f/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)
