402
InvoiceSweep x402 ร— Swap.io
Autonomous Solana Treasury & Freelancer Use Case

Auto-Settle Fragmented SPL Invoices into USDC with Swap.io x402

Solana freelancers, audit collectives, and micro-DAOs get paid 5โ€“10 times a month in volatile ecosystem tokens (SOL, JUP, BONK, PYTH). InvoiceSweep x402 watches the receiving wallet and converts non-USDC invoices on arrival via hermes.swap.io โ€” paying fractions of a cent per call via HTTP 402 instead of burning $99/mo on idle DEX API subscriptions.

0 Keys
No .env secrets, no signup, no credit card
$0.016/mo
8 invoice swaps at $0.002/swap floor
99.98%
Cheaper than $99/mo SaaS API plan

Subscriptions Punish Low-Frequency Agents

A self-hosted bookkeeping agent only wakes up when an invoice lands on-chain. Traditional aggregator APIs force teams to choose between throttled public endpoints or $99/mo recurring plans with leaked API_KEY risk.

  • โœ… Pay Only on Non-USDC Receipt: Already-USDC invoices cost $0.000000.
  • โœ… Gasless API Settlement: Hermes facilitator feePayer covers Solana tx fees โ€” agent only holds USDC.
  • โœ… Cryptographic Receipt: Every paid 200 OK carries base64 X-PAYMENT-RESPONSE proof.
  • โœ… Zero Charge on Errors: Upstream 4xx/5xx or dry-run probes never settle payment.
Endpoint: https://hermes.swap.io/v1/swap/quote

Watch: How InvoiceSweep Settles Multi-SPL Invoices via Swap.io x402

Asset: swapio_x402_superteam_1080p.mp4 (1920ร—1080 ยท 84s ยท 10,628,080 bytes) SHA-256: c035e731cca6ce58208911f5a4278f43e932a8f87a3d9a6a359608206808ba19

Incoming Freelancer & Micro-DAO Multi-SPL Invoice Queue

Invoice ID Client / Bounty Source Received Asset Best Routhex Venue Net Settled USDC x402 API Cost Status Action

Live hermes.swap.io/v1/swap/quote HTTP 402 Payload Inspector


          
SHA-256 (raw 906-byte body): 23ddcdeb7906e298647af7b863d24c969c505ea6105848533daa5e8d06d09d14
maxAmountRequired: "3007" (6-dec Atomic USDC)
Exact parameter-aware quote price: $0.003007 USDC ("1000" = $0.001 unit). Verified against agent Decimal safety cap before signing.
extra.feePayer: "2wKupLR9...HDBg4"
Facilitator sponsors Solana network gas for the x402 payment itself โ€” the AI agent's API wallet needs only USDC, zero SOL.
payTo: "BPz2u6eo...EibMfD" & asset: "EPjFWdd5...TDt1v"
Deterministic recipient and canonical Solana USDC SPL mint enforced via scheme: "exact" within a 60-second window.
accepts[0..1]: Dual Solana + Base x402 Support
Hermes advertises both Solana SPL USDC and Base EIP-3009 USDC in a single HTTP 402 challenge so cross-chain agents can pay from either rail.

Step-by-Step: 402 โ†’ USDC Micro-Pay โ†’ Ranked Quote โ†’ Build TX โ†’ X-PAYMENT-RESPONSE

STEP 01
Unpaid Quote Probe โ†’ 402
STEP 02
x402 USDC Sign & Retry
STEP 03
Ranked Quotes + Receipt
STEP 04
POST /v1/swap/build-tx
STEP 05
Verify Receipt & Settle

        

Swap.io x402 Pay-Per-Call vs. Traditional SaaS Aggregator Subscriptions

8 swaps/mo
1 (Solo Freelancer) 25 (Audit Guild) 150 (Active DAO) 500/mo
Swap.io x402 (Quote + Build-TX) $0.016000 / mo
Standard Pro DEX API Key Plan $99.00 / mo
99.98% Saved
Monthly Savings: $98.984000 USDC ($1,187.81 / year)
Break-even threshold: You would need 49,500 swaps every month before a $99/mo subscription beats Swap.io x402.