# PayWeave > PayWeave is a micropayments platform for AI agents. Monetize APIs, serverless functions, and file downloads with per-request payments using MPP (Machine Payment Protocol) on the Tempo blockchain. Payments settle in real time in pathUSD stablecoin. Turnkey SDK integration for Express, Hono, Next.js, and Fastify. Automatic refunds for gateways, functions, and files. On-chain referral rewards via split payments. Discovery via Skills API, LLMs.txt, MCP Server, and AI Plugin. ## Key Links - [Home](https://payweave.app) - [Documentation](https://payweave.app/docs/overview) - [Getting Started](https://payweave.app/docs/getting-started) - [Quickstart](https://payweave.app/docs/quickstart) - [Pricing](https://payweave.app/docs/pricing) - [Full Documentation for LLMs](https://payweave.app/llms-full.txt) ## Core Features - **Apps & SDK Middleware**: Generate API credentials (appId + appSecret) and integrate SDK middleware (`@payweave/express`, `@payweave/hono`, `@payweave/next`, `@payweave/fastify`) to accept per-request micropayments. Supports dynamic per-request pricing. Apps use developer-initiated refunds via API. - **Gateways**: Reverse-proxy any existing API with zero code changes. Define endpoints with wildcard or exact path matching, individual pricing (min $0.0001), and method restrictions. Import from OpenAPI 3.0/3.1 or Swagger 2.0 specs. Upstream auth via header, query param, or basic auth (AES-256-GCM encrypted at rest). Automatic refunds on upstream 5xx or connection failure. - **Functions**: Deploy serverless TypeScript handlers in isolated V8 runtimes with built-in pricing. Each handler gets its own URL. Secrets stored encrypted (AES-256-GCM). 30s execution timeout, 10 MB response limit, 5 MB request limit. Automatic refunds on unhandled exceptions, 5xx, or timeout. - **Files**: Upload any file type up to 100 MB to collections stored on Cloudflare R2. Set per-download pricing (min $0.0001). Agents pay via MPP and get the file immediately. Automatic refunds if file not found or storage unavailable after payment. - **Discovery**: Publish to Bazaar catalog. Resources discoverable via Skills API (`/api/discovery/skills`), auto-generated LLMs.txt, MCP Server (`/mcp`), and AI Plugin manifest (`/.well-known/ai-plugin.json`). All support global and workspace-scoped endpoints. - **Referrals**: On-chain split payments via `?ref=WALLET_ADDRESS` on any payment URL. Default 0.5%, configurable 0.1%-10%. Settled in same transaction — no claiming or delays. - **Wallets & Funds**: Auto-provisioned via Privy with test and live modes. Real-time settlement on Tempo in pathUSD. Minimum withdrawal $1.00 from live wallet. Optional external wallet forwarding. - **Refunds**: Automatic for gateways (upstream 5xx/connection failure), functions (exceptions/5xx/timeout), and files (storage errors). Apps require developer-initiated refunds. Batch processing with single signature supported. - **Analytics**: Real-time revenue tracking, transaction history, per-app/gateway/function/file breakdowns. ## Resource URLs - Gateway: `https://gw.payweave.com//` - Function: `https://fn.payweave.dev//` - Files: `https://api.payweave.dev/fl//` ## Pricing - **Free**: $0/month, 3% platform fee, unlimited apps/gateways/functions/files, analytics, auto wallet provisioning, SDK middleware, referral rewards. - **Pro**: $9/month, 1% platform fee, unlimited transactions, priority support, Bazaar & MCP discovery, referral rewards. ## Quickstart 1. Sign up at https://payweave.app and create a workspace. Wallets are auto-provisioned. 2. Install the SDK: `npm install @payweave/hono` (or `@payweave/express`, `@payweave/next`, `@payweave/fastify`). 3. Add `.charge()` middleware to your routes with price and description. 4. AI agents discover and pay for your API via MPP automatically. Payments settle in real time.