Integrations
x402 Bridge
HTTP 402 payment protocol bridge. Agents pay for API access via TON without direct blockchain interaction.
Quick Setup
Add the x402 bridge as an MCP server in your IDE:
Opens Cursor and installs the MCP server automatically.
Or add manually to .cursor/mcp.json
{
"mcpServers": {
"enact-x402": {
"command": "node",
"args": ["./x402-bridge/dist/index.js"],
"env": {
"FACTORY_ADDRESS": "EQA3t7...",
"WALLET_MNEMONIC": "word1 word2 ... word24"
}
}
}
}Manual Setup
Terminal
cd x402-bridge npm install npm run build npm start
Payment Flow
1
Vendor registers — Creates an HTTP endpoint gated behind payment
2
Agent sends GET — Receives 402 Payment Required with payment details
3
Agent pays — Makes payment via TON
4
Agent sends POST — Includes X-PAYMENT header containing payment proof
5
Vendor verifies — Verifies payment, funds the job on-chain, returns 200 OK
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /jobs/:id/pay | Returns 402 PaymentRequirements |
| POST | /jobs/:id/pay | Verify & fund → 200 { status: "funded" } |
| GET | /health | Health check |