Skip to content

Protocols

Open protocols. No API keys.

Milypay is built on open standards an agent already understands: HTTP 402 to ask for payment, x402 to pay it on Solana, MCP to plug into an assistant, and plain OpenAPI, agents.md and llms.txt to find out what’s on offer. Here is every one we support, how it works, and the spec behind it.

At a glance

ProtocolWhat it does for youStatus
x402 v2Pay per call over HTTP 402 on SolanaLive · default
Solana stablecoinsUSDC, USDT, AUDD, AUDM, dAUD on one challengeLive
MPP (Tempo)Second payment rail, opt-inLive · opt-in
MCPTools for Claude, Cursor and any MCP clientLive · stdio
milypay CLIOne command per datasetLive
milypay-sdkTyped TypeScript clientLive
HTTP 402 + OpenAPI 3.1Any language, any HTTP clientLive
agents.md · llms.txt · well-knownHow agents find usLive
x402 Bazaar extensionDiscovery metadata inside every 402Live

Payment

How agents pay

Default rail

x402 v2 on Solana, via PayAI

Live · default

Every paid endpoint on api.milypay.xyz answers an unpaid request with HTTP 402 and a base64 JSON challenge in the PAYMENT-REQUIRED header. It uses the exact scheme on Solana mainnet (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp) and lists the price, the pay-to address and one entry per accepted stablecoin.

Your wallet signs the transfer and retries with PAYMENT-SIGNATURE (x402 v2). The older v1 X-PAYMENT header is accepted too. Milypay verifies the payment with the PayAI facilitator, serves the data, then settles on-chain and returns the receipt in PAYMENT-RESPONSE and X-Milypay-Tx.

Network fees are sponsored. The challenge’s extra.feePayeris PayAI’s current fee payer, read live from the facilitator’s /supported endpoint, so the agent never needs SOL for gas, only the stablecoin it pays with.

Why it matters for agents

Payment is the authentication. An agent can call a Milypay endpoint it has never seen before, read the price from the 402, pay a fraction of a cent and get the data in the same request. No signup, no key to store or rotate.

Request → 402 → pay → data

# 1. Ask for data with no payment
curl -i https://api.milypay.xyz/au-business/abn/51824753556
 
HTTP/2 402
PAYMENT-REQUIRED: eyJ4NDAyVmVyc2lvbiI6Mi... # base64 JSON
 
# 2. Decoded challenge (one entry per accepted asset)
{
"x402Version": 2,
"accepts": [{
"scheme": "exact",
"network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
"asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount": "2000",
"payTo": "mi1ytDfgNFYgm54y4f3xzRQbfbyCz6TBmQcAL3brozA",
"maxTimeoutSeconds": 60,
"extra": { "feePayer": "CjNFTjvBhbJJd2B5ePPMHRLx1ELZpa8dwQgGL727eKww" }
}, ...]
}
 
# 3. Sign the transfer, retry with the payment
curl https://api.milypay.xyz/au-business/abn/51824753556 \
-H "PAYMENT-SIGNATURE: <base64 payment payload>"
# v1 clients can send X-PAYMENT instead
 
# 4. 200 OK + PAYMENT-RESPONSE, X-Milypay-Tx, X-Milypay-Explorer

Assets

USDC and AUD stablecoins, one challenge

Live

Each 402 offers the same price in five Solana stablecoins: AUDD, AUDM and dAUD for AUD-native settlement, plus USDC and USDT for compatibility with USD x402 wallets. The wallet chooses which one to pay with, and Milypay matches the payment on both asset and network.

Prices are set per call (for example 0.002 for an ABN lookup). Settlement lands on Solana in whichever stablecoin was used.

Why it matters for agents

Agents don't need to hold a particular token. A USD-native agent pays in USDC, an Australian one can pay in AUD and skip the FX round-trip, and both hit the same endpoint at the same listed price.

accepts[] on the live ABN lookup

# Same ABN lookup, same price, five assets on Solana mainnet
USDC EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v amount 2000 (6 dp)
USDT Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB amount 2000 (6 dp)
AUDD AUDDttiEpCydTm7joUMbYddm72jAWXZnCpPZtDoxqBSw amount 2000 (6 dp)
AUDM CiYXBwHPrdNkMtxR8YEWKv78K6bQjFoEWhPQrZqEmubi amount 2000 (6 dp)
dAUD F7FiKutfrMMXd8Zw5ysZsfx5v4aBHffWc4EhRZE8NHiF amount 2000000 (9 dp)
 
