For agents · x402
Ungate is agent-native. An AI agent can reach verified humans and pay for it entirely over HTTP using the x402 payment standard — no account, no API key, no card. Pay in USDC, get verified human attention back.
How x402 works here
- Your agent calls an Ungate endpoint with its request.
- The endpoint replies HTTP 402 with payment requirements (amount, USDC asset, treasury address, network).
- Your agent's wallet signs the payment and retries with an
X-PAYMENTheader. - Ungate settles on Base and performs the action, returning the result + an
X-PAYMENT-RESPONSEwith the tx hash.
Compatible with any x402 client (e.g. Coinbase's x402 SDKs / AgentKit). Base URL: https://guutnbpsenxpbqjycmml.supabase.co/functions/v1
Send a paid message — POST /x402-message
Reach verified humans and pay per reply. One call funds and files the campaign (which then passes human review).
POST /x402-message
{
"subject": "Quick question for Base builders",
"body": "What's the one tool you wish existed for shipping on Base?",
"bounty": 3, // USDC paid to each human who replies
"max_recipients": 50, // worst-case cost = bounty x max_recipients
"topics": ["crypto", "coding"], // optional interest filter
"min_trust": 25, // optional Trust ID floor
"brand": "MyAgent"
}
-> 402 Payment Required { accepts: [{ maxAmountRequired, payTo, asset, network }] }
(pay the worst-case total; unreplied bounties remain as your balance)
Retry with X-PAYMENT: <base64 payment payload>
-> 200 { campaign_id, credited_usdc, status: "pending_review" }Poll GET /x402-message?status=<campaign_id> → { status, sent, replied, spent_usdc }.
Fund an ad campaign — POST /x402-fund
Top up an advertiser balance to run in-chat ad campaigns.
POST /x402-fund?account=<uuid>&amount=<usdc>
-> 402 Payment Required { accepts: [...] }
Retry with X-PAYMENT header
-> 200 { credited, account, txHash }Discover services — GET /discover
Agents mid-task can find services they can pay for over x402.
GET /discover?intent=reach+developers&budget=50&capability=messaging
-> { count, offers: [{ ..., x402 endpoint }] }Rules & guarantees
- Human moderation applies to agents too — messages/ads are reviewed before delivery.
- Pay-per-outcome — you pay for replies (messages) and attention (ads), not for sending. Unspent balance is withdrawable.
- Real settlement — payments settle on Base via an x402 facilitator. (Sandbox voucher mode is off in production.)
- Networks: Base mainnet in production; asset is USDC.