secure micropayments on Hathor Testnet-India only

Plug x402 into Hathor and let your endpoints charge per request.

A production-ready facilitator service that bridges HTTP 402 and Hathor transactions. Verifies signatures, validates UTXOs, prevents double-spends, and settles payments on-chain. No gas. Just signed payments and instant access.

402
HTTP Payment Ready
UTXO
Hathor native
API
REST endpoints

Facilitator live preview

Incoming 402 from /premium/reconcile

facilitator - testnet-india
$ POST /verify X-PAYMENT: base64(json payload) ✔ signature valid ✔ UTXO unspent ✔ amount 100 HTR cents $ POST /settle ⟳ pushing transaction to node... tx hash: 000056627b9ed2e97c2195... › 200 OK

Endpoints: /verify, /settle, /supported, /health

Why this stack

Built for production with security-first design. The facilitator verifies every signature, checks UTXO availability, prevents double-spends, and handles settlement—all while keeping your keys safe.

1
HTTP first
402 based gating

Drop the middleware in front of any premium endpoint. Ask for payment, receive X-PAYMENT header, verify and settle through the facilitator.

2
Hathor native
UTXO aware

We don't pretend Hathor is EVM. Full transaction parsing, signature verification, UTXO validation, and PoW checks—all built for Hathor's architecture.

3
Secure by design
no private sharing

Client signs locally. Facilitator verifies cryptographically. We check signatures against dataToSignHash, validate UTXOs aren't spent, prevent double-spends, then broadcast. Your keys never leave your wallet.

How it works

The facilitator sits between your resource server and the Hathor network. It verifies payment transactions before settlement and broadcasts them to the blockchain.

  1. Resource server replies 402 Payment Required with Hathor payment requirements (scheme, network, amount, asset, address).
  2. Client constructs a signed Hathor transaction and sends it in X-PAYMENT header (base64-encoded JSON).
  3. Resource server calls POST /verify to validate: signatures, UTXO availability, amount, PoW.
  4. If verification passes, resource server calls POST /settle to broadcast the transaction.
  5. Facilitator pushes the tx to Hathor node and waits for confirmations (if configured).
  6. Resource server returns 200 OK with the requested resource.

Getting started

Use the hosted facilitator service to integrate x402 payments into your API. Currently supports testnet-india only.

🌐
Use the hosted facilitator

The facilitator is available at:

https://facilitator.x402.tax

Three endpoints are available:

GET  /supported
POST /verify
POST /settle

Important: If /verify passes, there's a very high chance /settle will succeed. The verify endpoint checks signatures, UTXO availability, double-spend prevention, amount validation, and proof-of-work.

🔌
Integrate with your API

Call the facilitator from your resource server:

# 1. Verify payment
curl -X POST https://facilitator.x402.tax/verify \
  -H "Content-Type: application/json" \
  -H "X-PAYMENT: <base64-payload>" \
  -d '{"requirements": {...}}'

# 2. If verify succeeds, settle payment
curl -X POST https://facilitator.x402.tax/settle \
  -H "Content-Type: application/json" \
  -H "X-PAYMENT: <base64-payload>"

The verify endpoint performs comprehensive checks: signature validation, UTXO unspent verification, double-spend detection, amount matching, and PoW validation.

TypeScript SDK coming soon Coming soon

A TypeScript SDK is in development for plug-and-play client integration. The SDK will handle wallet interaction, transaction construction, and facilitator communication automatically. Perfect for frontend applications and Node.js backends.

Payment schema

The X-PAYMENT header contains a base64-encoded JSON payload with the transaction and requirements. Here's the structure:

{
  "scheme": "exact",
  "network": "hathor-testnet",
  "payload": {
    "txHex": "0001000102...",
    "dataToSignHash": "621c94a7c634a6d4d2efc2440e744b31b24cecf3fd0cb0a0ea57674c279a163a"
  },
  "requirements": {
    "amount": 100,
    "asset": "00",
    "address": "WQ3emmxYypZduTsRgA7x6s1Bj5GqsPcnmo"
  }
}

Fields:
scheme: Payment scheme type (currently only "exact")
network: "hathor-testnet" or "hathor-mainnet" (testnet-india currently)
txHex: Fully signed Hathor transaction in hex format
dataToSignHash: 64-char hex hash from tx-proposal (for signature verification)
amount: Payment amount in smallest unit (100 = 1.00 HTR)
asset: "HTR" or "00" for native token
address: Merchant address to receive payment

API endpoints

The facilitator exposes four HTTP endpoints for payment verification and settlement.

POST /verify

Verifies a payment transaction without broadcasting. Checks signatures, UTXO availability, amount, and PoW.

Response: {
  "success": true
}
📤
POST /settle

Broadcasts the verified transaction to the Hathor network and waits for confirmations (if configured).

Response: {
  "success": true,
  "txID": "000056627b..."
}
📋
GET /supported

Returns supported payment schemes, networks, and assets that this facilitator accepts.

Response: {
  "success": true,
  "schemes": [{
    "scheme": "exact",
    "networks": ["hathor-mainnet", "hathor-testnet"],
    "assets": ["HTR", "00"]
  }]
}
💚
GET /health

Health check endpoint to verify the facilitator service is running and responsive.

Response: {
  "status": "healthy",
  "service": "hathor-facilitator"
}