{"openapi":"3.1.0","info":{"title":"UnFee — Non-Custodial Multi-Crypto & Card Checkout, x402 AI Agent Settlement & 1-Credit RPC Gateway API","version":"2.2.0","description":"UnFee (https://unfee.xyz) provides True 0% transaction fees on the $5/mo Indie Tier (True 0% Fee) (10,000,000 reqs/mo), $15/mo Pro Tier (True 0% Fee) (35,000,000 reqs/mo), and $49/mo Scale Tier (True 0% Fee) (125,000,000 reqs/mo), and a 0.005% (0.5 bps = 5¢ per $1,000, $100,000/mo breakeven) micro-fee on the $0/mo Starter (5¢ per $1,000 Micro-Fee) (250,000 free API requests/mo) & x402 Pay-As-You-Go tiers. Supports USDC (EIP-3009 x402 gasless), XRP (Native XRPL & cbXRP on Base), RLUSD, ETH, USDT, EURC, cbBTC, DAI, and non-custodial Apple Pay / Google Pay / Debit & Credit Card onramps (/pay & /checkout.js), plus flat-rate 1 Request = 1 Credit JSON-RPC at POST https://api.unfee.xyz/rpc/base, /rpc/eth, and /rpc/xrpl, optional $1.00 Automatic Top-Up (+2,000,000 X-Tokens at 95% usage), HMAC-SHA256 signed webhooks, and instant email receipts. Official X: @unfeexyz (https://x.com/unfeexyz).","contact":{"name":"UnFee (@unfeexyz)","url":"https://x.com/unfeexyz"}},"externalDocs":{"description":"UnFee Public Developer & AI Agent Documentation (/docs & /docs.md)","url":"https://unfee.xyz/docs"},"servers":[{"url":"https://unfee-gateway.unfee.workers.dev","description":"Primary Zero-NRD-Friction AI & MCP Endpoint (Cloudflare Worker Edge — All Routes)"},{"url":"https://unfee.xyz","description":"Primary Production Edge"},{"url":"https://api.unfee.xyz","description":"Direct API & RPC Gateway Edge"}],"x-supported-assets":["USDC (EIP-3009 x402 gasless on Base Mainnet 8453)","XRP (Native XRPL & cbXRP on Base)","RLUSD (Ripple USD on Base & XRPL)","ETH (Base Native)","USDT","EURC","cbBTC","DAI","Apple Pay / Google Pay / Debit & Credit Card Onramps"],"x-official-tiers":{"starter_0":"$0/mo Starter (5¢ per $1,000 Micro-Fee) — 250,000 reqs/mo + 0.005% (0.5 bps) micro-fee","indie_5":"$5/mo Indie Tier (True 0% Fee) — 10,000,000 reqs/mo + True 0% fee ($100,000/mo breakeven)","pro_15":"$15/mo Pro Tier (True 0% Fee) — 35,000,000 reqs/mo + True 0% fee + Auto-Downshift","scale_49":"$49/mo Scale Tier (True 0% Fee) — 125,000,000 reqs/mo + True 0% fee + Auto-Downshift","payg_x402":"Pay-As-You-Go / x402 & $1.00 Auto-Top-Up (+2,000,000 X-Tokens at 95% usage) — $0.50/1M reqs + 0.005% micro-fee"},"paths":{"/api/health":{"get":{"operationId":"getHealth","summary":"Get live system health, deterministic Create2FeeSplitter contract address, supported assets (USDC, XRP/cbXRP, RLUSD, ETH, USDT, EURC, cbBTC, DAI, Apple Pay/Google Pay/Card), and fee schedule","responses":{"200":{"description":"Healthy status payload"}}}},"/api/pricing":{"get":{"operationId":"getPricing","summary":"Get full pricing tiers ($0/mo Starter (5¢ per $1,000 Micro-Fee), $5/mo Indie Tier (True 0% Fee), $15/mo Pro Tier (True 0% Fee), $49/mo Scale Tier (True 0% Fee), $1 Auto-Top-Up = +2M X-Tokens) and contract details","responses":{"200":{"description":"Pricing catalog JSON"}}}},"/api/keys/free":{"post":{"operationId":"mintFreeApiKey","summary":"Mint an instant $0/mo Starter (5¢ per $1,000 Micro-Fee) API key (250,000 free API requests/mo + 0.005% / 5¢ per $1,000 payment micro-fee, optional $1.00 Auto-Top-Up)","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","default":"ai-agent"},"email":{"type":"string"},"autoTopUpEnabled":{"type":"boolean","default":true}}}}}},"responses":{"201":{"description":"Minted API key and deterministic deposit invoice"}}}},"/v1/checkout/sessions":{"post":{"operationId":"createCheckoutSession","summary":"Create a non-custodial multi-crypto & Card/Apple Pay/Google Pay checkout session","responses":{"200":{"description":"Created checkout session with /pay URL and deterministic Create2 invoice address"}}}},"/api/xrpl/verify":{"post":{"operationId":"verifyXrplPayment","summary":"Verify Native XRPL, cbXRP, or RLUSD settlement ($0 wallet reserve lockup) and dispatch signed webhook + email receipt","responses":{"200":{"description":"Verified XRPL/RLUSD payment"}}}},"/api/checkout/verify":{"post":{"operationId":"verifyCheckoutPayment","summary":"Verify non-custodial checkout payment across USDC, XRP (XRPL & cbXRP), RLUSD, ETH, USDT, EURC, cbBTC, DAI, or Apple Pay/Google Pay/Card onramps, dispatch HMAC-SHA256 signed webhook, and send email receipt","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["free","indie_5","pro_15","scale_49","payg_x402"]},"asset":{"type":"string","enum":["USDC","XRP","cbXRP","RLUSD","ETH","USDT","EURC","cbBTC","DAI","CARD","APPLE_PAY","GOOGLE_PAY"],"default":"USDC","description":"Settlement asset or non-custodial onramp rail (USDC, XRP / cbXRP, RLUSD, ETH, USDT, EURC, cbBTC, DAI, Apple Pay, Google Pay, Card)"},"amountUsdc":{"type":"string","example":"5.00"},"txHash":{"type":"string"},"payerAddress":{"type":"string"},"receiptEmail":{"type":"string"},"webhookUrl":{"type":"string"}}}}}},"responses":{"200":{"description":"Verified payment with X-Unfee-Signature, webhookDelivery, and emailReceipt"}}}},"/api/x402/settle":{"post":{"operationId":"settleX402Authorization","summary":"Settle gasless EIP-3009 transferWithAuthorization Base USDC payment and mint/credit API key","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","description":"Atomic USDC units (6 decimals), e.g. 5000000 for $5.00"},"plan":{"type":"string","default":"indie_5"},"receiptEmail":{"type":"string"},"webhookUrl":{"type":"string"}}}}}},"responses":{"200":{"description":"Settled EIP-3009 authorization with signed webhook and email receipt"}}}},"/api/billing/auto-topup":{"post":{"operationId":"configureOrTriggerAutoTopUp","summary":"Enable or trigger $1.00 Automatic Top-Up (+2,000,000 X-Tokens when usage reaches 95%)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"string"},"enabled":{"type":"boolean","default":true},"simulateTrigger":{"type":"boolean","default":false},"receiptEmail":{"type":"string"},"webhookUrl":{"type":"string"}}}}}},"responses":{"200":{"description":"Updated Auto-Top-Up state and optional topup.completed receipt"}}}},"/api/webhooks/register":{"post":{"operationId":"registerWebhook","summary":"Register a webhook endpoint and receipt email, returning an HMAC-SHA256 signing secret (whsec_unfee_...)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"webhookUrl":{"type":"string"},"receiptEmail":{"type":"string"},"events":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"201":{"description":"Registered webhook subscription with HMAC-SHA256 signingSecret"}}}},"/api/webhooks/test":{"post":{"operationId":"testWebhookAndEmailReceipt","summary":"Dispatch a signed test webhook (payment.settled or topup.completed) with X-Unfee-Signature and email receipt","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"event":{"type":"string","enum":["payment.settled","topup.completed"]},"amountUsdc":{"type":"string","default":"25.00"},"plan":{"type":"string","default":"indie_5"},"receiptEmail":{"type":"string"},"webhookUrl":{"type":"string"}}}}}},"responses":{"200":{"description":"Signed webhook delivery receipt and formatted HTML/text email receipt"}}}},"/rpc/base":{"post":{"operationId":"proxyBaseRpc","summary":"Base Mainnet (Chain ID 8453) JSON-RPC proxy at POST https://api.unfee.xyz/rpc/base metered flat at 1 Request = 1 Credit","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","default":"2.0"},"id":{"type":"integer","default":1},"method":{"type":"string","default":"eth_blockNumber"},"params":{"type":"array","items":{}}}}}}},"responses":{"200":{"description":"Base Mainnet JSON-RPC response with X-Request-Credit-Cost: 1"}}}},"/rpc/eth":{"post":{"operationId":"proxyEthRpc","summary":"Ethereum Mainnet (Chain ID 1) JSON-RPC proxy at POST https://api.unfee.xyz/rpc/eth metered flat at 1 Request = 1 Credit","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","default":"2.0"},"id":{"type":"integer","default":1},"method":{"type":"string","default":"eth_blockNumber"},"params":{"type":"array","items":{}}}}}}},"responses":{"200":{"description":"Ethereum Mainnet JSON-RPC response with X-Request-Credit-Cost: 1"}}}},"/rpc/xrpl":{"post":{"operationId":"proxyXrplRpc","summary":"Native XRPL JSON-RPC proxy at POST https://api.unfee.xyz/rpc/xrpl (server_info, account_info, tx, ledger_current) metered flat at 1 Request = 1 Credit","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"method":{"type":"string","default":"server_info"},"params":{"type":"array","items":{"type":"object"}}}}}}},"responses":{"200":{"description":"XRPL JSON-RPC response with X-Request-Credit-Cost: 1"}}}},"/api/receipts/email":{"post":{"operationId":"sendEmailReceipt","summary":"Generate and send a transaction completion email receipt with fee comparison and Basescan verification link","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string"},"amountUsdc":{"type":"string","default":"25.00"},"plan":{"type":"string","default":"indie_5"},"txHash":{"type":"string"}}}}}},"responses":{"200":{"description":"Formatted email receipt payload"}}}}}}