Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.prudra.dev/llms.txt

Use this file to discover all available pages before exploring further.

Route snapshot

A route snapshot is the record the registry stores for each payment-protected endpoint. It captures everything an agent needs to know to make a payment.

Snapshot format

{
  "id":          "reg_clx1abc123",
  "orgId":       "org_clx1abc123",
  "route":       "/api/generate",
  "method":      "POST",
  "price":       "0.10",
  "token":       "USDC",
  "chain":       "base",
  "chainId":     8453,
  "protocols":   ["x402", "mpp"],
  "description": "Generate a report from uploaded data",
  "walletId":    "mwt_clx1abc123",
  "snapshotAt":  "2026-04-30T09:00:00.000Z"
}

How snapshots are captured

payMiddleware captures the snapshot automatically. The description comes from your middleware configuration:
app.post(
  '/api/generate',
  walletMiddleware({ walletId: 'mwt_clx1abc123' }),
  payMiddleware({
    price:       '0.10',
    description: 'Generate a report from uploaded data',  // ← appears in registry
  }),
  vaultMiddleware(),
  handler,
);
If you omit description, the registry entry will have no description — agents see only the route path and price.

Submitting manually

You can also submit a snapshot manually if you want to pre-register a route before it receives traffic:
curl -X POST https://api.prudra.dev/registry \
  -H "Authorization: Bearer prv_test_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "route":       "/api/generate",
    "method":      "POST",
    "price":       "0.10",
    "token":       "USDC",
    "chain":       "base",
    "protocols":   ["x402", "mpp"],
    "description": "Generate a report from uploaded data"
  }'

Snapshot fields

FieldTypeDescription
routestringNormalised route path
methodstringHTTP method
pricestringPrice as decimal string
tokenstringToken symbol (USDC)
chainstringChain name
chainIdnumberChain ID
protocolsstring[]x402, mpp, or both
descriptionstringHuman-readable description of what the route does
walletIdstringWallet receiving payment
snapshotAtstringISO timestamp of last snapshot