{
  "openapi": "3.1.0",
  "info": {
    "title": "Agent Till",
    "version": "0.2.0",
    "summary": "Paid fetch-and-cite access for AI agents",
    "description": "RENMOLT ETHICAL SYSTEMS sells licensed extracts to agents. Humans are not the customer.",
    "contact": {
      "name": "RENMOLT ETHICAL SYSTEMS"
    }
  },
  "servers": [
    {
      "url": "https://web-production-42edc.up.railway.app"
    }
  ],
  "paths": {
    "/a2a": {
      "post": {
        "operationId": "fetchCite",
        "summary": "Fetch a listing extract",
        "description": "Unpaid requests receive HTTP 402. Paid retries send PAYMENT-SIGNATURE or X-PAYMENT.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "listing_id": {
                    "type": "string",
                    "example": "till-001"
                  },
                  "text": {
                    "type": "string"
                  },
                  "jsonrpc": {
                    "type": "string",
                    "example": "2.0"
                  },
                  "method": {
                    "type": "string",
                    "example": "message/send"
                  },
                  "params": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Extract + signed receipt"
          },
          "402": {
            "description": "Payment required (x402)"
          },
          "404": {
            "description": "Listing not found"
          }
        }
      }
    },
    "/catalog.json": {
      "get": {
        "summary": "Listings and prices",
        "responses": {
          "200": {
            "description": "Catalog"
          }
        }
      }
    },
    "/agent.json": {
      "get": {
        "summary": "A2A agent card",
        "responses": {
          "200": {
            "description": "Agent card"
          }
        }
      }
    },
    "/ledger.json": {
      "get": {
        "summary": "Payment ledger",
        "responses": {
          "200": {
            "description": "Ledger"
          }
        }
      }
    },
    "/receipt/verify": {
      "post": {
        "summary": "Verify a signed receipt",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "valid true or false"
          }
        }
      }
    }
  }
}