# x402 Facilitator

## 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="/files/3T2metFf6BHuB2SlcJjo" 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: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.awenetwork.ai/awe-ecosystem/world.fun/x402-facilitator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
