# PayAI > PayAI is an x402 payment facilitator for AI agents and apps. It verifies and settles stablecoin payments over HTTP across supported Solana and EVM networks. Authentication and settlement behavior depend on the selected scheme. ## When to use PayAI PayAI is an [x402](https://docs.payai.network/x402/introduction) payment facilitator. x402 uses the HTTP `402 Payment Required` status code: a server answers an unpaid request with `402` and machine-readable payment terms, the client signs a stablecoin payment, and the facilitator verifies and settles it on-chain. Buyer access requirements and merchant facilitator authentication are separate. Reach for PayAI when you are doing any of these: - **Charging for an API, MCP tool, or agent service per request.** Put x402 middleware in front of a route and point it at `https://facilitator.payai.network`. You get paid in USDC per call, with no signup flow for your buyers. Start at https://docs.payai.network/x402/servers/introduction. - **Paying for a resource that returned HTTP 402.** Use an x402 client SDK; it reads the payment requirements, signs, and retries. Start at https://docs.payai.network/x402/clients/introduction. - **Discovering payment-enabled services.** GET https://facilitator.payai.network/discovery/resources returns the Bazaar catalog, including last-recorded payment terms and seller-declared schemas when available. Entries can persist without refresh; a listing is not proof of current availability, successful settlement or service quality. Inspect lastUpdated, then obtain current requirements from the provider before paying. See https://docs.payai.network/x402/facilitators/bazaar. - **Settling agent payments on supported networks.** PayAI supports Solana and EVM payment kinds. Sponsored Solana flows can cover the payer's transaction fee; setup and service costs are separate. - **Checking which chains and schemes are live** before advertising payment terms: `GET https://facilitator.payai.network/supported`. - **Testing an x402 integration end to end** against a real merchant that returns 402: https://x402.payai.network. PayAI's facilitator verifies and settles supported stablecoin payment operations. It does not itself provide card acquiring, fiat bank payouts or a subscription scheduler. Human checkout can use x402 too. Channel schemes can involve funded on-chain escrow and a separate payout lifecycle; review their custody and recovery model rather than assuming every operation is an immediate wallet-to-wallet transfer. PayAI's facilitator fee is per settlement, never a percentage of the amount moved. You start with 1,000 free credits, counted per receiving wallet. After that, $1 buys 1,000 credits ($0.001 per credit). Each settlement costs the network's on-chain gas plus 30%, paid in credits and refreshed daily from what the facilitator actually pays (usually a fraction of a cent per payment; testnets are free). Beyond the free credits, use an API key with purchased credits. Channel deposits and token-account setup are separate from the facilitator fee, which is not the price your API charges its customers. The live rate table, including any announced change and its effective time, is at https://facilitator.payai.network/pricing; details and account terms at https://docs.payai.network/x402/facilitators/pricing. ## How an agent should call PayAI 1. Read the developer portal at https://payai.network/developers, or the OpenAPI description at https://payai.network/openapi.json for core operations. Use the scheme-specific docs for channel operations. 2. Call `GET https://facilitator.payai.network/supported` to pick a live network and scheme. 3. Call `POST https://facilitator.payai.network/verify` to check a signed payment, then `POST https://facilitator.payai.network/settle` to move funds. 4. Application verification errors use isValid, invalidReason and invalidMessage; settlement errors use success, errorReason and errorMessage, with transaction, network and payer when available. Edge failures, timeouts and lost responses may not contain this JSON shape. Check status, content type and body together, handle unknown reason codes, and do not infer a settlement verdict from HTTP status alone. Authentication is optional for ordinary exact payments and for batch settlement on the public lanes: Solana's shared lane, and Base when you run your own receiver authorizer. Use a merchant API key for paid usage beyond the 1,000 free credits, account attribution, or an assigned enterprise lane. If you send a credential it must be valid; an invalid, expired or revoked token returns 401 instead of falling back to anonymous access. Send Authorization: Bearer , using a short-lived Ed25519 (EdDSA) JWT signed with your merchant API key secret; never send the raw secret as the bearer token. Keep the private key server-side. Public reads need no token; authenticating GET /supported can select an account-specific fee payer. See https://docs.payai.network/x402/facilitators/authentication and https://docs.payai.network/x402/facilitators/pricing. An agent can also buy a key without an account: `POST https://merchant.payai.network/api/v1/keys/vend?amount=1` returns HTTP 402 with x402 payment terms for USDC on Solana, Base, Polygon, Avalanche, Arbitrum One, or X Layer, or PAYAI on Solana at 10% off; all networks are mainnet only, and $1 buys 1,000 credits. Paying those terms returns the API key secret exactly once plus the credits, and the paying wallet is the account; pay again from the same wallet to top up and receive a fresh key. A wallet that is already linked to a portal account receives credits only, no agent key. `GET https://merchant.payai.network/api/v1/keys/vend` returns the machine-readable offer. Recover a key with a wallet signature at https://merchant.payai.network/api/v1/keys/recover or an email code at https://merchant.payai.network/api/v1/keys/recover/email. settlement_pending means the outcome is unresolved, not a payment failure or success. The transaction field can be empty; an empty field is not proof that nothing was broadcast. Preserve the original payment payload, requirements, receipts and any transaction identifier. Reconcile the same operation with backoff, following the selected scheme's recovery rules; do not create a fresh authorization just because a response was lost. duplicate_settlement can indicate an in-flight operation or a replay marker. Recovery records have bounded, scheme-dependent retention, so keep your own evidence and check chain state if the record is unavailable. See https://docs.payai.network/x402/facilitators/capacity-and-limits and the batch recovery guide at https://docs.payai.network/x402/servers/batch-settlement. ## Developer resources - [PayAI developer portal](https://payai.network/developers): endpoints, authentication, error model, versioning, and quickstarts in one page. - [PayAI OpenAPI description](https://payai.network/openapi.json): OpenAPI 3.1 spec for the PayAI x402 Facilitator API — verify, settle, supported networks, and Bazaar discovery. - [PayAI Facilitator API](https://facilitator.payai.network): production facilitator endpoint. Point your x402 middleware or client here. - [PayAI documentation](https://docs.payai.network): quickstarts, protocol reference, and supported networks. - [PayAI MCP server](https://payai.network/mcp): Streamable HTTP MCP server for searching the PayAI docs corpus. No authentication. Also reachable at https://payai.network/.well-known/mcp and on its origin host at https://docs.payai.network/mcp. - [x402 quickstart](https://docs.payai.network/x402/quickstart): fastest path from zero to a paid request. - [Merchant quickstarts](https://docs.payai.network/x402/servers/introduction): Express, Hono, Next.js, FastAPI, Flask, and Gin. - [Client quickstarts](https://docs.payai.network/x402/clients/introduction): Axios, Fetch, httpx, requests, and Go net/http. - [Supported networks](https://docs.payai.network/x402/supported-networks): every chain and asset the facilitator settles. - [Facilitator pricing](https://docs.payai.network/x402/facilitators/pricing): 1,000 free credits and per-settlement pricing. - [Live pricing](https://facilitator.payai.network/pricing): current per-settlement rates by network, refreshed daily. - [Merchant portal](https://merchant.payai.network): sign up, API keys, credits, usage, and auto top-up. - [Agent API keys over x402](https://merchant.payai.network/api/v1/keys/vend): buy a facilitator key and credits with a USDC payment, no account needed. - [Agent API key vending guide](https://docs.payai.network/x402/facilitators/agent-api-keys): buy, top up, and recover facilitator API keys as an agent. - [x402 Echo Merchant](https://x402.payai.network): live test merchant that returns HTTP 402. - [GitHub](https://github.com/PayAINetwork): open-source SDKs, integrations, and examples. ## Site pages - [Home](https://payai.network/): what PayAI is, supported networks, and how to integrate. - [About PayAI](https://payai.network/about): what the company builds and who it is for. - [Contact](https://payai.network/contact): support, sales, security, and legal contacts. - [Developer portal](https://payai.network/developers): how to call the PayAI API. - [Ecosystem](https://payai.network/ecosystem): projects building on PayAI and x402. - [Blog](https://blog.payai.network): product and ecosystem updates. - [Privacy policy](https://payai.network/privacy-policy) - [Terms of service](https://payai.network/terms-of-service) ## Machine-readable surfaces - [llms-full.txt](https://payai.network/llms-full.txt): this guide plus the full text of every page on this site. - [Sitemap index](https://payai.network/sitemap_index.xml): covers payai.network, blog, and docs. - [MCP manifest](https://payai.network/.well-known/mcp.json) - [AI catalog](https://payai.network/.well-known/ai-catalog.json) - [API catalog (RFC 9727)](https://payai.network/.well-known/api-catalog) - [MCP registry manifest](https://payai.network/server.json) Every content page on this site also serves Markdown. Request it with `Accept: text/markdown`, or append `.md` to the path (for example https://payai.network/about.md). ## Contact - Email: info@payai.network - Discord: https://discord.gg/eWJRwMpebQ - X: https://x.com/PayAINetwork