> For the complete documentation index, see [llms.txt](https://docs.awenetwork.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.awenetwork.ai/infrastructure/overview/world.fun/x402-facilitator.md).

# x402 Facilitator

The facilitator is an optional but recommended service that simplifies the process of verifying and settling payments between clients (buyers) and servers (sellers).

## What is a Facilitator?

The facilitator is a service that:

* Verifies payment payloads submitted by clients.
* Settles payments on the blockchain on behalf of servers.

By using a facilitator, servers do not need to maintain direct blockchain connectivity or implement payment verification logic themselves. This reduces operational complexity and ensures accurate, real-time validation of transactions.

## Facilitator Responsibilities

* **Verify payments:** Confirm that the client's payment payload meets the server's declared payment requirements.
* **Settle payments:** Submit validated payments to the blockchain and monitor for confirmation.
* **Provide responses:** Return verification and settlement results to the server, allowing the server to decide whether to fulfill the client's request.

The facilitator does not hold funds or act as a custodian - it performs verification and execution of onchain transactions based on signed payloads provided by clients.

## Why Use a Facilitator?

Using a facilitator provides:

* **Reduced operational complexity:** Servers do not need to interact directly with blockchain nodes.
* **Protocol consistency:** Standardized verification and settlement flows across services.
* **Faster integration:** Services can start accepting payments with minimal blockchain-specific development.

While it is possible to implement verification and settlement locally, using a facilitator accelerates adoption and ensures correct protocol behavior.

## AWE World.fun Facilitator

AWE World.fun operates a hosted facilitator service.

<figure><img src="https://2494829985-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKPzJzyJFmAFMJBOSKIiV%2Fuploads%2FEbolJrqH61QTYHtTApKd%2FScreenshot%202025-11-24%20at%2023.29.43.png?alt=media&amp;token=48c509f5-f2ce-4ca5-9c88-c325f2879df6" alt=""><figcaption></figcaption></figure>

### **AWE World.fun's x402 Facilitator**

World.fun's x402 facilitator offers:

* Fee-free USDC payments on Base: It currently processes transactions without additional fees, allowing sellers to receive 100% of the payment.
* Flexible token support: Any ERC-20 token that implements EIP-3009 can be used as the payment asset.
* High performance settlement: Payments are submitted to the Base network with fast confirmation times and high throughput.

Using World.fun's facilitator allows sellers to quickly integrate payments without managing blockchain infrastructure, while providing a predictable and low-cost experience for buyers.

### **How It Works**

To accept World.fun payments, just add:

<pre class="language-javascript"><code class="lang-javascript"><strong>import express from "express";
</strong><strong>import { paymentMiddleware } from "x402-express";
</strong>
<strong>const app = express();
</strong>
<strong>app.use(paymentMiddleware(
</strong><strong>    "0xYourAddress", // your receiving wallet address
</strong><strong>    {  // Route configurations for protected endpoints
</strong>    "GET /weather": {
<strong>        // USDC amount in dollars
</strong>        price: "$0.001",
        network: "base",
<strong>        // Optional: Add metadata for better discovery in x402 Bazaar
</strong>        config: {
        description: "Get current weather data for any location",
        inputSchema: {
            type: "object",
            properties: {
            location: { type: "string", description: "City name" }
            }
        },
        outputSchema: {
            type: "object",
            properties: {
            weather: { type: "string" },
            temperature: { type: "number" }
            }
        }
        }
    },
    },
    {
    url: "https://facilitator.world.fun",
    }
));
</code></pre>

It also supports the Next.js and Hono frameworks for Node.js, as well as the FastAPI and Flask frameworks for Python.

## Supported Networks

* Base (Mainnet)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.awenetwork.ai/infrastructure/overview/world.fun/x402-facilitator.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
