Ampersend + Escroue
Managed agent payments via x402. Budget-capped smart accounts, human oversight dashboard, and seamless MCP tool payments — all on Base.
What is Ampersend?
Agent payment management platform by Edge & Node — the team behind The Graph protocol.
Ampersend solves a critical problem: how do you give autonomous agents the ability to spend money without losing control?
It provides smart account wallets (ERC-4337) for each agent, a Treasurer that enforces spend limits before every payment, and a human operator dashboard for monitoring and control.
Under the hood, it uses the x402 protocol (HTTP 402 payments) — the same protocol already integrated into Escroue. Ampersend wraps x402 with managed wallets and treasury controls, making it production-ready for agent commerce.
How It Works
The payment flow from buyer agent to seller agent, with Treasurer oversight at every step.
Buyer gets an EOA or ERC-4337 Smart Account wallet via Ampersend SDK. The wallet holds USDC and is controlled by a session key.
A Treasurer authorizes every payment before it happens. Enforces daily, monthly, and per-transaction limits. Human operators set these via the Ampersend dashboard.
Seller agents expose their capabilities as MCP tools with x402 payment requirements. Each tool call costs a set amount of USDC.
When the buyer calls a paid tool, the SDK handles the full 402 flow: receive requirements → treasurer approves → sign payment → retry with payment header.
Payments are verified and settled through the x402 facilitator. The seller receives USDC, and the transaction is recorded on-chain on Base.
Integration with Escroue
How Ampersend enhances our existing payment infrastructure.
SDK Components
Click any component to see usage code. These are the building blocks for agent payments.
EOA wallet from private key. Creates x402 payment payloads with EIP-3009 signatures.
ERC-4337 smart account wallet. Uses session keys for signing. Deployed via Ampersend platform.
Auto-approves all payments. Good for testing and demos.
Production treasurer with spend limits. Consults Ampersend API before every payment.
Auto-paying MCP client. Handles 402 responses transparently — buyer just calls tools.
MCP server with x402 payment gating. Seller defines price per tool, middleware handles verification.
Wraps fetch() to auto-pay on 402 responses. Works with any x402-enabled HTTP endpoint.
Quick Start
Get up and running with Ampersend in Escroue.
Payment Flow
How x402 payments work between buyer and seller agents via Ampersend.
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Buyer Agent │ │ Treasurer │ │ Seller Agent │
│ (MCP Client)│ │ (Ampersend) │ │ (MCP Server) │
└──────┬───────┘ └──────┬───────┘ └──────┬───────┘
│ │ │
│ callTool("summarize", {text}) │
│───────────────────────────────────────>│
│ │ │
│ │ 402 + payment │
│<──────────────────────────────────────│
│ │ requirements │
│ │ │
│ authorize? │ │
│──────────────────>│ │
│ │ │
│ ✅ authorized │ │
│<──────────────────│ │
│ (within limits) │ │
│ │ │
│ retry + payment header │
│───────────────────────────────────────>│
│ │ │
│ │ verify via │
│ │ facilitator │
│ │ │
│ 200 + result │
│<──────────────────────────────────────│
│ │ │Hackathon Prize
Built for The Synthesis Hackathon — Escroue x Ampersend