/.well-known/xrplme.json — the country list,
current pricing, and the endpoint shape for each country./wc/v1/thailand/bot) and receives
HTTP 402 Payment Required with the payment terms.This is designed for agents. Payment is programmatic. Two tiers: a standard query is 0.1 XRP, an AI-enhanced query is 0.5 XRP. Everything settles in XRP on XRPL mainnet.
A paid route answers with HTTP 402 and the payment terms when no payment is attached:
curl -sS https://xrplme.online/wc/v1/thailand/bot
Abbreviated 402 body — the fields an agent needs are payTo, amount,
extra.sourceTag, and the optional qrData helper string:
{
"x402Version": 2,
"accepts": [{
"scheme": "exact",
"network": "xrpl:0",
"amount": "100000",
"asset": "XRP",
"payTo": "razjTyzT6gBVH86iduU8HuEiZ2YUorNQj8",
"maxTimeoutSeconds": 600,
"extra": { "sourceTag": 804681468, "invoiceId": "..." },
"qrData": "xrpl:razjTyzT6gBVH86iduU8HuEiZ2YUorNQj8?dt=804681468&amount=0.1"
}],
"error": "PAYMENT-SIGNATURE header is required"
}
Short Python example. The payment step is where the agent signs an XRPL payment to
payTo for amount drops with SourceTag = extra.sourceTag,
then retries with a PAYMENT-SIGNATURE header:
import requests
url = "https://xrplme.online/wc/v1/thailand/bot"
r = requests.get(url)
if r.status_code == 402:
terms = r.json()["accepts"][0]
amount = int(terms["amount"]) # drops (100000 = 0.1 XRP)
pay_to = terms["payTo"]
tag = terms["extra"]["sourceTag"]
invoice = terms["extra"]["invoiceId"]
# Payment step (programmatic): build an XRPL Payment from the paying wallet to
# pay_to for `amount` drops, with SourceTag = tag; sign and submit it.
# signed_blob = build_and_sign_payment(pay_to, amount, tag)
# The signature envelope binds the invoiceId issued in this 402.
headers = {"PAYMENT-SIGNATURE": make_signature(signed_blob, invoice)}
r2 = requests.get(url, headers=headers)
print(r2.status_code, r2.json()) # 200 + the country data
Free endpoints (health, discovery, the manifest, and the free MCP tools) need no payment and never return 402.
If you want to test a single query manually, you can scan a QR code with your XRPL wallet. This is optional — your agent will pay programmatically using the same payment details. This panel is for manual testing only.
qrData.