Integrate

Earn from x402id registrations on your platform.

Drop the x402id widget into your site and set your own platform fee. Users get a permanent ENS subname under 402bot.eth, 402api.eth, or 402mcp.eth. You and the protocol get paid atomically in the same transaction.

How the fees work

Each registration pays a protocol fee (currently 0.005 ETH) plus a platform fee that you choose. The widget shows users the breakdown line-by-line before they sign — no hidden charges. Both legs settle in one transaction through the forwarder contract.

Protocol fee
0.005 ETH
set on-chain by the registrar
Your platform fee
you choose
capped at 0.05 ETH
Settlement
1 tx
atomic, no relayer or backend

1. Drop-in for any site

Paste the snippet anywhere — WordPress, plain HTML, Webflow, anywhere a <script> tag works. The loader mounts an iframe pointed at the hosted widget.

<!-- 1. Container where the widget will mount -->
<div data-x402id
     data-treasury="0xYourPlatformTreasury"
     data-platform-fee-wei="1000000000000000"
     data-parents="402bot.eth,402api.eth,402mcp.eth"
     data-theme="light"></div>

<!-- 2. Loader script -->
<script src="https://x402id.eth.link/embed.js" async></script>

Data attributes: data-treasury (your address, required), data-platform-fee-wei (in wei), data-parents (subset of supported parents), data-theme (light or dark).

2. React / Next.js

For React apps, install the package and render the component. It uses your existing wagmi/viem context if present, or falls back to window.ethereum.

npm install @x402identity/widget-react viem
import { X402Widget } from "@x402identity/widget-react";
import { mainnet } from "viem/chains";
import { namehash, parseEther } from "viem";

<X402Widget
  registrar="0xeb9e9ea385fe28b51a3f9a7d93fb893e0a1f9633"
  forwarder="0x05af104ce913e7ef39799bfada871817d3761778"
  parents={[
    { label: "402bot.eth", node: namehash("402bot.eth") },
    { label: "402api.eth", node: namehash("402api.eth") },
    { label: "402mcp.eth", node: namehash("402mcp.eth") },
  ]}
  platformTreasury="0xYourPlatformTreasury"
  platformFeeWei={parseEther("0.001")}
  chain={mainnet}
  theme="light"
  onSuccess={(label, parentNode, txHash) => console.log("minted", label, txHash)}
/>

3. MCP server for AI agents

Let agents mint their own identities. The official MCP server exposes availability checks, pricing, minting, and resolution as tools for Claude, Cursor, or any MCP-compatible client. By default it runs prepare-only — mint tools return an encoded transaction for the user's wallet to sign, no key custody. Set X402_PRIVATE_KEY for autonomous agent minting.

npx -y @x402identity/mcp
{
  "mcpServers": {
    "x402id": {
      "command": "npx",
      "args": ["-y", "@x402identity/mcp"],
      "env": {
        "X402_PLATFORM_TREASURY": "0xYourPlatformTreasury",
        "X402_PLATFORM_FEE_WEI": "1000000000000000"
      }
    }
  }
}

Tools: check_availability, get_price, register_subname, batch_register, resolve_identity, list_names. The optional platform env vars route mints through the forwarder so you earn the same fee as the widget — leave them out for fee-free protocol pricing. @x402identity/mcp on npm

Contracts

Forwarder (entry point)
0x05af104ce913e7ef39799bfada871817d3761778

Splits payment between protocol and your treasury. The widget calls this — you don't need to interact with it directly.

Registrar
0xeb9e9ea385fe28b51a3f9a7d93fb893e0a1f9633

Mints the subname under the chosen parent. Holds the protocol fee.

Live demo

See the widget in action with adjustable theme and platform fee — it's wired to the same mainnet forwarder you'd ship.

Open demo