Monetize your endpoints without writing code. xPay is the first no-code platform to help you monetize your endpoint and infrastructure. xPay wraps your existing HTTP endpoints with a trust-minimized pay-per-request proxy powered by x402 microtransactions on Solana (USDC by default). In minutes, your API can accept payments, expose a beautiful marketplace listing with reviews, and even become an MCP server that AI agents can call as first-class tools.
- Own your distribution: No keys to rotate or centralized gatekeepers. Each request proves payment cryptographically.
- Instant settlement: Payments land directly in your wallet with near-zero fees and no custody risk.
- AI-native: Your endpoints instantly become MCP tools, usable by LLM agents with built-in, per-call payments.
- No-code onboarding: Point to your existing API, set a price, pick a token, and share your new paid URL.
- Wrap any HTTP endpoint in a paid proxy:
https://api.usexpay.xyz/:username/:endpointName - Set per-call pricing and token (USDC SPL by default; any SPL token address supported)
- Enforce payment via the x402 standard with Faremeter middleware
- List your API in a marketplace with ratings, usage examples, and earnings
- Provide AI agents an MCP server at
GET/POST /mcp/:usernamewhere each tool = your endpoint
- Register an endpoint (creator dashboard or API): name, description, original URL, HTTP method, price, token, optional auth headers, sample I/O.
- xPay generates a paid proxy URL: e.g.
/:username/:endpointNamewhich forwards to your original URL. - Faremeter x402 middleware verifies payment on each call, then forwards the request and returns the response.
- Earnings tracked per endpoint on successful 2xx responses.
- AI/MCP: xPay builds a per-user MCP server; each endpoint becomes a tool with typed inputs from your sample body.
- Users and reviews: Consumers can rate endpoints; creators manage profile, endpoints, and monitor balances.
- Backend: Node.js + Express (TypeScript), Drizzle ORM (Postgres), Zod validation, JWT auth, Solana Web3, Faremeter x402 middleware, MCP SDK, Axios proxy, Vercel AI SDK endpoints for text/image examples.
- Frontend: Next.js 15 (App Router), Tailwind + Radix UI, React Query, Coinbase CDP Wallet for signature-based login, polished landing and dashboard UX.
- Storage/Infra: Postgres (DATABASE_URL), optional local uploads for AI image examples, environment-driven configuration.
See module guides:
- Backend README:
backend/README.md - Frontend README:
frontend/README.md
- Fill in all required environment variables in the appropriate
.envfiles. Refer to the provided.env.examplefiles in each app for guidance. - From the repo root, install all dependencies:
npm install - Start all apps in development mode:
npm run dev - (Optional) For backend DB migrations, you can still use:
npm run db:generate && npm run db:migrate - The backend will default to
http://localhost:3000, and the frontend tohttp://localhost:3001.
Every paid proxy call passes through Faremeter’s x402 middleware:
- Accepts Solana SPL tokens (USDC mint by default)
- Enforces exact per-call pricing
- Attaches resource metadata and description for auditability
- Streams responses after payment verification
GET /endpoints returns a paginated catalog including average ratings and counts. Creators grow reputation; consumers discover reliable tools.
Each user gets an MCP server at /mcp/:username. Tools are synthesized from your registered endpoints:
- Tool descriptions include method and cost
- Input schemas are generated from your sample request body
- Session lifecycle handled via
mcp-session-id - Payment is bypassed for MCP protocol list/initialize calls but enforced for tool invocations
Frontend uses Coinbase CDP wallet to sign a message. Backend verifies the signature and issues a JWT for authenticated actions (create/update/delete endpoints, update profile).
- Run Postgres with backups and TLS.
- Keep
JWT_SECRETsecure and rotate on schedule. - Use a dedicated Solana RPC; set
SOLANA_RPC_URL. - Review CORS and rate limits for public routes.
- Prefer mainnet-beta for real payments; use small price increments to test.
MIT. See LICENSE.md
Questions or ideas? Open an issue or PR. We’d love to see what APIs you monetize with xPay.