{"openapi": "3.1.0", "info": {"title": "x402-quickstart (loop2)", "version": "2.0.0", "description": "Complete x402 quickstart bundle: v2 Base USDC seller endpoint + EIP-3009 buyer client + deterministic product bundle + tests.", "x-guidance": "GET /pro/x402-quickstart is x402-paid (0.5 USD, Base USDC, 0-capital gas-sponsored settlement). Unpaid GET returns a v2 402 with accepts[]. Sign an EIP-3009 TransferWithAuthorization (validAfter/validBefore uint256) and retry with a PAYMENT-SIGNATURE header (base64 v2 payment payload) to receive the gzip bundle. GET /test-pay is a 0.01 USDC live settlement test for buyer-side integration. GET /mkt/x402 is a 0.001 USDC market snapshot; GET /mkt/funded is a 0.001 USDC funded-seller leaderboard (micro-payment data, 1h on-chain verified). /free/mini and /openapi.json are free.", "contact": {"email": "loop2-agent@proton.me"}}, "paths": {"/test-pay": {"get": {"operationId": "test_pay", "summary": "x402 live settlement test (0.01 USDC Base mainnet): verify your full EIP-3009 -> settle payment path", "tags": ["x402", "test"], "parameters": [{"name": "format", "in": "query", "required": false, "description": "Response format (always 'json'); documented input contract for agents.", "schema": {"type": "string", "enum": ["json"], "default": "json"}}, {"name": "X-AGENT-PUBKEY", "in": "header", "required": false, "description": "64-hex nostr pubkey of the calling agent; you receive a Nostr DM with the order outcome (settled tx or failure reason).", "schema": {"type": "string"}}], "responses": {"200": {"description": "settlement confirmed (tx + payer)", "content": {"application/json": {"schema": {"type": "object"}}}}, "402": {"description": "Payment Required (x402 v2, 0.01 USDC)", "content": {"application/json": {"schema": {"type": "object"}}}}}}}, "/mkt/x402": {"get": {"operationId": "mkt_x402", "summary": "x402 market snapshot (0.001 USDC Base mainnet): PayAI Bazaar directory stats + Base chain state + loop2 endpoint status", "tags": ["x402", "market", "data"], "parameters": [{"name": "X-AGENT-PUBKEY", "in": "header", "required": false, "description": "64-hex nostr pubkey of the calling agent; you receive a Nostr DM with the order outcome (settled tx or failure reason).", "schema": {"type": "string"}}], "x-payment-info": {"price": {"mode": "fixed", "currency": "USD", "amount": "0.001000"}, "protocols": [{"x402": {}}]}, "responses": {"200": {"description": "market snapshot JSON", "content": {"application/json": {"schema": {"type": "object"}}}}, "402": {"description": "Payment Required (x402 v2, 0.001 USDC)", "content": {"application/json": {"schema": {"type": "object"}}}}}}}, "/mkt/funded": {"get": {"operationId": "mkt_funded", "summary": "funded-seller leaderboard (0.001 USDC Base mainnet): active PayAI sellers with real Base USDC principal, on-chain verified (1h cache)", "tags": ["x402", "market", "data"], "parameters": [{"name": "X-AGENT-PUBKEY", "in": "header", "required": false, "description": "64-hex nostr pubkey of the calling agent; you receive a Nostr DM with the order outcome (settled tx or failure reason).", "schema": {"type": "string"}}], "x-payment-info": {"price": {"mode": "fixed", "currency": "USD", "amount": "0.001000"}, "protocols": [{"x402": {}}]}, "responses": {"200": {"description": "leaderboard JSON {leaderboard:[payTo,usdc,entries,domains], stats}", "content": {"application/json": {"schema": {"type": "object"}}}}, "402": {"description": "Payment Required (x402 v2, 0.001 USDC)", "content": {"application/json": {"schema": {"type": "object"}}}}}}}, "/mkt/agents": {"get": {"operationId": "mkt_agents", "summary": "seller liveness/conformance probe (0.001 USDC Base mainnet): reachability + 402 spec compliance of top seller endpoints, read-only (1h cache)", "tags": ["x402", "market", "data"], "parameters": [{"name": "X-AGENT-PUBKEY", "in": "header", "required": false, "description": "64-hex nostr pubkey of the calling agent; you receive a Nostr DM with the order outcome (settled tx or failure reason).", "schema": {"type": "string"}}], "x-payment-info": {"price": {"mode": "fixed", "currency": "USD", "amount": "0.001000"}, "protocols": [{"x402": {}}]}, "responses": {"200": {"description": "probe JSON {probes:[url,reachable,http,x402_402,conformant], stats}", "content": {"application/json": {"schema": {"type": "object"}}}}, "402": {"description": "Payment Required (x402 v2, 0.001 USDC)", "content": {"application/json": {"schema": {"type": "object"}}}}}}}, "/pro/x402-quickstart": {"get": {"operationId": "buy_quickstart", "summary": "Buy x402 quickstart bundle (server + client + tests + README)", "tags": ["x402"], "parameters": [{"name": "format", "in": "query", "required": false, "description": "Bundle format (always 'tar.gz'); included so agents have a documented input contract.", "schema": {"type": "string", "enum": ["tar.gz"], "default": "tar.gz"}}, {"name": "X-AGENT-PUBKEY", "in": "header", "required": false, "description": "64-hex nostr pubkey of the calling agent; you receive a Nostr DM with the order outcome (settled tx or failure reason).", "schema": {"type": "string"}}], "x-payment-info": {"price": {"mode": "fixed", "currency": "USD", "amount": "0.500000"}, "protocols": [{"x402": {}}]}, "responses": {"200": {"description": "gzip bundle delivered", "content": {"application/gzip": {"schema": {"type": "string", "format": "binary"}}}}, "402": {"description": "Payment Required (x402 v2)", "content": {"application/json": {"schema": {"type": "object", "properties": {"x402Version": {"type": "integer"}, "accepts": {"type": "array", "items": {"type": "object"}}}}}}}}}}, "/free/settle-test": {"post": {"operationId": "free_settle_test", "summary": "Free settlement dry-run (sandbox): validate your EIP-3009 payload + on-chain USDC balance, no chain write. Body = payment payload, ?resource= target endpoint", "tags": ["free", "data"], "security": [], "parameters": [{"name": "resource", "in": "query", "required": false, "description": "Target paid endpoint: /mkt/funded | /mkt/agents | /mkt/x402 | /test-pay (default /mkt/funded)", "schema": {"type": "string"}}], "responses": {"200": {"description": "dry-run JSON {signature, balance, verdict}", "content": {"application/json": {"schema": {"type": "object"}}}}, "429": {"description": "rate limited (10/min per IP)"}}}}, "/free/data": {"get": {"operationId": "free_data", "summary": "Free sample datasets (top3 rows from 1h cache): funded-seller leaderboard + seller liveness probe + directory size", "tags": ["free", "data"], "security": [], "responses": {"200": {"description": "sample JSON {funded_leaderboard, agents_probe, note}", "content": {"application/json": {"schema": {"type": "object"}}}}}}}, "/free/mini": {"get": {"operationId": "free_mini", "summary": "Free mini guide", "tags": ["free"], "security": [], "responses": {"200": {"description": "text guide", "content": {"text/plain": {"schema": {"type": "string"}}}}}}}, "/free/status": {"get": {"operationId": "x402_status", "summary": "Free agent liveness/capability probe (JSON)", "tags": ["free"], "security": [], "responses": {"200": {"description": "service status JSON", "content": {"application/json": {"schema": {"type": "object", "properties": {"service": {"type": "string"}, "live": {"type": "boolean"}, "network": {"type": "string"}, "asset": {"type": "string"}, "payTo": {"type": "string"}}}}}}}}}, "/free/webhook": {"post": {"operationId": "webhook_in", "summary": "Free inbound webhook receiver (AgentMail message.received envelope); payapi.market subjects mirrored to data/payapi/events.jsonl", "tags": ["free"], "security": [], "requestBody": {"content": {"application/json": {"schema": {"type": "object"}}}}, "responses": {"200": {"description": "accepted", "content": {"application/json": {"schema": {"type": "object"}}}}}}, "get": {"operationId": "webhook_status", "summary": "Webhook received-event count + last 5", "tags": ["free"], "security": [], "responses": {"200": {"description": "count and last events", "content": {"application/json": {"schema": {"type": "object"}}}}}}}, "/free/preflight": {"get": {"operationId": "preflight", "summary": "Machine-readable trust preflight (free): probe loop2 paid endpoint conformance + price/payTo/asset + trust signals before paying", "tags": ["free"], "security": [], "parameters": [{"name": "resource", "in": "query", "required": false, "schema": {"type": "string", "enum": ["/mkt/x402", "/mkt/funded", "/mkt/agents", "/test-pay", "/pro/x402-quickstart"]}}], "responses": {"200": {"description": "preflight JSON {reachability, conformance, payment, trust, verdict}", "content": {"application/json": {"schema": {"type": "object"}}}}}}}, "/free/verify": {"post": {"operationId": "verify_eip3009", "summary": "Free EIP-3009 signature verification (no settlement)", "tags": ["free"], "security": [], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"authorization": {"type": "object", "description": "EIP-3009 TransferWithAuthorization (from/to/value/validAfter/validBefore/nonce) + signature"}}}, "required": ["authorization"]}}}, "responses": {"200": {"description": "verification result JSON", "content": {"application/json": {"schema": {"type": "object", "properties": {"valid": {"type": "boolean"}, "recovered_signer": {"type": "string"}, "issues": {"type": "array", "items": {"type": "string"}}}}}}}}}}, "/robots.txt": {"get": {"operationId": "robots", "summary": "Crawler robots.txt", "tags": ["meta"], "security": [], "responses": {"200": {"description": "robots.txt", "content": {"text/plain": {"schema": {"type": "string"}}}}}}}, "/openapi.json": {"get": {"operationId": "openapi", "summary": "This document", "tags": ["meta"], "security": [], "responses": {"200": {"description": "OpenAPI spec", "content": {"application/json": {"schema": {"type": "object"}}}}}}}}, "components": {"securitySchemes": {}}}