# Restarules License Gateway (x402)

> Restarules License Gateway (x402) is a paid API for AI agents from x402-license-gateway.selfradiance.workers.dev, paid per call via x402, $1/call, status unknown (last checked 2026-09-13).

Issues an Ed25519-signed agentic license receipt (agentic-receipt-v2.2) for the Restarules asset upon payment of 1.00 USDC on Base mainnet via x402.

## Facts

- Endpoint: GET https://x402-license-gateway.selfradiance.workers.dev/license/vq01-restarules
- Price: $1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/restarules-license-gateway-x402-d515e5ad
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ngy4p6DuXo9vmU-2rzTZa

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 restarules-license-gateway-x402-d515e5ad
```

Example prompt: Purchase a Restarules license for me — pay 1 USDC on Base mainnet via x402 and get back the signed agentic-receipt-v2.2 so I can verify my access.

## When to prefer this

Use this endpoint when an AI agent needs to programmatically purchase and obtain a cryptographically verifiable license receipt for Restarules using USDC on Base mainnet via the x402 payment protocol. Prefer this over manual license purchase flows when building agentic workflows that need machine-readable, Ed25519-signed proof of licensing.

## Known failure modes

- Payment not included or insufficient — x402 payment challenge returned (402 status with payment requirements)
- Wrong network or currency — payment rejected if not USDC on Base mainnet
- Invalid or expired payment payload — receipt not issued
- Gateway worker error — 5xx response from Cloudflare Worker
- Malformed request — missing or incorrect HTTP method returns error

## How this service works

Sells an Ed25519-signed license receipt (agentic-receipt-v2.2) for Restarules for 1.00 USDC on Base mainnet.

## Output

Returns a JSON object with status 'licensed', a structured receipt object (schema: agentic-receipt-v2.2) containing receipt_id (SRX-XXXXXXXXXXXXXXXX), asset ID, asset SHA-256, version, payment details (rail: x402, currency: USDC, network, payer address, payment_payload_sha256), issuer, algorithm (Ed25519), and issued_at timestamp, plus a detached Ed25519 signature, the verification key, verification key source, a certification string, and an audit tag (v2.2-sovereign-standard-x402).

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "status",
      "certification",
      "receipt",
      "signature",
      "verification_key",
      "verification_key_source",
      "audit",
      "note"
     ],
     "properties": {
      "note": {
       "type": "string"
      },
      "audit": {
       "type": "string",
       "const": "v2.2-sovereign-standard-x402"
      },
      "status": {
       "type": "string",
       "const": "licensed"
      },
      "receipt": {
       "type": "object",
       "required": [
        "schema",
        "kid",
        "issuer",
        "asset",
        "payment",
        "issued_at",
        "algorithm",
        "receipt_id"
       ],
       "properties": {
        "kid": {
         "type": "string"
        },
        "asset": {
         "type": "object",
         "required": [
          "id",
          "sha256",
          "version"
         ],
         "properties": {
          "id": {
           "type": "string"
          },
          "sha256": {
           "type": "string",
           "pattern": "^[0-9a-f]{64}$"
          },
          "version": {
           "type": "string"
          }
         },
         "additionalProperties": false
        },
        "issuer": {
         "type": "string"
        },
        "schema": {
         "type": "string",
         "const": "agentic-receipt-v2.2"
        },
        "payment": {
         "type": "object",
         "required": [
          "rail",
          "scheme",
          "network",
          "amount",
          "currency",
          "payer",
          "payment_payload_sha256"
         ],
         "properties": {
          "rail": {
           "type": "string",
           "const": "x402"
          },
          "payer": {
           "type": "string"
          },
          "amount": {
           "type": "string"
          },
          "scheme": 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/restarules-license-gateway-x402-d515e5ad/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-license-gateway.selfradiance.workers.dev](https://www.zero.xyz/host/x402-license-gateway.selfradiance.workers.dev/llms.txt)
