Overview
Aether MCP provides 2 payment tools for x402 payments:- payment_create: Create a signed payment header
- payment_execute: Verify and settle a payment in one call
What is x402?
x402 is the HTTP 402 Payment Required standard for machine-to-machine payments. It enables:- Micropayments: Pay for API calls, data, services
- Cryptographic Proof: Payments are signed and verifiable
- Instant Settlement: On-chain settlement in seconds
- Agent-Friendly: Perfect for AI-to-AI commerce
Payment Tools
payment_create
Create a signed x402 payment header for USDC or ATHR transfer. Parameters:| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
to | string | Yes | - | Recipient wallet address |
amount | number | Yes | - | Amount to pay (must be positive) |
token | string | No | usdc | Token to use: usdc or athr |
validFor | number | No | 3600 | Payment validity in seconds (60-86400) |
paymentHeader: Base64-encoded x402 payment (send this to the seller)- Payment details (from, to, amount, nonce, expiration)
payment_execute
Verify and settle an x402 payment in one call. Parameters:| Parameter | Type | Required | Description |
|---|---|---|---|
paymentHeader | string | Yes | Base64-encoded x402 payment header |
requirements | object | Yes | Payment requirements to verify against |
| Field | Type | Required | Description |
|---|---|---|---|
network | string | Yes | Network ID (e.g., solana-devnet) |
maxAmountRequired | string | Yes | Maximum amount in micro units (e.g., "10500000" for 10.5 USDC) |
payTo | string | Yes | Expected recipient address |
asset | string | Yes | Token mint address |
scheme | string | No | Payment scheme (default: exact) |
resource | string | No | Resource identifier |
description | string | No | Payment description |
Payment Flow
The x402 flow is simplified to two steps:Use Cases
API Micropayments
API Micropayments
AI Agent Purchasing Data
AI Agent Purchasing Data
Token Support
| Token | Mint Address (Devnet) | Decimals | Fees |
|---|---|---|---|
| USDC | 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU | 6 | Standard |
| ATHR | Aether native token | 6 | Lower |
| Token | Mint Address (Mainnet) | Decimals | Fees |
|---|---|---|---|
| USDC | EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v | 6 | Standard |
| ATHR | Aether native token | 6 | Lower |
Security
Payment Validation
Before settlement, the server validates:- Signature is valid (Ed25519)
- Payment amount matches requirements
- Recipient address is correct
- Token mint address is correct
- Payment hasn’t expired (
validBefore) - Nonce hasn’t been used (replay protection)
- Network matches (devnet/mainnet)
Troubleshooting
Insufficient Balance
Insufficient Balance
Solution:
- Fund your wallet with more USDC/ATHR
- On devnet: Use
wallet_createwithairdropSolfor SOL gas
Payment Expired
Payment Expired
Solution:
- Create a new payment with
payment_create - Use longer
validForparameter (max 24 hours)
Invalid Payment Header
Invalid Payment Header
Solution:
- Ensure header is base64-encoded correctly
- Don’t modify the header after creation
- Check for truncation in HTTP headers
Nonce Already Used
Nonce Already Used
Solution:
- Create a new payment (each payment has unique nonce)
- Don’t attempt to settle same payment twice
