Proof of Concept facilitator for accepting XMR/Monero via x402 protocol
xmr-x402-facilitator is an early-stage Rust project in the AI payments / x402 ecosystem, focused on facilitator, monero, x402, xmr. It currently has 4 GitHub stars and 2 forks, and sits alongside related tools like xmr402-org, ripley-guard-ts, facilitator.
An open-source, privacy-respecting payment oracle that implements the x402 (Payment Required) protocol for Monero (XMR).
This project acts as a sidecar daemon for web servers, AI agents, and microservices. It bridges the gap between the "Agentic Web" and Monero's private-by-default network, allowing any application (Go, JS, Python) to accept XMR using the Coinbase x402 standard.
To provide a sovereign, self-hosted alternative to corporate payment facilitators. By running this daemon alongside your application, you can gate resources behind XMR micro-payments while maintaining 100% control over your own View Keys and Node infrastructure.

/invoices to generate a subaddress and price.402 Payment Required header to the Client.tx_key from their wallet.tx_id and tx_key to the Merchant./settle on this Facilitator to verify the payment proof and enforce the configured confirmation policy before unlocking the resource./supported, /verify, and /settle endpoints.tx_key (Transaction Secret Key) to verify sender ownership, preventing header spoofing and replay attacks.This project includes a standard OpenAPI 3.1 specification.
openapi.yaml: Can be imported into Postman or used to generate client libraries in Go, TS, or Python.monero-wallet-rpc --stagenet --rpc-bind-port 18083 --disable-rpc-login --wallet-file your_wallet
cp .env.example .env
# Edit .env with your RPC URL and Database path
touch facilitator.db
sqlite3 facilitator.db "CREATE TABLE invoices (address TEXT PRIMARY KEY, amount_required INTEGER NOT NULL, metadata TEXT, payer_id TEXT, status TEXT, tx_id TEXT, created_at INTEGER NOT NULL);"
cargo run
| Variable | Default | Description |
|---|---|---|
DATABASE_URL |
sqlite:facilitator.db |
SQLite database location |
MONERO_RPC_URL |
http://127.0.0.1:18083/json_rpc |
Monero Wallet RPC endpoint |
HOST |
0.0.0.0 |
Bind host |
PORT |
3113 |
Bind port |
XMR_NETWORK |
mainnet |
Network identifier returned by /supported |
CONFIRMATIONS_REQUIRED |
0 |
Minimum confirmations required before verification succeeds |
VERIFY_MAX_ATTEMPTS |
300 |
Number of verification polling attempts |
VERIFY_POLL_INTERVAL_SECS |
30 |
Delay between verification polling attempts |
GET /supported)Returns the network and scheme supported by this facilitator.
{"kinds": [{"x402Version": 2, "scheme": "exact", "network": "monero:stagenet"}]}POST /settle)The primary endpoint for unlocking resources.
{
"paymentPayload": {
"address": "7...",
"tx_id": "...",
"tx_key": "..."
},
"paymentRequirements": {
"scheme": "exact",
"network": "monero:stagenet"
}
}
{"success": true, "transaction": "...", "network": "monero:stagenet", "payer": "anonymous"}POST /invoices)Used by your server to prepare a challenge for the user.
{"amount_usd": 0.10}{"address": "7...", "amount_piconero": 650000, "invoice_id": "...", "status": "pending"}By default, this facilitator is configured for 0-Conf (Instant) verification, allowing resources to be unlocked as soon as a transaction is visible to the wallet RPC.
For applications requiring stronger settlement guarantees, the facilitator can enforce a minimum confirmation depth before a payment is considered valid.
CONFIRMATIONS_REQUIRED=0
VERIFY_MAX_ATTEMPTS=15
VERIFY_POLL_INTERVAL_SECS=2
CONFIRMATIONS_REQUIRED=0
CONFIRMATIONS_REQUIRED=1
CONFIRMATIONS_REQUIRED=2+
When a confirmation requirement is configured, the facilitator will poll the Monero Wallet RPC until either:
If the transaction amount is sufficient but the confirmation threshold has not yet been reached, verification will return:
{
"isValid": false,
"invalidReason": "Insufficient confirmations"
}
Applications can retry verification later or increase the polling window through the environment configuration.
tx_key ProofBecause Monero is private, a transaction hash (tx_id) is not enough to prove ownership. This daemon requires the tx_key (Transaction Secret Key) from the client. The daemon uses this to verify:
tx_key AdvantageUnlike transparent ledgers where seeing a transaction is enough proof, Monero's privacy requires the sender to prove they are the one who sent the funds. This facilitator requires the client to provide the tx_key generated by their wallet.
check_tx_key via RPC to verify that the key proves a transfer to the specific subaddress.This is an open-source project designed to strengthen the Monero ecosystem. Contributions, bug reports, and integration examples are welcome.
XMR402 is an open, neutral standard for internet-native payments. It absolves the Internet's original sin by natively making payments possible between clients and servers, creating win-win economies that empower agentic payments at scale. XMR402 exists to build a more free and fair internet.
Industrial-grade Monero payment gating for modern APIs. IETF-compliant, 0-conf enabled, and built for the sovereign internet.
Production-ready x402 facilitator server.
Agent behavior that compiles
An open SDK for agentic payments. Let AI agents make payments, hold funds, and move money across chains with policy enforcement and human approval built in.
x402 payments in Rust: verify, settle, and monitor payments over HTTP 402 flows
Context-aware agentic LLM gateway & router that optimize your agentic workflows with every runs, works with any harnesses, any models, any workflows.
Rust SDK for the x402 payment protocol.
An operating system built for AI agents — talk to your NixOS server instead of SSH-ing in. Typed, audited tool access with atomic rollback on every change. Research-grade; run it on a disposable box, not production.