Skip to main content

Overview

The x402 protocol enables machine-readable payment requirements using HTTP 402 (Payment Required). Clients can automatically discover pricing, settle payments, and retry requests without custom per-API billing logic.
x402 allows AI agents and automated systems to pay for API access programmatically. See the x402 Protocol concept for details.

Payment Flow

The x402 flow consists of three steps:
  1. Request - Make initial request, receive 402 with payment details
  2. Settle - Pay for the request using the settlement endpoint
  3. Retry - Retry original request with payment proof

Get Protected Quote

A demonstration endpoint that requires payment via x402.

Query Parameters

string
Optional topic for the quote (default: “general”)

Request Headers (For Retry)

string
required
Your API key
string
Payment ID from the 402 response
string
Receipt ID from the settlement response

Response (402 Payment Required)

When payment is required, you receive a 402 status with payment details:
string
Error code: “payment_required”
string
Human-readable message
object
x402 protocol details

Response (200 Success)

After successful payment settlement:
object
Response data
object
Payment details

Settle Payment

Settle a payment for an x402 transaction by deducting credits from your account balance.

Request Body

string
required
Payment ID from the 402 response
  • Minimum length: 6 characters
  • Format: x402tx_[random_string]

Response

string
Unique receipt identifier (use as payment proof)
string
The payment ID that was settled
string
Payment status (“settled”)
number
Amount deducted in cents
string
ISO 8601 timestamp of settlement

Error Responses

Insufficient Balance (402)

Payment Not Found (404)

If a payment is already settled, calling settle again returns the existing receipt details.

MCP Server (Model Context Protocol)

ActumX provides an MCP server that exposes agent wallet functionality through the Model Context Protocol.

MCP Endpoints

  • GET /mcp - Handle MCP discovery and initialize
  • POST /mcp - Handle MCP JSON-RPC requests

Initialize

Response

List Tools

Response

Call Tool

Response

JSON-RPC Error Codes

Pricing

Current x402 endpoint pricing:
  • /v1/protected/quote: 25 cents per request
Payments are deducted from your account balance. Top up via the billing endpoint or dashboard.

Error Codes

Payment IDs expire 10 minutes after creation. If expired, make a new request to get a fresh payment ID.