Skip to main content

x402 Cloud

Deploy paid API endpoints in minutes. Bankr handles hosting, payments, and discovery.

x402 Cloud lets you deploy serverless API endpoints that agents and developers pay for automatically using the x402 payment protocol. Write a simple handler function, set your price, deploy with one command — and start earning.

Dashboard

Manage your endpoints at bankr.bot/x402 — view usage, revenue, logs, and configure settings.

Why x402 Cloud?​

FeatureBenefit
Zero x402 knowledge requiredWrite plain Request → Response handlers. We wrap the payment layer.
Deploy in secondsbankr x402 deploy bundles and ships your code instantly
Any token on BaseAccept USDC by default, or price in any ERC-20 — see Custom Tokens
Real-time logsSee every paid request, payment, and console output in the dashboard
Agent discoveryEndpoints enabled for discovery are listed in the public marketplace and findable by AI agents
Secure secretsEnvironment variables are encrypted at rest and isolated per account
Usage-based pricingSet a max price, settle only the actual cost with the upto scheme
Settle-after-responsePayments are only collected if your endpoint returns successfully

How It Works​

Developer                          Agent / Client
│ │
│ bankr x402 deploy │ GET /weather?city=London
│──────────────────► │─────────────────────────►
│ │ ◄── 402 + PaymentRequirements
│ Handler runs on │
│ Bankr infrastructure │ Signs payment, retries
│ │─────────────────────────►
│ │ ◄── 200 { temp: 72 }
│ │
│ Revenue appears │ Payment settled on-chain
│ in dashboard │
  1. You write a handler and deploy via CLI
  2. An agent calls your endpoint — gets a 402 with pricing
  3. The agent's wallet signs a payment and retries
  4. Bankr verifies the payment, runs your handler, settles on-chain
  5. You see the request, logs, and revenue in your dashboard

Create Endpoints via Chat​

You can create, deploy, and manage x402 endpoints entirely through the Bankr agent — no CLI or local setup needed. Describe what you want and Bankr writes the TypeScript handler, deploys it, and gives you the live URL.

create an x402 endpoint called "sentiment" that takes a stock ticker
and returns a sentiment score from recent news. charge $0.005 per request.

The agent handles the full lifecycle:

ActionExample prompt
Create"deploy an x402 endpoint called hello that returns a joke for $0.001"
Update code"update my sentiment endpoint to also return a confidence score"
Update config"change the price of my sentiment endpoint to $0.01"
Pause/Resume"pause the sentiment endpoint"
View logs"show me the recent logs for my hello endpoint"
Delete"delete the hello endpoint"
List all"list my x402 endpoints"
Inspect"show details for my sentiment endpoint"

Endpoints created through chat are identical to CLI-deployed ones — same runtime, same URL format (https://x402.bankr.bot/<wallet>/<name>), same billing. You can manage chat-created endpoints with the CLI and vice versa.

Handler Context​

Your handler receives a ctx object with optional capabilities you can enable at deploy time:

CapabilityWhat it providesUse case
ctx.filesRead/write persistent files scoped to /x402/<name>CSV ledgers, JSON state, uploaded assets
ctx.appKVKey-value store shared with your Bankr appsDrive app dashboards from endpoint data
ctx.askAgentSend a prompt to your Bankr agentTrigger Telegram notifications after payment

Each capability is opt-in — the agent declares what your handler needs when deploying (with the CLI, add the files, appKV or agent block in bankr.x402.json) and only those fields are populated at runtime.

Environment Variables​

Endpoints can read secrets via process.env. Declare the variable names at deploy time (values are never passed through chat). Set the actual values through Terminal Settings or the CLI. The agent's x402 env vars are stored in a separate encrypted scope from your regular agent env vars.

The Marketplace​

The public x402 marketplace at bankr.bot/terminal/x402/discover is browsable by anyone, no account needed. It lists only endpoints Bankr has enabled for discovery — a new deployment isn't listed automatically, though anyone can call it by its URL. Each service card shows how many endpoints it exposes, its price, network and tags; opening one shows every route in full — methods, description, price, the request/response schema and the live URL to call.

What you put in your config file is what the marketplace shows, so it is worth filling in:

FieldWhere it shows up
descriptionThe card body and the detail drawer
categoryThe card's badge and the category filter chips
tagsCard chips (the first four) and search matching
schemaThe request/response schema block in the drawer

The same catalogue backs agent discovery and the CLI's bankr x402 search, so one well-described endpoint is findable from chat, the terminal and the browser alike.

Pricing​

No monthly fees: the first 1,000 settled requests each month on USDC- or EURC-priced endpoints are fee-free, then a 5% platform fee is taken at settlement, and earnings go straight to your wallet. See Pricing.