diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 0000000000..983f4efc95
--- /dev/null
+++ b/docs/README.md
@@ -0,0 +1,24 @@
+# X402 Documentation
+
+This folder contains the Mintlify documentation for X402 Protocol with emphasis on Sei Network integration.
+
+## Running Locally
+
+To run the documentation locally:
+
+1. Install Mintlify CLI:
+ ```bash
+ npm install -g mintlify
+ ```
+
+2. Start the dev server:
+ ```bash
+ cd docs
+ mintlify dev
+ ```
+
+3. Open http://localhost:3000 to view the docs
+
+## Deployment
+
+This documentation is designed to be deployed with Mintlify hosting. The configuration is already set up in `mint.json`.
diff --git a/docs/clients/fetch.mdx b/docs/clients/fetch.mdx
new file mode 100644
index 0000000000..dee7dadd1b
--- /dev/null
+++ b/docs/clients/fetch.mdx
@@ -0,0 +1,82 @@
+---
+title: "Fetch Client"
+description: "Make paid HTTP requests with the native Fetch API and x402"
+---
+
+## Fetch Client Integration
+
+Use x402 with the standard Fetch API to make paid HTTP requests. Perfect for both browser and Node.js environments.
+
+## Installation
+
+```bash
+npm install @sei-js/x402-fetch viem dotenv
+```
+
+## Basic Usage
+
+```typescript
+import { config } from "dotenv";
+import { Hex } from "viem";
+import { privateKeyToAccount } from "viem/accounts";
+import {
+ wrapFetchWithPayment,
+ decodeXPaymentResponse,
+} from "@sei-js/x402-fetch";
+
+config();
+
+const privateKey = process.env.PRIVATE_KEY as Hex;
+const baseURL = process.env.RESOURCE_SERVER_URL as string; // e.g. http://localhost:4021
+const endpointPath = process.env.ENDPOINT_PATH as string; // e.g. /weather
+const url = `${baseURL}${endpointPath}`;
+
+if (!baseURL || !privateKey || !endpointPath) {
+ console.error("Missing required environment variables");
+ process.exit(1);
+}
+
+// Create account from private key
+const account = privateKeyToAccount(privateKey);
+
+// Wrap fetch with payment handling
+const fetchWithPayment = wrapFetchWithPayment(fetch, account);
+
+// Make a paid request
+fetchWithPayment(url, {
+ method: "GET",
+})
+ .then(async (response) => {
+ const body = await response.json();
+ console.log("Response:", body);
+
+ // Decode the payment response
+ const paymentResponse = decodeXPaymentResponse(
+ response.headers.get("x-payment-response")!
+ );
+ console.log("Payment details:", paymentResponse);
+ })
+ .catch((error) => {
+ console.error("Error:", error.response?.data?.error);
+ });
+```
+
+## Environment Setup
+
+Create a `.env` file with the required configuration:
+
+```env
+# Required: Your private key for making payments
+PRIVATE_KEY=0xYourPrivateKeyHere
+
+# Required: The server URL hosting the paid API
+RESOURCE_SERVER_URL=http://localhost:4021
+
+# Required: The endpoint path to access
+ENDPOINT_PATH=/weather
+```
+
+
+ **Security Note**: Never commit private keys to version control. Use
+ environment variables or secure key management services in production.
+
diff --git a/docs/docs.json b/docs/docs.json
new file mode 100644
index 0000000000..6f9a55c57f
--- /dev/null
+++ b/docs/docs.json
@@ -0,0 +1,81 @@
+{
+ "$schema": "https://mintlify.com/mint.json",
+ "name": "x402 Documentation",
+ "theme": "mint",
+ "logo": {
+ "dark": "https://cdn.sei.io/sei.svg",
+ "light": "https://cdn.sei.io/sei.svg"
+ },
+ "description": "Official documentation for x402 Protocol - HTTP micropayments for the Sei Network and beyond. Build paid APIs, premium content, and micropayment systems.",
+ "favicon": "/favicon.ico",
+ "colors": {
+ "primary": "#9E1F19",
+ "light": "#B52A2A",
+ "dark": "#780000"
+ },
+ "contextual": {
+ "options": ["copy", "chatgpt", "claude"]
+ },
+ "navigation": {
+ "global": {
+ "anchors": [
+ {
+ "anchor": "Sei Documentation",
+ "icon": "book-open-cover",
+ "href": "https://docs.sei.io"
+ },
+ {
+ "anchor": "GitHub",
+ "icon": "github",
+ "href": "https://github.com/sei-protocol/sei-x402"
+ },
+ {
+ "anchor": "Sei Network",
+ "icon": "globe",
+ "href": "https://sei.io"
+ }
+ ]
+ },
+ "dropdowns": [
+ {
+ "dropdown": "Getting Started",
+ "icon": "rocket",
+ "pages": [
+ {
+ "group": "Introduction",
+ "pages": ["introduction", "overview", "quickstart"]
+ }
+ ]
+ },
+ {
+ "dropdown": "Facilitators",
+ "description": "Verifying and settling payments",
+ "icon": "server",
+ "pages": [
+ {
+ "group": "Getting Started",
+ "pages": ["facilitators/introduction", "facilitators/example"]
+ }
+ ]
+ },
+ {
+ "dropdown": "Client Integration",
+ "description": "Make x402 payments",
+ "icon": "code",
+ "pages": [
+ {
+ "group": "HTTP Clients",
+ "pages": ["clients/fetch"]
+ }
+ ]
+ }
+ ]
+ },
+ "footer": {
+ "socials": {
+ "github": "https://github.com/sei-protocol/sei-x402",
+ "discord": "https://discord.gg/sei",
+ "x": "https://x.com/SeiNetwork"
+ }
+ }
+}
diff --git a/docs/facilitators/example.mdx b/docs/facilitators/example.mdx
new file mode 100644
index 0000000000..b37cddaacd
--- /dev/null
+++ b/docs/facilitators/example.mdx
@@ -0,0 +1,210 @@
+---
+title: "Facilitator Example"
+description: "Complete setup guide for x402 facilitators"
+---
+
+
+ This example is for learning purposes only. Do not use it for production.
+
+## Prerequisites
+
+Before setting up a facilitator, ensure you have:
+
+- **Node.js 18+** installed
+- **Sei wallet** with some SEI for gas fees
+- **Private key** for your facilitator wallet (testnet recommended for development)
+
+## Quick Setup
+
+### 1. Install Dependencies
+
+```bash
+npm install @sei-js/x402 express dotenv
+```
+
+### 2. Environment Configuration
+
+Create a `.env` file:
+
+```env
+# Required: Your facilitator private key
+PRIVATE_KEY=0xYourPrivateKeyHere
+
+# Optional: Server port (defaults to 3000)
+PORT=3002
+```
+
+
+ **Security Note**: Never commit private keys to version control. Use
+ environment variables or secure key management services in production.
+
+
+### 3. Basic Facilitator Implementation
+
+Create `index.ts` with the following structure:
+
+```typescript
+import { config } from "dotenv";
+import express from "express";
+import { verify, settle } from "@sei-js/x402/facilitator";
+import {
+ PaymentRequirementsSchema,
+ PaymentRequirements,
+ evm,
+ PaymentPayload,
+ PaymentPayloadSchema,
+} from "@sei-js/x402/types";
+
+config();
+
+const PRIVATE_KEY = process.env.PRIVATE_KEY;
+
+if (!PRIVATE_KEY) {
+ console.error("Missing required environment variables");
+ process.exit(1);
+}
+
+const { createConnectedClient, createSigner } = evm;
+
+const app = express();
+app.use(express.json());
+
+type VerifyRequest = {
+ paymentPayload: PaymentPayload;
+ paymentRequirements: PaymentRequirements;
+};
+
+type SettleRequest = {
+ paymentPayload: PaymentPayload;
+ paymentRequirements: PaymentRequirements;
+};
+
+const client = createConnectedClient("sei-testnet");
+
+// Verification endpoint
+app.post("/verify", async (req, res) => {
+ try {
+ const body: VerifyRequest = req.body;
+ const paymentRequirements = PaymentRequirementsSchema.parse(
+ body.paymentRequirements
+ );
+ const paymentPayload = PaymentPayloadSchema.parse(body.paymentPayload);
+ const valid = await verify(client, paymentPayload, paymentRequirements);
+ res.json(valid);
+ } catch {
+ res.status(400).json({ error: "Invalid request" });
+ }
+});
+
+// Settlement endpoint
+app.post("/settle", async (req, res) => {
+ try {
+ const signer = createSigner("sei-testnet", PRIVATE_KEY as `0x${string}`);
+ const body: SettleRequest = req.body;
+ const paymentRequirements = PaymentRequirementsSchema.parse(
+ body.paymentRequirements
+ );
+ const paymentPayload = PaymentPayloadSchema.parse(body.paymentPayload);
+ const response = await settle(signer, paymentPayload, paymentRequirements);
+ res.json(response);
+ } catch (error) {
+ res.status(400).json({ error: `Invalid request: ${error}` });
+ }
+});
+
+// Supported schemes endpoint
+app.get("/supported", (req, res) => {
+ res.json({
+ kinds: [
+ {
+ x402Version: 1,
+ scheme: "exact",
+ network: "sei-testnet",
+ },
+ ],
+ });
+});
+
+app.listen(process.env.PORT || 3000, () => {
+ console.log(
+ `Server listening at http://localhost:${process.env.PORT || 3000}`
+ );
+});
+```
+
+### 4. Run Your Facilitator
+
+```bash
+npx tsx index.ts
+```
+
+
+ Your facilitator server should start and display: `Server listening at
+ http://localhost:3002`
+
+
+## API Endpoints
+
+Your facilitator exposes three main endpoints:
+
+### POST /verify
+
+Verifies x402 payment payloads without executing transactions.
+
+**Request Body:**
+
+```typescript
+{
+ paymentPayload: PaymentPayload; // x402 payment data
+ paymentRequirements: PaymentRequirements; // Payment requirements
+}
+```
+
+**Response:**
+
+```json
+{
+ "valid": true,
+ "reason": "Payment payload is valid"
+}
+```
+
+### POST /settle
+
+Settles verified payments by signing and broadcasting transactions to Sei testnet.
+
+**Request Body:**
+
+```typescript
+{
+ paymentPayload: PaymentPayload; // x402 payment data
+ paymentRequirements: PaymentRequirements; // Payment requirements
+}
+```
+
+**Response:**
+
+```json
+{
+ "transactionHash": "0x...",
+ "status": "success"
+}
+```
+
+### GET /supported
+
+Returns supported payment schemes and networks.
+
+**Response:**
+
+```json
+{
+ "kinds": [
+ {
+ "x402Version": 1,
+ "scheme": "exact",
+ "network": "sei-testnet"
+ }
+ ]
+}
+```
diff --git a/docs/facilitators/introduction.mdx b/docs/facilitators/introduction.mdx
new file mode 100644
index 0000000000..196a28134b
--- /dev/null
+++ b/docs/facilitators/introduction.mdx
@@ -0,0 +1,139 @@
+---
+title: "Facilitator Introduction"
+description: "Understanding the role of facilitators in the x402 protocol"
+---
+
+## What is a Facilitator?
+
+The facilitator is an optional but recommended service that simplifies the process of verifying and settling payments between clients (buyers) and servers (sellers).
+
+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.
+
+
+ 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.
+
+
+## Facilitator Responsibilities
+
+
+
+ Confirm that the client's payment payload meets the server's declared
+ payment requirements
+
+
+ Submit validated payments to the blockchain and monitor for confirmation
+
+
+ Return verification and settlement results to the server, allowing the
+ server to decide whether to fulfill the client's request
+
+
+ Ensure standardized verification and settlement flows across services
+
+
+
+## Why Use a Facilitator?
+
+Using a facilitator provides several key benefits:
+
+
+
+ Servers do not need to interact directly with blockchain nodes or implement
+ complex payment verification logic.
+
+
+{" "}
+
+
+ Standardized verification and settlement flows across services ensure reliable
+ payment processing.
+
+
+{" "}
+
+
+ Services can start accepting payments with minimal blockchain-specific
+ development required.
+
+
+
+ Accurate, real-time validation of transactions without maintaining
+ blockchain infrastructure.
+
+
+
+
+ While it is possible to implement verification and settlement locally, using a
+ facilitator accelerates adoption and ensures correct protocol behavior.
+
+
+## Interaction Flow
+
+The following diagram shows how clients, servers, and facilitators interact in the x402 protocol:
+
+```mermaid
+sequenceDiagram
+ participant C as Client
+ participant S as Server
+ participant F as Facilitator
+ participant B as Blockchain
+
+ C->>S: 1. HTTP Request
+ S->>C: 2. 402 Payment Required + Payment Details
+ C->>C: 3. Create Payment Payload
+ C->>S: 4. HTTP Request + X-PAYMENT header
+ S->>F: 5. POST /verify (Payment Payload + Details)
+ F->>S: 6. Verification Response
+
+ alt Payment Valid
+ S->>S: 7. Fulfill Request
+ S->>F: 8. POST /settle (Payment Payload + Details)
+ F->>B: 9. Submit Payment Transaction
+ B->>F: 10. Transaction Confirmation
+ F->>S: 11. Payment Execution Response
+ S->>C: 12. 200 OK + Resource + X-PAYMENT-RESPONSE
+ else Payment Invalid
+ S->>C: 402 Payment Required
+ end
+```
+
+### Step-by-Step Breakdown
+
+1. **Client** makes an HTTP request to a **resource server**
+2. **Resource server** responds with a `402 Payment Required` status and payment details
+3. **Client** creates a payment payload based on the selected payment scheme
+4. **Client** sends the request with `X-PAYMENT` header containing the payment payload
+5. **Resource server** verifies the payment via the facilitator's `/verify` endpoint
+6. **Facilitator** performs verification and returns a verification response
+7. If valid, the **resource server** fulfills the request
+8. **Resource server** settles payment via the facilitator's `/settle` endpoint
+9. **Facilitator** submits the payment to the blockchain
+10. **Facilitator** waits for blockchain confirmation
+11. **Facilitator** returns execution response to the server
+12. **Resource server** returns the requested resource with settlement details
+
+## Getting Started
+
+Ready to implement a facilitator? Choose your path:
+
+
+
+ **Self-hosted Facilitator** Complete setup guide for running your own
+ facilitator instance
+
+
+ **Quick Integration** Add payment processing to your existing Express.js
+ application
+
+
+
+## Summary
+
+The facilitator acts as an independent verification and settlement layer within the x402 protocol. It helps servers confirm payments and submit transactions onchain without requiring direct blockchain infrastructure, making it easier to build and deploy payment-enabled APIs.
diff --git a/docs/introduction.mdx b/docs/introduction.mdx
new file mode 100644
index 0000000000..0a1e4bcef7
--- /dev/null
+++ b/docs/introduction.mdx
@@ -0,0 +1,146 @@
+---
+title: Welcome to x402 Protocol on Sei
+description: HTTP micropayments for the Sei Network and beyond. Build paid APIs, premium content, and micropayment systems.
+icon: "rocket"
+---
+
+## Build Paid APIs on Sei
+
+x402 Protocol brings HTTP micropayments to the Sei Network, enabling you to monetize APIs, premium content, and digital
+services with instant, low-cost payments. Whether you're building AI APIs, data feeds, or premium content platform,
+x402 makes it simple to add payment gates to any HTTP endpoint.
+
+**Works with Sei's advantages:** Sei's fast finality, low gas fees, and EVM compatibility make it perfect for micropayments. X402 leverages these features to enable seamless payment flows that complete in milliseconds.
+
+
+
+ Build your first paid API on Sei in under 10 minutes
+
+
+ Learn how x402 leverages Sei's unique features
+
+
+
+## Why X402 on Sei?
+
+
+
+ Sei's 400ms finality and low gas fees make micropayments practical. Perfect
+ for pay-per-request APIs and streaming content.
+
+
+ Use familiar tools like Viem, Ethers.js, and Hardhat. All existing Ethereum
+ tooling works seamlessly on Sei.
+
+
+ Integrates with Sei wallets, MetaMask, and any EIP-6963 compatible wallet
+ for smooth user experiences.
+
+
+
+## How x402 Works
+
+x402 adds payment headers to HTTP requests, enabling servers to require payment before processing requests:
+
+```mermaid
+graph TD
+ A[Client Request] --> B[Server Check]
+ B --> C{Payment Required?}
+ C -->|No| D[Return Content]
+ C -->|Yes| E[Return 402 + Payment Info]
+ E --> F[Client Creates Payment]
+ F --> G[Payment to Blockchain]
+ G --> H[Client Retries with Payment Header]
+ H --> I[Server Verifies Payment]
+ I --> J[Return Protected Content]
+```
+
+## Use Cases on Sei
+
+
+
+ **Charge per AI inference** Monetize LLM APIs, image generation, or data
+ processing with per-request payments.
+
+
+ {" "}
+
+
+ **Subscription & pay-per-view** Create premium content with flexible payment
+ models - subscriptions, one-time payments, or time-based access.
+
+
+ {" "}
+
+
+ **Real-time data access** Monetize market data, weather APIs, or any real-time
+ information feed with instant payments.
+
+
+
+ **Content delivery payments** Pay for bandwidth, storage, or compute
+ resources on a per-use basis with streaming payments.
+
+
+
+## Package Ecosystem
+
+
+
+ **Client-side payments** Add X402 payment capabilities to any
+ TypeScript/JavaScript application.
+
+
+ {" "}
+
+ {" "}
+
+
+ **Server-side payment processing** Accept and verify X402 payments in your
+ Node.js applications.
+
+
+ {" "}
+
+ {" "}
+
+
+ **Express.js middleware** Add payment gates to Express routes with simple
+ middleware.
+
+
+ {" "}
+
+ {" "}
+
+
+ **Next.js integration** Full-stack Next.js applications with built-in payment
+ support.
+
+
+ {" "}
+
+ {" "}
+
+
+ **Hono framework support** Lightweight payments for edge computing and
+ serverless functions.
+
+
+
+ **Drop-in paywall system** Complete paywall solution with customizable UI
+ components.
+
+
diff --git a/docs/overview.mdx b/docs/overview.mdx
new file mode 100644
index 0000000000..546ac9e85c
--- /dev/null
+++ b/docs/overview.mdx
@@ -0,0 +1,50 @@
+---
+title: Protocol Overview
+description: Understanding x402 HTTP micropayments and how they work on Sei Network
+icon: "bolt"
+---
+
+# x402 Protocol Overview
+
+x402 transforms any HTTP endpoint into a paid service using blockchain micropayments. Originally designed as an extension to HTTP status codes, X402 enables seamless monetization of APIs, content, and digital services.
+
+## How x402 Works
+
+The protocol adds payment capabilities to standard HTTP by introducing payment headers and the `402 Payment Required` status code:
+
+```mermaid
+graph TD
+ A[Client Request] --> B[Server Check]
+ B --> C{Payment Required?}
+ C -->|No| D[Return Content]
+ C -->|Yes| E[Return 402 + Payment Info]
+ E --> F[Client Creates Payment]
+ F --> G[Payment to Blockchain]
+ G --> H[Client Retries with Payment Header]
+ H --> I[Server Verifies Payment]
+ I --> J[Return Protected Content]
+```
+
+## Core Components
+
+
+
+ **HTTP Payment Required** Standard HTTP status indicating payment is needed
+ to access the resource.
+
+
+ **X-402-Payment Headers** Cryptographic proof of payment embedded in HTTP
+ requests.
+
+
+
+
+
+ **Payment Processors** Server-side components that handle payment
+ verification and enforcement.
+
+
+ **Payment Makers** Client libraries that automatically handle payment
+ creation and retry logic.
+
+
diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx
new file mode 100644
index 0000000000..a585ca4cd8
--- /dev/null
+++ b/docs/quickstart.mdx
@@ -0,0 +1,152 @@
+---
+title: Quick Start Guide
+description: Build your first paid API on Sei Network in under 10 minutes with x402
+icon: "bolt"
+---
+
+## Prerequisites
+
+Before you begin, ensure you have the following:
+
+
+
+ **Required for running x402 applications:**
+ - **Node.js** (v18 or higher) - Required for running x402 packages
+ - **npm, yarn, or pnpm** - For package management
+
+
+ Verify your installation: `node --version` should output v18.0.0 or higher
+
+
+
+
+ **Required for testing payments:**
+ - **MetaMask** or **Compass Wallet** - For signing transactions
+ - **Sei Testnet configured** - Add Sei testnet to your wallet
+ - **Test SEI tokens** - Get from [Sei Faucet](https://docs.sei.io/learn/faucet)
+
+
+ Sei testnet details: Chain ID `1328`, RPC `https://evm-rpc-testnet.sei-apis.com`
+
+
+
+
+
+## Create Your First Paid API
+
+
+
+ Create a new project and install the required packages:
+
+
+ ```bash npm
+ mkdir my-paid-api && cd my-paid-api
+ npm init -y
+ npm install @sei-js/x402-express express dotenv
+ ```
+
+ ```bash yarn
+ mkdir my-paid-api && cd my-paid-api
+ yarn init -y
+ yarn add @sei-js/x402-express express
+ ```
+
+ ```bash pnpm
+ mkdir my-paid-api && cd my-paid-api
+ pnpm init -y
+ pnpm add @sei-js/x402-express express
+ ```
+
+
+
+ **Expected outcome:** Project directory created with x402 dependencies installed.
+
+
+
+
+
+ **Facilitator Might be Required**: The code references `facilitatorUrl` environment variable that need to be configured. You'll need to set up a facilitator to process payments or use a public facilitator. See the [Facilitator Example](/facilitators/example) here.
+
+ Create `server.js` with a protected API endpoint:
+
+ ```javascript
+ import {config} from "dotenv";
+ import express from "express";
+ import {paymentMiddleware, Resource} from "x402-express";
+ config();
+
+ const facilitatorUrl = process.env.FACILITATOR_URL as Resource;
+ const payTo = process.env.ADDRESS as `0x${string}`;
+
+ if (!facilitatorUrl || !payTo) {
+ console.error("Missing required environment variables");
+ process.exit(1);
+ }
+
+ const app = express();
+
+ app.use(
+ paymentMiddleware(
+ payTo,
+ {
+ "GET /weather": {
+ // USDC amount in dollars
+ price: "$0.001",
+ network: "sei-testnet",
+ },
+ {
+ url: facilitatorUrl,
+ },
+ ),
+ );
+
+ app.get("/weather", (req, res) => {
+ res.send({
+ report: {
+ weather: "sunny",
+ temperature: 70,
+ },
+ });
+ });
+
+ app.listen(4021, () => {
+ console.log(`Server listening at http://localhost:${4021}`);
+ });
+
+ ```
+
+
+ **Expected outcome:** Express server configured with x402 payment middleware.
+
+
+
+
+ Start your server and test the payment requirement:
+
+ ```bash
+ node server.js
+ ```
+
+ In another terminal, try accessing the protected endpoint:
+
+ ```bash
+ curl http://localhost:3000/weather
+ ```
+
+
+ **Expected outcome:** You should receive a `402 Payment Required` response with payment details.
+
+
+ Example response:
+ ```json
+ {
+ "error": "Payment Required",
+ "amount": "0.01",
+ "currency": "SEI",
+ "recipient": "YOUR_WALLET_ADDRESS",
+ "network": "sei-testnet"
+ }
+ ```
+
+
+