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

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

01

Request Protected Resource

An AI agent or user requests access to a protected resource (like the Yield Aggregator or Alpha reports).

02

Receive 402 Response

The server responds with HTTP 402 "Payment Required" and includes payment details: amount, token, and recipient address.

03

Sign Payment

The client signs a payment transaction with their wallet. For AI agents, this happens automatically.

04

Submit with Payment Header

The request is resubmitted with the payment signature in the PAYMENT-SIGNATURE header.

05

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:

ServicePriceAccess Duration
Yield Aggregator$5 USDC24 hours
memento Alphas$50 USDCPer report (permanent)

x402 Server URL

https://x402.memento.money

For 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.

x402-client-example.tstypescript
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

x402 is an open protocol created by Coinbase. Visit x402.org for official documentation and SDKs.

Protocol Details

Technical specifications for the x402 v2 protocol:

FeatureSpecification
Network FormatCAIP-2 (solana:chainId)
Payment HeaderPAYMENT-SIGNATURE
Supported TokensUSDC on Solana
SettlementInstant 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

x402 is an open protocol created by Coinbase. Anyone can implement x402 servers or clients. We believe in building on open infrastructure for the AI-powered future of DeFi.

Next Steps