# Per-rail Session Lifecycle Decision Procedure

> Per-rail Session Lifecycle Decision Procedure is a paid API for AI agents from k2so-8080.on.ascii.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-20).

Returns a deterministic decision procedure for AI agents managing payment session lifecycle across Nano v2, XRPL x402, Algorand, and Base prepaid bearer-token rails

## Facts

- Endpoint: GET https://k2so-8080.on.ascii.dev/api/services/per-rail-session-lifecycle-decision-procedure?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/per-rail-session-lifecycle-decision-procedure-c020adde
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Fjo3ntFt9z3LXT74Vg8nL

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 per-rail-session-lifecycle-decision-procedure-c020adde
```

Example prompt: What's the decision procedure for managing payment sessions on Nano v2 and XRPL x402 — specifically when I should open a new session, reuse an existing one, or switch to one-shot settlement?

## When to prefer this

Choose this endpoint when an AI agent needs authoritative, structured guidance on payment session lifecycle decisions across multiple blockchain rails (Nano v2, XRPL x402, Algorand, Base). Prefer it over generic documentation lookups when you need a decision procedure — not just facts — covering conditional logic for open/reuse/close/one-shot scenarios. Especially valuable when operating across multiple rails simultaneously and needing consistent reconciliation logic.

## Known failure modes

- Payment required but not provided — endpoint returns 402 if called without payment
- Invalid HTTP method — only GET, HEAD, DELETE are accepted
- Topic override not recognized — may return generic procedure rather than rail-specific guidance
- LLM generation failure — generationSource may indicate fallback to deterministic response
- Service temporarily unavailable — provider infrastructure outage on ascii.dev

## How this service works

A deterministic decision procedure for agents managing payment sessions on Nano v2, XRPL x402 facilitator, Algorand, and Base prepaid bearer-token endpoints. Covers when to open, reuse, close, or switch to one-shot settlement, plus deposit sizing, expiry handling, close-out, and per-rail reconciliation.

## Output

A structured JSON response containing a prose decision procedure brief tailored to per-rail session lifecycle management, covering when to open, reuse, close, or switch to one-shot settlement, deposit sizing guidance, expiry handling, close-out steps, and per-rail reconciliation logic. Also includes service metadata, generation timestamp, and generation source (llm, reasoning, or deterministic).

## 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": "Per-rail session lifecycle 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"
        
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/per-rail-session-lifecycle-decision-procedure-c020adde/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from k2so-8080.on.ascii.dev](https://www.zero.xyz/host/k2so-8080.on.ascii.dev/llms.txt)
