XRPL EXPLAINED Advanced guide ← Back to the guide Share on X

AI AGENTS · PAYMENTS ON THE XRP LEDGER

AI agents that pay on the XRP Ledger

Machines paying machines – in seconds, in XRP or RLUSD.

AI agents can now pay for an API call, a dataset or a model answer on their own. With the open x402 standard, a service asks for payment, the agent pays on the XRP Ledger and gets the result – no API keys, no accounts, no monthly plans.

Live on Mainnet · x402

Simulator

Watch: AI agents pay on the XRP Ledger with x402A short video from the XRPL Explained series.

How an agent pays with x402

Six steps, from request to result.

  1. 01

    The agent asks

    The agent calls a paid web address (an API endpoint), just like any normal web request.

  2. 02

    402: Payment Required

    The service answers with HTTP 402. It says the price, the address to pay and which facilitator checks the payment.

  3. 03

    The agent pays

    The agent signs an XRP Ledger Payment for exactly that amount, in XRP or RLUSD, to the service's address.

  4. 04

    The ledger settles

    The payment is final in about 3–5 seconds. On the XRP Ledger, a validated payment can't be reversed.

  5. 05

    The facilitator confirms

    The facilitator checks the payment on the ledger and gives the agent a signed receipt.

  6. 06

    Paid – here is the result

    The agent asks again with the receipt in the X-PAYMENT header. The service checks it and sends the data.

What makes it different

  • Pay per request. No API keys, no sign-up, no monthly plan – the agent pays only for what it uses.
  • Final in seconds. The XRP Ledger settles in about 3–5 seconds, so the agent knows right away that it paid.
  • Tiny amounts. Prices can be set in drops (1 XRP = 1,000,000 drops), and network fees are a fraction of a cent.
  • XRP or RLUSD. Pay in XRP, or in RLUSD when a stable dollar price matters.

Who is it for?

AI agents
API & data providers
Developers

RippleX reports 5.6 million x402 transactions on the XRP Ledger since launch.

For developers: XRP Ledger AI Starter Kit v1.1

Key concepts, in plain English

x402An open standard for machine-to-machine payments over the web.
HTTP 402The “Payment Required” answer that tells the agent what to pay.
FacilitatorA service that checks the payment on the ledger and signs a receipt.
Presigned paymentThe XRPL Payment the agent signs before it is sent.
RLUSDRipple's US dollar stablecoin, for stable prices.

Good to know

Treat every 402 answer as untrusted: check the price and the address before paying. Give an agent its own wallet with a small balance or a spending limit. The public testnet facilitator is for testing only, and the x402 tools for the XRP Ledger are still early.

Educational content. Not financial advice.

Test your knowledge

5 questions · Every answer explained

1 / 5

More Advanced guides

XRPL Glossary → How validators vote · Consensus →