Ecosystem
x402 Protocol
A new global standard for machine-to-machine payments. Enabling AI agents to access DeFi services seamlessly.
Overview
x402 is an open payment protocol that extends the HTTP 402 "Payment Required" status code to enable seamless micropayments on the web. Created by Coinbase, x402 is designed to power the next generation of machine-to-machine payments.memento is one of the first platforms to integrate x402, positioning us at the forefront of the AI-powered DeFi revolution.
x402 Standard
Learn more at x402.org
Why x402?
The next million DeFi users will not be humans. They will be AI agents. These agents need a way to pay for services programmatically without human intervention.
AI-Native Payments
AI agents can access paid services without human intervention or API keys.
HTTP Standard
Built on the existing HTTP 402 status code, making integration straightforward.
Instant Settlement
Payments settle on-chain in seconds, enabling real-time access to services.
Privacy Preserving
No accounts or API keys required. Pay and access with just a wallet.
How It Works
Request Protected Resource
An AI agent or user requests access to a protected resource (like the Yield Aggregator or Alpha reports).
Receive 402 Response
The server responds with HTTP 402 "Payment Required" and includes payment details: amount, token, and recipient address.
Sign Payment
The client signs a payment transaction with their wallet. For AI agents, this happens automatically.
Submit with Payment Header
The request is resubmitted with the payment signature in the PAYMENT-SIGNATURE header.
Access Granted
The server verifies the payment and grants access to the protected resource.
memento x402 Server
memento operates an x402 server that handles payments for our premium services:
| Service | Price | Access Duration |
|---|---|---|
| Yield Aggregator | $5 USDC | 24 hours |
| memento Alphas | $50 USDC | Per report (permanent) |
x402 Server URL
https://x402.memento.moneyFor Developers
If you are building an AI agent that needs to access memento services, you can integrate using the official x402 SDK. The protocol is open-source and maintained by Coinbase.
import { wrapFetchWithPayment } from 'x402-fetch';
// Wrap fetch with x402 payment capabilities
const x402Fetch = wrapFetchWithPayment(fetch, wallet);
// Access protected resource
const response = await x402Fetch(
'https://x402.memento.money/aggregator',
{ method: 'GET' }
);
// Client automatically handles 402 responses
// and submits payment if needed
const data = await response.json();Official x402 Resources
Protocol Details
Technical specifications for the x402 v2 protocol:
| Feature | Specification |
|---|---|
| Network Format | CAIP-2 (solana:chainId) |
| Payment Header | PAYMENT-SIGNATURE |
| Supported Tokens | USDC on Solana |
| Settlement | Instant on-chain |
Benefits for AI Agents
No API Keys
AI agents do not need to manage API keys or accounts. They simply pay per request using their wallet.
Autonomous Operation
Agents can access services 24/7 without human intervention, enabling truly autonomous DeFi strategies.
Composable Payments
Payments can be composed with other on-chain actions, enabling complex multi-step operations.
x402 Scan
Track memento x402 payments and server statistics on x402scan:
Open Standard