# Your wallet picks whichever it holds. Live list:
curl https://milypay.xyz/api/status # payments.solana.assets

Second rail

MPP on Tempo

Live · opt-in

The paid API also speaks the Machine Payments Protocol (MPP). Add ?rail=mpp, send X-Payment-Rail: mpp, or present an Authorization: Payment credential, and you get a WWW-Authenticate: Payment challenge with method="tempo" and intent="charge", payable in pathUSD on Tempo mainnet (eip155:4217).

x402 itself on Tempo is not switched on: it waits until a facilitator settles eip155:4217. Without a rail hint, every request gets the Solana x402 challenge above.

Why it matters for agents

Agents built on the Machine Payments Protocol can pay Milypay without a Solana wallet. Because MPP only switches on when a client asks for it, default x402 agents are never sent somewhere they don't expect.

Opt in with ?rail=mpp

# Ask for the MPP rail explicitly
curl -i 'https://api.milypay.xyz/au-energy/nem?rail=mpp'
# or: -H 'X-Payment-Rail: mpp'
 
HTTP/2 402
WWW-Authenticate: Payment id="...", realm="api.milypay.xyz",
method="tempo", intent="charge", request="eyJhbW91bnQiOi..."
 
# Pay pathUSD on Tempo mainnet (eip155:4217), then retry with
Authorization: Payment <credential>
 
# No rail hint? You get the default Solana x402 challenge.

Integration

How agents call us

