Integrates @x402/extensions/bazaar to enrich 402 responses with
machine-readable input/output schemas. AI agents can now auto-discover
API capabilities, parameter types, and descriptions from the payment
header alone.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
SnapAPI now supports the x402 protocol for pay-per-request access.
AI agents can pay $0.01/screenshot or $0.005/conversion with USDC
on Base network - no signup or API key needed.
- x402.js: Payment verification module using @x402/core + PayAI facilitator
- server.js: Dual auth (x402 Payment-Signature OR X-API-Key)
- Returns HTTP 402 with payment requirements for unauthenticated requests
- API docs updated to v3.0.0 with x402 pricing info
- CORS headers expose Payment-Required/Payment-Response
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- payments.js: Invoice creation, blockchain polling, payment matching
- Endpoints: POST /api/subscribe, GET /api/subscribe/:id, GET /api/pricing
- Plans: Pro ($10/mo, 1000 captures), Enterprise ($50/mo, 10000 captures)
- Zero fees: Direct USDC transfer monitoring on Polygon
- Unique cent offsets per invoice for payment reconciliation
- Auto-generates API keys on payment confirmation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>