Skip to main content
Coinbase Agentic Wallet gives AI agents a managed wallet they can use to pay x402 APIs without you building wallet infrastructure from scratch. Meterlane’s public sandbox demo route is a ready-made target you can use to validate the buyer side of your integration — no account or signup required to test.
All examples on this page target Base Sepolia (eip155:84532). The public x402.org facilitator does not support Base mainnet. Use sandbox keys and test USDC only.

Public sandbox demo URL

https://gateway.meterlane.app/gateway/demo/demo
An unpaid request returns HTTP 402 with an X-Payment-Requirements header. A funded agent wallet receives HTTP 200 and the response body from the upstream demo API. Confirm the route is live before testing your wallet integration:
curl -i https://gateway.meterlane.app/gateway/demo/demo

Option A — awal CLI

The awal CLI is the fastest way to pay a Meterlane route from a terminal or an agent workflow that calls shell commands.
1

Add Agentic Wallet skills

Run this once to install the Coinbase Agentic Wallet skill set:
npx skills add coinbase/agentic-wallet-skills
2

Sign in and fund your wallet

Open the Agentic Wallet UI after sign-in and deposit test USDC on Base Sepolia via Coinbase Onramp or the Circle faucet at faucet.circle.com.Set spending limits in the wallet UI before running any autonomous agent loops.
3

Inspect payment requirements (no charge)

Check the price and payment details for the demo route without spending any USDC:
npx awal@latest x402 details https://gateway.meterlane.app/gateway/demo/demo
4

Pay and fetch the route

Execute the paid request:
npx awal@latest x402 pay https://gateway.meterlane.app/gateway/demo/demo
A successful payment prints the 200 response body to stdout.

Option B — payments-mcp (AI assistants)

@coinbase/payments-mcp runs a local MCP server that exposes a make_x402_request tool. Any MCP-compatible AI assistant — Claude Desktop, Claude Code, Codex, Gemini CLI, and others — can call it to pay x402 routes without custom code.
1

Start the MCP server

npx @coinbase/payments-mcp
2

Add it to your MCP client config

For Claude Desktop, add the following to your claude_desktop_config.json:
{
  "mcpServers": {
    "coinbase-payments": {
      "command": "npx",
      "args": ["-y", "@coinbase/payments-mcp"]
    }
  }
}
Restart the client after editing the config.
3

Sign in and fund your wallet

Complete the wallet sign-in flow that appears after restart, then deposit test USDC on Base Sepolia.
4

Ask your assistant to pay the demo route

Prompt your assistant naturally:
Pay for this x402 API and return the response body:
GET https://gateway.meterlane.app/gateway/demo/demo
The MCP make_x402_request tool handles 402 → pay → retry automatically and returns the 200 body to the assistant.

Option C — @meterlane/x402 createAgentClient (scripted / CI)

If you are writing TypeScript or running automated tests, use createAgentClient from @meterlane/x402/client directly. This gives you full programmatic control and is the right choice for CI pipelines and custom agent frameworks.
Never commit private keys to version control. Load them from environment variables and use a dedicated hot wallet with a limited USDC balance.
import type { Hex } from "viem";
import { createAgentClient } from "@meterlane/x402/client";

const privateKey = process.env.AGENT_PRIVATE_KEY as Hex;
const paidFetch = createAgentClient(privateKey, "eip155:84532");

const res = await paidFetch(
  "https://gateway.meterlane.app/gateway/demo/demo",
  { method: "GET" }
);

console.log(res.status);       // 200 after successful payment
console.log(await res.text()); // upstream response body
See the SDK reference for full createAgentClient documentation, including the onSettled callback and network options.

Choosing the right tool

ToolBest forRequires code?
npx awal@latest x402 payTerminal commands, agent skills workflowsNo
npx @coinbase/payments-mcpClaude Desktop, Claude Code, Codex, Gemini CLINo
createAgentClient from @meterlane/x402/clientTypeScript apps, CI pipelines, custom agent frameworksYes
All three options use the same x402 payment protocol and settle on Base Sepolia for sandbox demos. For production routes on Base mainnet, configure a private mainnet-capable facilitator in your Meterlane dashboard under Settings → Developer.

SDK Reference

Full createAgentClient and createCKMiddleware API docs

LangChain Integration

Wrap a gateway route as a DynamicStructuredTool