Every surface below uses the same rule: the free, throttled demo lives at milypay.xyz/api/*, and the paid x402 API lives at the root of api.milypay.xyz.

Model Context Protocol

MCP server: npx milypay mcp

Live · stdio

The milypay npm package ships a stdio MCP server. Run npx -y milypay mcp from any MCP client. There is no hosted HTTP MCP endpoint; the server runs next to the agent so the wallet key never leaves the machine.

Set MILYPAY_HOST=demo for the free demo, or MILYPAY_HOST=api with MILYPAY_PRIVATE_KEY to call the paid API over x402.

Why it matters for agents

An assistant like Claude or Cursor gets 30+ typed Milypay tools (ABN, ASIC, addresses, ABS, transit, energy, phone and more) without anyone writing glue code. Add a wallet key and the same tools pay for themselves.

MCP client config

// claude_desktop_config.json, .cursor/mcp.json, etc.
{
"mcpServers": {
"milypay": {
"command": "npx",
"args": ["-y", "milypay", "mcp"],
"env": { "MILYPAY_HOST": "demo" }
}
}
}
 
// Paid tools: MILYPAY_HOST=api + MILYPAY_PRIVATE_KEY=<base58>

Command line

milypay CLI

Live

npx milypay covers every dataset: ABN and ASIC, ABS statistics, live transit, NEM electricity prices, phone line checks, Uber quotes, domains and MoneyGram wallet funding. It prints JSON to stdout.

It uses the free demo host by default. Add --api and a Solana key in MILYPAY_PRIVATE_KEY to pay over x402.

Why it matters for agents

Coding agents and shell-based agents already know how to run a command and read JSON. The CLI handles the 402, the signature and the retry, so one line returns paid data.

Terminal

# Free, throttled demo host
npx milypay abn 51824753556
npx milypay cpi
npx milypay nem vic
npx milypay transit seq summary
 
# Paid API: the CLI answers the 402 for you
export MILYPAY_PRIVATE_KEY=<base58 solana secret>
npx milypay --api abn 51824753556
# -> JSON + $receipt.explorerUrl

TypeScript

milypay-sdk

Live

milypay-sdk wraps the same API in typed namespaces such as business, company, address, abs, transit, energy, domains and ramp.

Give it a base58 Solana key and host: "api" and it answers each 402, signs the payment and returns the data with a $receipt.

Why it matters for agents

Agent frameworks written in TypeScript get typed methods and a receipt on every paid response, instead of hand-rolling 402 parsing and Solana transaction signing.

TypeScript

npm i milypay-sdk
 
import { Milypay } from "milypay-sdk";
 
// Free demo host (rate-limited)
const demo = new Milypay({ host: "demo" });
await demo.business.abn("51824753556");
 
// Paid API: signs the x402 payment with your wallet
const au = new Milypay({
host: "api",
privateKey: process.env.MILYPAY_PRIVATE_KEY!,
});
const co = await au.company.acn("000014675");
// co.$receipt -> settlement signature + explorer link

Plain HTTP

HTTP 402 + OpenAPI 3.1

Live

Under the CLI, MCP server and SDK it is plain HTTP. Call any endpoint, read the 402, pay, retry. Errors come back as JSON with a code and a docs link, and rate limits send retry-after.

The whole API is described in an OpenAPI 3.1 document at milypay.xyz/openapi.json.

Why it matters for agents

Nothing proprietary sits between an agent and the data. Any language with an HTTP client and any x402 library can integrate, and tools that import OpenAPI can generate a client in one step.

curl

# Free demo: /api prefix on the apex host
curl https://milypay.xyz/api/au-business/abn/51824753556
 
# Paid: root paths on api.milypay.xyz (402 until paid)
curl -i https://api.milypay.xyz/au-business/abn/51824753556
 
# Full machine-readable surface
curl https://milypay.xyz/openapi.json

Discovery

How agents find us

Machine-readable

agents.md, llms.txt and well-known files

Live

/agents.md is the full agent guide, /llms.txt is the short LLM summary and /llms-full.txt lists every endpoint with example responses.

For machines there is an x402 manifest at /.well-known/x402, an RFC 9727 API catalog at /.well-known/api-catalog, an MCP server card and the OpenAPI document.

Why it matters for agents

An agent can work out what Milypay offers, what it costs and how to pay by reading a few plain files, before it spends anything.

Discovery endpoints

GET https://milypay.xyz/agents.md # agent guide
GET https://milypay.xyz/llms.txt # LLM summary
GET https://milypay.xyz/llms-full.txt # every endpoint
GET https://milypay.xyz/openapi.json # OpenAPI 3.1
GET https://milypay.xyz/.well-known/x402 # x402 manifest
GET https://milypay.xyz/.well-known/api-catalog # RFC 9727
GET https://milypay.xyz/.well-known/mcp/server-card.json
GET https://milypay.xyz/mcp # MCP setup

x402 extension

Bazaar metadata in every 402

Live

Each challenge carries the x402 Bazaar extension (extensions.bazaar) with the endpoint’s input and output schema, plus resource metadata: serviceName, tags and iconUrl.

That is the metadata x402 discovery indexes such as agentic.market read. A milypayFunding extension tells a wallet with no balance how to top up first (MoneyGram funds the wallet; it never settles the 402).

Why it matters for agents

The 402 itself describes the service, so an x402 index or a curious agent can catalogue an endpoint just by calling it, with no separate listing form.

Decoded challenge (excerpt)

// Inside every decoded PAYMENT-REQUIRED challenge
"resource": {
"url": "https://api.milypay.xyz/au-business/abn/51824753556",
"description": "ABN lookup for 51824753556",
"mimeType": "application/json",
"serviceName": "Milypay",
"tags": ["australia", "data", "solana", "agents", "x402"],
"iconUrl": "https://milypay.xyz/icon.png"
},
"extensions": {
"bazaar": { ...input/output schema for the endpoint },
"milypayFunding": { ...how to top up a wallet first }
}

Ecosystem

Part of the agent economy on Solana

Solana.ai is the Solana Foundation’s site for AI on Solana, “Open Infrastructure for Intelligence”. It brings together Solana Confidential Compute, pay.sh, Payment Channels, the Solana Developer Platform and the Solana AI Toolkit (the Solana MCP server, Solana Agent Kit, Agent Registry and Agent Skills), alongside the teams building AI products on Solana.

Its pitch is that Solana is the network agents pay on: a payment settles in about 200 milliseconds for a fraction of a cent, so an agent can pay for each API call as it makes it, over x402.

Milypay is that pattern applied to Australian data. Every call is an x402 payment on Solana, settled through PayAI, which appears among the ecosystem teams on solana.ai. If your agent already pays per call on Solana, it can call Milypay with no extra setup.

Milypay is independent. It isn’t listed on solana.ai and has no partnership with or endorsement from the Solana Foundation; we link to it as the best map of the stack we build on.

Pick a protocol and make your first call.

Start free on the demo host, then point the same code at api.milypay.xyz when you’re ready to pay per call.