Skip to main content
The facilitator is a hosted service that does the on-chain work for x402: it verifies signed payment payloads, sponsors gas, and submits the settlement transaction to Sui. Sellers point their x402 middleware at it and never touch an RPC node.
It implements the standard x402 v2 facilitator interface, so any x402-compatible server library can use it.

What it does

  • Verifies that a payment payload is well-formed and valid for the stated requirements — signature, amount, recipient, and network.
  • Settles by submitting the transaction to Sui and waiting for finality, then returns the transaction digest.
  • Sponsors gas for whatever Sui’s native gasless transfers don’t cover — sub-cent stablecoin payments and any non-stablecoin coin — so buyers never need to hold SUI.
  • Never custodies funds. Settlement goes directly from the buyer to the seller’s payTo address. The facilitator only relays and pays for execution.

Endpoints

endpoint
Returns service metadata and the list of available endpoints.
endpoint
Checks a signed payment against payment requirements without settling. Body: { paymentPayload, paymentRequirements }. Returns whether the payment is valid.
endpoint
Submits a verified payment to Sui and waits for finality. Body: { paymentPayload, paymentRequirements }. Returns the settlement result, including the transaction digest.
endpoint
Returns the schemes, networks, and tokens the facilitator supports.
In a typical integration you don’t call these directly — the HTTPFacilitatorClient from @x402/core/server does it for you:

Supported networks

The facilitator registers the exact scheme for sui:mainnet and sui:testnet. See Supported networks for the full token list.

Gas sponsoring on Sui

Gas sponsoring is how the facilitator lets buyers pay without holding SUI — and Sui’s gas model makes it fit the x402 request/response flow exactly. A Sui transaction names a sender and a gas owner separately. For a sponsored payment the buyer is the sender and the facilitator is the gas owner. Sui also supports address-balance sponsorship: the gas owner pays from its address balance instead of pinning specific gas coin objects. In the SDK that’s an empty gas payment — setGasPayment([]) (Mysten docs). Because no gas coin objects are baked into the signed bytes, the buyer signs first and the facilitator co-signs the same bytes afterward — fully asynchronous. There’s no pre-flight round trip to reserve gas, no coin-object equivocation to manage, and no Enoki in the loop. It maps onto x402 one-to-one:
1

Facilitator advertises the sponsor

/supported returns the facilitator’s gasOwner address and gasBudget in the requirements’ extra. The facilitator can rotate across a pool of sponsor addresses to spread load.
2

Buyer builds and signs

The buyer builds a PTB that transfers the payment with 0x2::balance::send_funds, sets itself as the sender, sets the facilitator as the gas owner, and leaves the gas payment empty. It signs the bytes and returns them in the x402 payload — without contacting the facilitator first.
3

Facilitator verifies

/verify checks the PTB shape — asset, amount, recipient, the advertised gas owner, and an empty gas payment — then simulates it on-chain.
4

Facilitator co-signs and settles

/settle signs the same bytes as the sponsor and executes with both signatures, [buyerSignature, sponsorSignature]. Gas is drawn from the facilitator’s address balance.
Sui covers gas for stablecoin transfers natively, so a stablecoin payment at or above the native minimum (0.01 of the token) carries a zero gas budget — the PTB is a lone 0x2::balance::send_funds with gasPrice = 0 and an empty gas payment, and there’s nothing to sponsor. The facilitator’s address balance covers the rest: sub-cent stablecoin payments (below 0.01) and any non-stablecoin coin. Either way the buyer never holds SUI. See Supported networks.

Self-hosting

The facilitator is open source and built on @tentaclepay/sui-x402. To run your own, register the Sui exact scheme on an x402Facilitator with a FacilitatorSuiSigner — the address that sponsors gas and co-signs transactions:
Fund the sponsor address’s SUI balance so it can cover gas. Address-balance sponsorship draws from that balance, so you never select or lock individual gas coin objects — and the signer only ever signs bytes the buyer already produced, so it can run statelessly. To spread load, supply a FacilitatorSuiSigner whose getAddresses() returns several sponsor addresses; the scheme picks one per request. Expose /verify, /settle, and /supported over HTTP, and point your sellers’ HTTPFacilitatorClient at your deployment.
Most teams don’t need to self-host. The hosted facilitator at facilitator.tentaclepay.com is free and covers Sui mainnet and testnet.