Rail402
Live on stellar:testnet · free · no API key

Turn any HTTP endpoint into a paid resource on Stellar.

A buyer, usually an AI agent, sees a price, pays per request, and gets access. No checkout page, no API key, no account. The payment settles on Stellar and the service becomes discoverable in the Bazaar.

No checkout page No API key No account Network fees covered Never holds your funds Payments cost a fraction of a cent
Why Stellar · why now

A rail where a one-cent payment makes sense.

Agents buy in cents, thousands of times a day. No card rail fits that.

< 1¢ A settlement costs almost nothing
USDC Real stablecoins, paid on-chain
0 XLM Fees sponsored, nothing else to hold
RAIL402
Stellar testnet · one paid request
Price0.0100 USDC
Network fee0.0023 XLM
Fee paid byFacilitator
Buyer topped up0 XLM
Charged to buyer0.0100 USDC
Tx 3f6031ed…✓ Settled
The three pillars

One rail: settle, catalog, discover.

Payments, discovery, the tools that plug agents in, and two live surfaces to see it working.

Facilitator

Checks and settles every payment on Stellar. Network fees are covered, funds never pass through it, and the buyer needs nothing but the money to pay with.

Bazaar

A searchable catalog of paid services. A service is listed the moment its first payment settles. No sign-up, no submission form.

SDK · CLI · MCP

One SDK for buyers and sellers, a command line, and an MCP server, so an agent can find and pay for a service from inside its own runtime.

The payment loop

x402 on Stellar, in six steps.

x402 is an open standard that lets any web service charge per request. Rail402 brings it to Stellar.

01Request
02Price quoted
03Approve
04Retry
05Settle
06Deliver
01

Request

An agent asks for the service, with no payment attached.

02

The price comes back

The server answers 402 Payment Required: here is the price, the currency, and where to pay.

03

Approve

The buyer approves exactly that one payment. Nothing more can ever be taken from the account.

04

Retry

The same request goes out again, this time with the approval attached.

05

Settle

Rail402 checks the approval and settles it on Stellar, covering the network fee itself.

06

Deliver

The service responds, with proof of payment attached. And the service is now discoverable in the Bazaar.

The buyer never talks to Rail402 directly. The seller's server does, on the buyer's behalf.

Two settlement schemes

Both use the same loop. They differ in what the buyer approves.

exact

Default · fixed price

The buyer approves the exact price, and exactly that amount is paid. Any standard x402 client can pay this way, with no extra code.

Buyer approvesThe exact price
What gets paidExactly that amount
Best forFixed-price calls

upto

Metered

The buyer approves a maximum, and only the actual usage is charged. Never more. Built for metered work: tokens, compute, pay-for-what-you-read.

Buyer approvesA maximum
What gets paidOnly the actual usage
Best forMetered services

Rail402 wrote the Stellar version of the upto standard. It ships with the on-chain contract that enforces it: every approval works exactly once, expires quickly, and can never exceed the maximum.

Smart-account buyers

Give every agent a wallet with rules.

A buyer can be a plain keypair or a programmable smart account. Both settle through the same rail, proven on-chain for both schemes.

G… + C… One rail for keypairs and smart accounts
audited Accounts by OpenZeppelin, only the budget policy by Rail402
0.002 XLM The cost of giving an agent its own account
AGENT BUDGET
2.000000Ceiling held 0.750000Settled · rest refunded
Holds the ceiling · charges actual usage · refunds the rest
The Bazaar

Listed by settlement. Found by meaning.

There is no listing form and no registry. A service enters the catalog when its first payment settles, only the seller who actually gets paid can own a listing, and search understands plain language. Try it:

{{typed}}
Try:
{{r.rank}}
{{r.name}}
{{r.meta}}
{{r.price}}
The agent interface

Two tools. Nothing else to integrate.

The MCP server drops into any agent runtime: one tool searches for free, one pays under a hard cap.

Search · pays nothing
search_stellar_resources

Ask in plain language, get ranked paid services. Every result comes back ready to judge:

The price, in a currency that can't be faked
Whether the seller can actually receive the money
How many real buyers have paid for it
Pay · cap required
pay_and_call

Finds the price, pays under your cap, returns the resource. HTTP endpoints and MCP tools alike.

Your spending cap is checked right before signing
Structured input and output, nothing free-form
Refuses to call private or internal addresses

Every rejection is a contract. 122 codes, each with a machine code, a human reason, and a retry flag. A reason can't even be left empty.

SDK · CLI · packages

The whole rail ships on npm.

