# MonkePay Documentation ## Docs - [Configuration](https://docs.monkepay.xyz/configuration.md): All MonkePay adapters accept the same configuration object. - [Dashboard Setup](https://docs.monkepay.xyz/dashboard-setup.md): The MonkePay dashboard is at [monkepay.xyz](https://monkepay.xyz). It's where you manage API keys, view transactions and payouts, and configure your payout address. - [Error Handling](https://docs.monkepay.xyz/error-handling.md): MonkePay separates errors into two categories: recoverable and non-recoverable. Recoverable errors fire `onError` but don't interrupt the request. Non-recoverable errors return an error response to the agent. - [Express](https://docs.monkepay.xyz/express.md): MonkePay middleware for [Express](https://expressjs.com). - [Fastify](https://docs.monkepay.xyz/fastify.md): MonkePay middleware for [Fastify](https://fastify.dev). - [For AI Agents](https://docs.monkepay.xyz/for-ai-agents.md): This section is for developers building AI agents that need to autonomously pay for x402-protected APIs. If you're an API owner looking to gate your endpoint, see the [Quick Start](/quick-start) instead. - [Hono](https://docs.monkepay.xyz/hono.md): MonkePay middleware for [Hono](https://hono.dev). - [How x402 Works](https://docs.monkepay.xyz/how-x402-works.md): x402 is an open payment protocol built on HTTP. It revives the `402 Payment Required` status code — originally defined in HTTP/1.1 but never implemented — to create a simple, machine-readable payment flow. - [Introduction](https://docs.monkepay.xyz/introduction.md): MonkePay is payment infrastructure for AI agent APIs. It lets you gate any HTTP endpoint behind per-request USDC payments using the x402 protocol — agents pay automatically, you receive USDC. No accounts, no KYC, no bank integration. Payment happens directly on-chain in under two seconds. - [Networks](https://docs.monkepay.xyz/networks.md): MonkePay currently supports two networks: - [Next (App Router)](https://docs.monkepay.xyz/next.md): MonkePay middleware for [Next.js](https://nextjs.org) App Router. - [On Payment](https://docs.monkepay.xyz/on-payment.md): The `onPayment` callback fires after every successful payment settlement. Use it for usage tracking, webhooks, database writes, or any business logic that should run when a payment is received. - [Payment Modes](https://docs.monkepay.xyz/payment-modes.md): MonkePay supports two payment modes: `per_request` and `one_time`. Set the mode in your config: - [Per Route Pricing](https://docs.monkepay.xyz/per-route-pricing.md): Set different prices per endpoint. All adapters support per-route overrides — set defaults at the instance level and override per route. Any config option can be overridden except `apiKeyId` and `apiKeySecret`. - [Quick Start](https://docs.monkepay.xyz/quick-start.md): Gate your first endpoint in 5 minutes. - [Reverse Proxies](https://docs.monkepay.xyz/reverse-proxies.md): When your API runs behind a reverse proxy (Railway, Render, Fly, Cloudflare, Nginx), the x402 payment requirements need to include your public-facing URL. Without correct configuration, agents may receive `http://` resource URLs when your API is actually `https://`, causing payment verification to f… - [Roadmap](https://docs.monkepay.xyz/roadmap.md): What's coming to MonkePay. - [USDC and Base](https://docs.monkepay.xyz/usdc-and-base.md): MonkePay settles payments in USDC on Base. Here's what that means and why it matters.