x402 Foundation · XRPL native · Multi-chain gateway

AI Agents Pay for APIs.
XRPL Settles in Seconds.

BitBooth is a production x402 gateway that takes agent payments on four settlement rails. One HTTP 402 answers with eight payment options across Base, XRPL, Stellar, and XRPL EVM, including native XRP, RLUSD, USDC, XLM, and LINK. Sub-cent fees, 3 to 5 second finality on XRPL.

x402 payment flow
3-5s
XRPL Finality
Versioned
Test Evidence
By Request
Implementation Review
4 rails
Base · XRPL · Stellar · XRPL EVM

Four steps. One round-trip.

The x402 protocol turns API access into a simple HTTP exchange. No accounts, no API keys, no billing portals.

STEP 01

Request

Agent sends a standard HTTP request to a paid API endpoint.

STEP 02

Challenge

Server responds HTTP 402 with payment requirements: amount, asset, network.

STEP 03

Pay

Agent transfers USDC or RLUSD on XRPL. Settlement confirmed in 3 to 5 seconds for under a cent.

STEP 04

Access

Server verifies the on-chain payment and returns the requested resource.

See the protocol in action

Pick a chain. The demo settles a real testnet payment (XRPL + Solana) with a real on-chain hash. Then watch replay protection reject a duplicate settlement.

SERVER
AGENT

Built on the x402 V2 Specification

Launched by the x402 Foundation (Coinbase + Linux Foundation) on April 2, 2026. Backed by Stripe, Cloudflare, AWS, Google, and Microsoft.

HTTP/1.1 402 Payment Required
{
  "x402Version": 2,
  "accepts": [
    {
      "scheme": "exact",
      "network": "xrpl:0",                // XRPL mainnet
      "maxAmountRequired": "5000",        // 0.005 USDC (6 decimals)
      "resource": "https://app.heinrichstech.com/v1/cdp/wallet-doctor",
      "description": "Wallet Intelligence - risk & activity analysis",
      "mimeType": "application/json",
      "asset": {
        "currency": "USD",
        "issuer": "rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De"  // Circle XRPL USDC
      },
      "payTo": "<server XRPL r-address>",
      "extra": {
        "alsoAccepted": ["RLUSD", "XRP"],
        "name": "USDC",
        "decimals": 6
      }
    }
  ],
  "error": "X-PAYMENT header is required"
}
PAYMENT-SIGNATURE header (Base64-decoded)
{
  "x402Version": 2,
  "scheme": "exact",
  "network": "xrpl:0",
  "payload": {
    "txHash": "E3FE6EA3D48F0C2BA7AE3D5C9A77F4F8FCD9C9F1A2C3B5D7E8F9A0B1C2D3E4F5A",
    "account": "<agent XRPL r-address>",
    "sequence": 8412905
  },
  "resource": "https://app.heinrichstech.com/v1/cdp/wallet-doctor",
  "accepted": {
    "scheme": "exact",
    "network": "xrpl:0",
    "maxAmountRequired": "5000",
    "asset": { "currency": "USD", "issuer": "rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De" },
    "payTo": "<server XRPL r-address>"
  }
}
PAYMENT-RESPONSE header (Base64-decoded)
{
  "x402Version": 2,
  "scheme": "exact",
  "network": "xrpl:0",
  "success": true,
  "payer": "<agent XRPL r-address>",
  "transaction": "E3FE6EA3D48F0C2BA7AE3D5C9A77F4F8FCD9C9F1A2C3B5D7E8F9A0B1C2D3E4F5A",
  "settlement": {
    "ledgerIndex": 86420915,
    "validated": true,
    "deliveredAmount": { "currency": "USD", "value": "0.005" },
    "feeDrops": "12",
    "closeTime": "3.4s"
  }
}

CAIP-2 Network IDs

Multi-chain by design. Four rails live in production. XRPL mainnet: xrpl:0 · Base, Stellar, and the XRPL EVM Sidechain also wired. Agent picks the rail it already holds.

Base64-Encoded Headers

Payment payloads and settlement proofs are transmitted as Base64-encoded JSON in the PAYMENT-SIGNATURE and PAYMENT-RESPONSE headers.

Zod Validation

Every boundary is validated at runtime with Zod schemas. HTTP inputs, adapter responses, config from environment. External APIs lie.

Production-ready from day one

Spec Compliant

Full x402 V2 implementation. CAIP-2 network identifiers, Base64-encoded headers, exact payment scheme. Compatible with any x402 client or server.

Battle Tested

Automated tests cover settlement behavior, replay protection, nonce and sequence handling, rate limiting, and idempotency. Dated results for the evaluated release are available during technical review.

Public Integration Kit

Public API documentation, the OpenAPI specification, and runnable integration examples are MIT-licensed at github.com/Drock91/bitbooth-docs. The production gateway implementation remains private; source review may be arranged for qualified technical evaluations.