Ten packages on npm, all Apache-2.0. Pick a door:

{{k.num}} {{k.name}}
{{k.tag}}

{{k.name}}

{{k.desc}}

{{k.pkg}} View on npm →
@rail402.dev/sdk@rail402.dev/cli@rail402.dev/facilitator@rail402.dev/mcp-discovery@rail402.dev/agent-helpers@rail402.dev/seller-helpers@rail402.dev/scheme-upto-stellar@rail402.dev/errors@rail402.dev/bazaar@rail402.dev/conformance
The Explorer

Every settlement on Stellar. Not just ours.

It reads the ledger directly and classifies every x402 payment it finds, from any facilitator, registered or not.

All facilitators Nobody registers to appear. The ledger is the source.
Three labels rail402, verified, or x402-shaped. Inference is marked, never sold as fact.
Open API Feed, stats, sellers, history. Callable straight from a browser.
Open the Explorer
explorer.rail402.dev/feed LIVE
rail402 exact · 0.010 USDC settled a4f2…9c1b
verified upto · 0.030 of 0.050 settled e07d…44aa
rail402 exact · 0.004 USDC settled 3b91…d2f0
x402-shaped exact · 0.120 USDC settled 77c2…0e8d
rail402 upto · 0.750 of 2.000 settled 0d78…7cf1
Sorts every payment

Read off the ledger itself, never self-reported.

History, backfilled

Recent history for everyone it sees; full chain history for verified facilitators.

Register by announcing

It probes your /supported itself. An announcement is a lead, never a fact.

playground.rail402.dev TESTNET
$ pay api.pdfsmith.dev/ocr · 0.01 USDC
402 quoted Approved ✓ Settled
tx 5e5d…62c1 → receipt attached
The Playground

Your first payment is a minute away.

No wallet, no API key, nothing to install. It funds a test account for you and runs a real x402 payment in front of you.

Free Testnet money, funded for you on arrival.
~10 seconds From click to settled on chain.
Every step The 402, the approval, the settlement, the receipt.
Open the Playground
Real, not simulated

A genuine x402 payment settles on the Stellar test network.

Watch it land in the Explorer

Your settlement shows up in the live feed moments later.

Graduate to the CLI

The same loop from your terminal when the browser gets small.

Ecosystem

Already moving money.

Live totals from the Explorer, across every facilitator it can see.

payments
2,620
buyers
44
sellers
28
exact
2,616
upto
4
payments
54,434
buyers
2,058
sellers
4,275
exact
54,391
upto
43
Read The State of x402 on Stellar
Three paths

Pick your side of the 402.

01

Buyers & agents

Find a service and pay per request, always under a spending limit. From code, the terminal, or an agent runtime.

Try the playground
02

Sellers

Price an endpoint you already run. Your first settled payment lists it in the Bazaar, and built-in checks catch setup mistakes early.

Read the seller guide
03

Operators

You run the rail those two settle on: hosted, one Docker image, or embedded inside your own server.

Get the source
Deployment · reliability

Run none of it, or all of it.

Hosted and free on testnet, no API key. Every step past that is one env var, one Docker image, or one import.

Use the hosted one

facilitator.rail402.dev, free on testnet, no API key.

Or start with zero config

Start it bare: it makes its own funded testnet signer.

Or bring your own signer

One env var. Every setting is real 12-factor config.

Or take the Docker image

Facilitator and Bazaar ship as a single container.

Or embed it in your server

Verify and settle in-process, no HTTP hop at all.

We run everything
You run everything
Compatibility · kept current

Works with any x402 client. Checked every day.

Rail402 doesn't grade its own homework: the standard's own test suite, unmodified, runs against the live deployment.

TEST REPORT
An unmodified x402 client completes a real payment
The official test suite settles real USDC
All 19 failure cases answer with a clear reason
Every official scenario that can run, passes
THE STANDARD KEEPS MOVING · CHECKED EVERY DAY
Notice
The x402 standard changed upstream.
Check
Run the tests and one real payment: does everything still work?
Prepare
If something broke, a fix is drafted automatically.
Flag
Exactly one tracked issue. Never a pile.
Nothing merges on its own · we decide
Proof

Deployed, not described.

Everything on this page is checkable: from your terminal, on the Explorer, and on chain.

$ curl facilitator.rail402.dev/supported $ curl facilitator.rail402.dev/health
Contributions to the open standard
Fixed or metered pricing Listed by real payments Every claim provable on chain Open source, Apache-2.0 Built on the open x402 standard