Merchant Introduction
Learn how to sell services with x402 on BlockEden.xyz
Monetize Your API with x402
x402 enables you to monetize HTTP APIs and content with on-chain payments while maintaining your existing infrastructure. BlockEden.xyz provides enterprise-grade x402 facilitator services with Sui-first, multi-network support.
Key Benefits
- Zero network fees for merchants and customers
- Sub-second payment settlement on Sui blockchain
- Multi-network support: Sui, Ethereum, Base, Polygon, Avalanche, and more
- Universal compatibility with any HTTP-capable service
- Enterprise reliability: 99.9% uptime SLA
Architecture Overview
The x402 protocol enables seamless HTTP-native payments with four key components:
System Components
- Client: Initiates requests to protected resources and submits on-chain payments
- Server (Merchant): Your application that defines payment requirements, validates payments, and delivers services
- BlockEden.xyz Facilitator: Handles payment verification and settlement through standardized endpoints
- Blockchain: Executes and confirms all payment transactions (Sui, Ethereum, etc.)
How It Works
- Request: Client requests a protected resource from your server
- 402 Response: Your server returns HTTP 402 with payment details
- Payment Authorization: Client signs a payment authorization
- Verification: BlockEden.xyz facilitator verifies and settles the payment on-chain
- Delivery: Your server receives confirmation and delivers the requested resource
Getting Started
Prerequisites
Before implementing x402 on your server:
- Get a BlockEden.xyz API Key: Sign up for a free account
- Choose your blockchain: We recommend starting with Sui for fastest settlement
- Select your framework: We provide SDKs for popular frameworks
Quick Start Guides
- TypeScript
- Python
- Other Languages
Available Frameworks
- Express.js - Build an x402-enabled Express server with our step-by-step guide
- Hono - Build an ultra-fast x402-enabled Hono server
- Next.js - Build a full-stack x402-enabled Next.js application
See our Quick Start Guide for a framework-agnostic implementation.
Available Frameworks
- FastAPI - Build a high-performance x402-enabled FastAPI server
- Flask - Build a lightweight x402-enabled Flask server
See our Quick Start Guide for a framework-agnostic implementation.
The x402 protocol is language-agnostic and works with any HTTP server. See our Quick Start Guide for implementation details.
BlockEden.xyz Facilitator Configuration
Production Endpoint
https://x402.blockeden.xyz
Supported Networks
| Network | Status | Settlement Time |
|---|---|---|
| Sui | Coming Soon | <200ms |
| Ethereum | Coming Soon | ~12s |
| Base | Coming Soon | ~2s |
| Polygon | Coming Soon | ~2s |
| Avalanche | Coming Soon | ~2s |
SDK Installation
# Node.js / TypeScript
npm install x402
# Python
pip install x402
Quick Example
Here's a simple example of protecting an endpoint with x402 using Express.js:
import { paymentMiddleware } from "x402-express";
app.use(
paymentMiddleware(
process.env.ADDRESS as `0x${string}`,
{
"GET /api/premium/data": {
price: "$0.01",
network: "sui",
},
},
{
url: "https://x402.blockeden.xyz",
apiKey: process.env.BLOCKEDEN_API_KEY,
},
),
);
app.get("/api/premium/data", (req, res) => {
res.json({ data: "Premium content" });
});
Want the complete implementation? See our detailed Express.js Integration guide for step-by-step instructions, advanced features, and production deployment tips.
Next Steps
- Quick Start Guide - Get started with x402 in minutes
- Implement a Crypto Paywall - Build a complete paywall system
- Join the Waitlist - Get early access to BlockEden.xyz x402 facilitator
Additional Resources
- API Documentation: Detailed x402 protocol specification (coming soon)
- SDKs: TypeScript, Python, Rust, and Go client libraries (coming soon)
- Dashboard: Monitor transactions and manage your x402 endpoints at blockeden.xyz/dash
- Support: Get help on our Discord or GitHub
Pricing
BlockEden.xyz charges a small facilitator fee per transaction:
- Free Tier: First 1,000 transactions/month free
- Pro Tier: $0.001 per transaction after free tier
- Enterprise: Custom pricing for high-volume merchants