{"openapi":"3.1.0","info":{"title":"usevig","version":"0.1.0","description":"Non-custodial HTTP 402 payments for AI agents. Funds move directly payer -> merchant via EIP-3009 transferWithAuthorization; usevig relays and never takes custody or a cut of value. Metered per transaction verified.","contact":{"email":"founders@usevig.com"}},"servers":[{"url":"https://usevig.com"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Error":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"fix":{"type":"string","description":"Plain-language instruction for the caller."}}}}},"paths":{"/health":{"get":{"summary":"Liveness","security":[],"responses":{"200":{"description":"Healthy."}}}},"/v1/config":{"get":{"summary":"Chain, asset and EIP-712 signing parameters","security":[],"responses":{"200":{"description":"Config."}}}},"/v1/merchants":{"post":{"summary":"Create a merchant (sandbox is self-serve, no credentials)","security":[],"responses":{"201":{"description":"Created."},"400":{"description":"Invalid payout address.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"fix":{"type":"string","description":"Plain-language instruction for the caller."}}}}}},"403":{"description":"Live signup gated.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"fix":{"type":"string","description":"Plain-language instruction for the caller."}}}}}}}}},"/v1/me":{"get":{"summary":"Tier, usage and settings","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Account."},"401":{"description":"Bad key.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"fix":{"type":"string","description":"Plain-language instruction for the caller."}}}}}}}}},"/v1/payments":{"post":{"summary":"Create a charge; returns an HTTP 402 EIP-712 challenge","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"}}],"responses":{"400":{"description":"Invalid amount.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"fix":{"type":"string","description":"Plain-language instruction for the caller."}}}}}},"402":{"description":"Payment required — signable challenge."},"409":{"description":"Idempotency key reused with a different body.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"fix":{"type":"string","description":"Plain-language instruction for the caller."}}}}}}}},"get":{"summary":"List payments","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Payments."}}}},"/v1/payments/{id}/settle":{"post":{"summary":"Verify a signed authorization and relay it on-chain","security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Payment","in":"header","schema":{"type":"string"},"description":"0x EIP-712 signature."},{"name":"Idempotency-Key","in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"Relayed; poll for finality."},"400":{"description":"Signature/window/amount rejected.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"fix":{"type":"string","description":"Plain-language instruction for the caller."}}}}}},"409":{"description":"Nonce already used, or relay already in flight.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"fix":{"type":"string","description":"Plain-language instruction for the caller."}}}}}},"502":{"description":"On-chain relay failed.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"fix":{"type":"string","description":"Plain-language instruction for the caller."}}}}}}}}},"/v1/payments/{id}":{"get":{"summary":"Payment status and finality","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Payment."},"404":{"description":"Unknown payment.","content":{"application/json":{"schema":{"type":"object","required":["error","fix"],"properties":{"error":{"type":"string","description":"Stable machine-readable code."},"fix":{"type":"string","description":"Plain-language instruction for the caller."}}}}}}}}},"/mcp":{"post":{"summary":"MCP JSON-RPC 2.0 endpoint","security":[],"responses":{"200":{"description":"JSON-RPC result."}}}}}}