{
 "openapi": "3.1.0",
 "info": {
  "title": "Agentic x402 — a paid call with a signed receipt",
  "version": "1.0.0",
  "description": "One call, one cent, one receipt. GET /api answers 402 Payment Required (x402 v2, scheme exact = EIP-3009 transferWithAuthorization, $0.01 USDC on Base, 60 s window); repeat the call with PAYMENT-SIGNATURE to receive the data and an EdDSA-signed receipt that resolves forever. Public-record only. Operator: Allooloo Technologies Corp.",
  "contact": {
   "name": "Allooloo Technologies Corp.",
   "url": "https://allooloo.io/#contact"
  },
  "termsOfService": "https://allooloo.io/terms"
 },
 "servers": [
  {
   "url": "https://agentic-x402.ai"
  }
 ],
 "externalDocs": {
  "description": "agentic-x402.ai",
  "url": "https://agentic-x402.ai/"
 },
 "paths": {
  "/api": {
   "get": {
    "operationId": "paidCall",
    "summary": "Paid call: the estate index, or one Capital Markets Record with ?record=",
    "description": "Without payment: 402 with the offer (body + PAYMENT-REQUIRED header). With a valid PAYMENT-SIGNATURE: 200 { receipt, data }; headers PAYMENT-RESPONSE and X-X402-Receipt.",
    "parameters": [
     {
      "name": "record",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "example": "uk-cm-kg/LSE/BARC",
      "description": "node/exchange/code — returns that record instead of the index"
     },
     {
      "name": "PAYMENT-SIGNATURE",
      "in": "header",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "base64 x402 v2 payment payload (X-PAYMENT accepted)"
     }
    ],
    "responses": {
     "200": {
      "description": "settled: the data and the receipt",
      "headers": {
       "PAYMENT-RESPONSE": {
        "schema": {
         "type": "string"
        }
       },
       "X-X402-Receipt": {
        "schema": {
         "type": "string"
        }
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "receipt": {
           "type": "object",
           "description": "EdDSA-signed receipt (kid allooloo-x402-receipts-2026-09); jwt verifies against /x402/jwks.json",
           "properties": {
            "iss": {
             "type": "string"
            },
            "sub": {
             "type": "string",
             "description": "payer address"
            },
            "jti": {
             "type": "string",
             "description": "nonce"
            },
            "iat": {
             "type": "integer"
            },
            "resource": {
             "type": "string"
            },
            "network": {
             "type": "string",
             "example": "eip155:8453"
            },
            "asset": {
             "type": "string"
            },
            "amount": {
             "type": "string",
             "example": "10000"
            },
            "amount_usdc": {
             "type": "string",
             "example": "0.01"
            },
            "payTo": {
             "type": "string"
            },
            "transaction": {
             "type": "string",
             "nullable": true
            },
            "explorer": {
             "type": "string",
             "nullable": true
            },
            "settled": {
             "type": "boolean"
            },
            "facilitator": {
             "type": "string"
            },
            "receipt_url": {
             "type": "string"
            },
            "jwt": {
             "type": "string"
            },
            "kid": {
             "type": "string"
            },
            "jwks": {
             "type": "string"
            }
           }
          },
          "data": {
           "type": "object"
          }
         }
        }
       }
      }
     },
     "402": {
      "description": "payment required — the offer",
      "headers": {
       "PAYMENT-REQUIRED": {
        "schema": {
         "type": "string"
        }
       }
      },
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "description": "x402 v2 PaymentRequired",
         "properties": {
          "x402Version": {
           "type": "integer",
           "const": 2
          },
          "error": {
           "type": "string"
          },
          "accepts": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "scheme": {
              "type": "string",
              "const": "exact"
             },
             "network": {
              "type": "string",
              "example": "eip155:8453"
             },
             "amount": {
              "type": "string",
              "example": "10000"
             },
             "asset": {
              "type": "string"
             },
             "payTo": {
              "type": "string"
             },
             "maxTimeoutSeconds": {
              "type": "integer",
              "example": 60
             },
             "resource": {
              "type": "string"
             },
             "description": {
              "type": "string"
             }
            }
           }
          },
          "extensions": {
           "type": "object"
          }
         }
        }
       }
      }
     },
     "503": {
      "description": "receiver not configured"
     }
    }
   }
  },
  "/x402/jwks.json": {
   "get": {
    "operationId": "receiptJwks",
    "summary": "Receipt signing key (Ed25519, kid allooloo-x402-receipts-2026-09)",
    "responses": {
     "200": {
      "description": "JWKS",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "keys": {
           "type": "array",
           "items": {
            "type": "object"
           }
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/x402/receipt/{nonce}": {
   "get": {
    "operationId": "receipt",
    "summary": "Resolve a receipt, forever",
    "parameters": [
     {
      "name": "nonce",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "^[a-f0-9]{32}$"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "the receipt",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "description": "EdDSA-signed receipt (kid allooloo-x402-receipts-2026-09); jwt verifies against /x402/jwks.json",
         "properties": {
          "iss": {
           "type": "string"
          },
          "sub": {
           "type": "string",
           "description": "payer address"
          },
          "jti": {
           "type": "string",
           "description": "nonce"
          },
          "iat": {
           "type": "integer"
          },
          "resource": {
           "type": "string"
          },
          "network": {
           "type": "string",
           "example": "eip155:8453"
          },
          "asset": {
           "type": "string"
          },
          "amount": {
           "type": "string",
           "example": "10000"
          },
          "amount_usdc": {
           "type": "string",
           "example": "0.01"
          },
          "payTo": {
           "type": "string"
          },
          "transaction": {
           "type": "string",
           "nullable": true
          },
          "explorer": {
           "type": "string",
           "nullable": true
          },
          "settled": {
           "type": "boolean"
          },
          "facilitator": {
           "type": "string"
          },
          "receipt_url": {
           "type": "string"
          },
          "jwt": {
           "type": "string"
          },
          "kid": {
           "type": "string"
          },
          "jwks": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "unknown nonce"
     }
    }
   }
  }
 },
 "x-cmr": {
  "operator": "Allooloo Technologies Corp.",
  "identity_headers": [
   "X-CMR-X402: ready",
   "X-CMR-Operator",
   "X-CMR-Contact",
   "X-CMR-Node",
   "X-CMR-Version",
   "X-CMR-Source: public-record"
  ],
  "receipts_kid": "allooloo-x402-receipts-2026-09",
  "trades_record_route": "https://agentic-trades.ai/x402/record/{node}/{exchange}/{code}"
 }
}