RailPayDocs
Sandbox. No real funds move and nothing settles on a chain yet. What this means

API reference

x402 & paywalls

Paid resources and agent payments.

GET/x402/demo/timeNone (402 until paid)

Price 0.001 SUSD. Returns the server time.

curl
curl -i https://dapp.railpay.app/x402/demo/time
GET/x402/demo/quoteNone (402 until paid)

Price 0.002 SUSD. Returns a random line from a fixed list.

curl
curl -i https://dapp.railpay.app/x402/demo/quote
POST/v1/paywallsSession or account key

Sell your own resource per request.

Body
{ "name": "Report", "price": "0.01", "content": "…" }
Response
{ "paywall": { "id": "pw_…", "url": "/x402/p/pw_…", … } }
curl
curl -X POST https://dapp.railpay.app/v1/paywalls \
  -H "Authorization: Bearer $RAILPAY_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Report", "price": "0.01", "content": "…" }'
GET/v1/paywallsSession or account key

Your paywalls.

curl
curl https://dapp.railpay.app/v1/paywalls \
  -H "Authorization: Bearer $RAILPAY_KEY"
DELETE/v1/paywalls/:idSession or account key

Delete a paywall.

curl
curl -X DELETE https://dapp.railpay.app/v1/paywalls/<id> \
  -H "Authorization: Bearer $RAILPAY_KEY"
GET/x402/p/:idNone (402 until paid)

A paywall. Returns its content once paid; payment goes to the owner.

curl
curl -i https://dapp.railpay.app/x402/p/<id>

402 response body

json
{
  "x402Version": 1,
  "error": "payment_required",
  "accepts": [{
    "scheme": "exact",
    "network": "railpay-sandbox",
    "maxAmountRequired": "1000",
    "asset": "SUSD",
    "payTo": "<account id>",
    "resource": "<url>",
    "description": "...",
    "mimeType": "application/json",
    "maxTimeoutSeconds": 60
  }]
}
POST/v1/agent/payAgent key

Pay one requirement. Policy is checked first.

Body
{ "requirement": { "scheme": "exact", "network": "railpay-sandbox", "maxAmountRequired": "1000", "asset": "SUSD", "payTo": "…", "resource": "…" } }
Response
{ "payment": "<token>", "entry_id": 83, "amount": "0.002", "spent_today": "0.007" }
curl
curl -X POST https://dapp.railpay.app/v1/agent/pay \
  -H "Authorization: Bearer $RAILPAY_AGENT_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "requirement": { "scheme": "exact", "network": "railpay-sandbox", "maxAmountRequired": "1000", "asset": "SUSD", "payTo": "…", "resource": "…" } }'
GET/v1/agent/meAgent key

The calling agent: balance, today's spend and policy.

curl
curl https://dapp.railpay.app/v1/agent/me \
  -H "Authorization: Bearer $RAILPAY_AGENT_KEY"
POST/v1/agent/sendAgent key

Agent-to-agent payment. Requires allow_a2a.

Body
{ "to": "agt_…", "amount": "0.01", "memo": "…" }
curl
curl -X POST https://dapp.railpay.app/v1/agent/send \
  -H "Authorization: Bearer $RAILPAY_AGENT_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "to": "agt_…", "amount": "0.01", "memo": "…" }'

Retry the resource with X-PAYMENT: <token> to get 200 and an X-PAYMENT-RESPONSE header (base64 { entry_id, success: true, network: 'railpay-sandbox' }). A payment token is valid for 5 minutes, for that resource only, and works once..

The RailPay app runs in Sandbox mode. Balances are in Sandbox USD (SUSD). No real funds move and nothing settles on a chain. Chains, stablecoins, card issuing, ramps, fees and yield are TBD.

© 2026 RailPay. Built as practical payment infrastructure, not a token or fundraising project.