How to Access 30-Country Economic Data with AI Agents (Using XRP Micropayments)

Published: October 4, 2026 — Author: xrplme.online Team
AI agents need access to real-world data. But how do they pay for it autonomously, without human intervention? xrplme.online provides the answer: x402 protocol on the XRP Ledger. We've built an MCP (Model Context Protocol) server that gives AI agents instant access to economic data from 30 countries — tourism statistics, macroeconomic indicators, and AI-parsed insights — all accessible via micropayments as small as 1 XRP.

What is x402?

x402 is a payment protocol for AI agents, built on the XRP Ledger. It enables:

Think of it as “HTTP 402 Payment Required” but for AI agents.

What Data is Available?

Countries (30)

Asia-Pacific: Thailand, Vietnam, Japan, Singapore, Indonesia, Malaysia, Philippines, Australia, New Zealand, Taiwan, Hong Kong, Macau, Brunei, Laos, Myanmar, Timor-Leste, Papua New Guinea

Europe: Germany, France, Italy, UK, Netherlands

Americas: USA, Canada, Mexico, Brazil

Middle East: UAE

Data types

How It Works (Architecture)

AI Agent → xrplme.online MCP Server → x402 Payment → Data Response
  1. Agent sends request to https://api.xrplme.online/mcp
  2. Server responds with payment required (HTTP 402)
  3. Agent pays via XRPL transaction (1-5 XRP)
  4. Server verifies payment on-chain
  5. Data delivered in JSON format

Quick Start: Python Example

import httpx
import xrpl

# 1. Initialize MCP client
async with httpx.AsyncClient() as client:
    # 2. Send initialize request
    response = await client.post(
        "https://api.xrplme.online/mcp",
        json={
            "jsonrpc": "2.0",
            "id": 1,
            "method": "initialize",
            "params": {
                "protocolVersion": "2024-11-05",
                "capabilities": {},
                "clientInfo": {"name": "my-agent", "version": "1.0"}
            }
        }
    )

    # 3. Check for payment required
    if response.status_code == 402:
        payment_info = response.json()
        print(f"Pay {payment_info['amount']} XRP to {payment_info['payTo']}")

        # 4. Execute XRP payment
        # ... payment logic here ...

        # 5. Retry with payment headers
        response = await client.post(
            "https://api.xrplme.online/mcp",
            headers={
                "X-Payment-Signature": signature,
                "X-Inv-Id": invoice_id
            },
            json={...}
        )

        # 6. Get data!
        data = response.json()

Pricing

Data TypeCost (XRP)Cost (USD)
Country listFREE$0
Status checkFREE$0
Tourism data1 XRP~0.06
AI-parsed insights5 XRP~0.15

Example: A full analysis of Thailand's tourism sector costs 5 XRP (~15 cents)).

Why x402 for AI Agents?

  1. No API keys to manage — Payments are self-authenticating
  2. Global access — Any AI agent with XRP can pay
  3. Programmable — Smart contracts can automate payments
  4. Transparent — All payments visible on-chain
  5. Instant — No waiting for credit card approvals

MCP vs REST API

We support both:

MCP (recommended for AI agents)

curl -X POST https://api.xrplme.online/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize"}'

REST API (for traditional apps)

curl https://api.xrplme.online/api/v1/thailand/bot \
  -H 'Content-Type: application/json' \
  -d '{"message":"Get tourism data"}'

Getting Started

  1. Test endpoint: https://api.xrplme.online/mcp
  2. Get XRP wallet for your agent
  3. Start with free endpoints (country list, status)
  4. Add payment logic for paid data
  5. Scale — 30 countries available instantly

Resources


About xrplme.online

We're building the infrastructure for AI agents to access real-world data autonomously. Our mission: make economic data from 30+ countries accessible to any AI agent with an XRP wallet.

Questions? Reach out via the contact form on xrplme.online.