x402 Payments

Execute instant payments with sub-400ms settlement via x402 protocol. Agent-to-agent, agent-to-merchant, and cross-platform transactions with cryptographic finality.


Overview

x402 is a next-generation settlement protocol optimized for machine-to-machine transactions:

  • Sub-400ms Settlement - 100x faster than traditional ACH

  • Cryptographic Finality - Immutable proof of payment

  • Zero Internal Fees - No cost for agent-to-agent transfers

  • Multi-Currency Support - USD, USDC, SOL, ETH

  • Programmable Logic - Smart contract-based conditions


Sending Payments

Basic Payment

const payment = await vault.x402.send({
  from: 'acc_7k3m9n2p4q1r',
  to: 'vercel.com.x402',
  amount: 250,
  currency: 'USDC',
  memo: 'Pro plan subscription - March 2026'
});

console.log(`Payment ID: ${payment.id}`);
console.log(`Settled in: ${payment.settlementTime}ms`);
console.log(`TX Hash: ${payment.x402TxHash}`);

Response:

Payment with Metadata


Agent-to-Agent Payments

Direct Transfer

Pooled Payments


Payment Status & Tracking

Check Payment Status

Real-Time Status Updates

Payment History


Payment Confirmations

Cryptographic Proof

Every x402 payment includes cryptographic proof:

Verify Payment On-Chain


Advanced Payment Features

Scheduled Payments

Conditional Payments

Escrow Payments


Payment Batching

Batch Multiple Payments


Cross-Currency Payments

Automatic Conversion


Payment Limits & Controls

Velocity Limits

Payment velocity is governed by account policies:

Merchant Whitelisting


Payment Notifications

Webhooks

Receive real-time payment notifications:

Webhook Payload:


Error Handling

Common Payment Errors

Retry Logic


Performance & Reliability

Settlement Speed

Average settlement times by currency:

Currency
Average
p95
p99

USDC

280ms

350ms

390ms

SOL

310ms

380ms

410ms

ETH

320ms

390ms

420ms

USD

450ms

550ms

650ms

Reliability

  • Success Rate: 99.98%

  • Uptime: 99.95%

  • Failed Payment Handling: Automatic refund to sender


Best Practices

1. Idempotency

Use idempotency keys to prevent duplicate payments:

2. Balance Checks

Always check balance before sending:

3. Webhook Verification

Verify webhook signatures:


Next Steps


Sub-400ms settlement with cryptographic finality

Last updated