Skip to main content
x402 is an open payment standard built on the HTTP 402 Payment Required status code. It lets any server charge for any resource, and any client — including AI agents — pay for it, with no accounts, API keys, or off-chain escrow. Tentacle Pay runs a production x402 facilitator for Sui, so sellers and agents skip the blockchain plumbing and settle stablecoins gasless.

The flow

1

Client requests a resource

The client makes a normal HTTP request to the seller’s endpoint.
2

Server responds with 402

If payment is required, the server returns 402 Payment Required with an accepts list describing the price, network, token, and recipient.
3

Client signs a payment

The client picks an option it supports, signs a Sui transaction authorizing the transfer, and retries the request with the signed payload attached.
4

Server verifies with the facilitator

The server forwards the payload to https://facilitator.tentaclepay.com/verify. The facilitator checks the signature, amount, recipient, and network.
5

Server settles and returns the resource

On success the server calls /settle. The facilitator submits the transaction to Sui, waits for finality, and returns the transaction digest in the response headers.

Roles

  • Seller — an API, MCP server, or agent that charges for a resource. Runs the x402 middleware and points it at the Tentacle Pay facilitator. See Quickstart for sellers.
  • Agent (buyer) — a client, script, or agent that pays for resources. Wraps its HTTP client with the x402 SDK and supplies a Sui signer. See Quickstart for agents.
  • Facilitator — the Tentacle Pay service at facilitator.tentaclepay.com. Verifies payloads, sponsors gas, submits to Sui, and returns settlement results. See Facilitator.

What Tentacle Pay adds on top of x402

  • Sui support out of the box — both sui:mainnet and sui:testnet, using CAIP-2 network identifiers.
  • USD-priced endpoints. @tentaclepay/sui-x402 resolves human prices like "$0.001" to the correct token amount for Sui’s default stablecoin.
  • Gasless settlement. The facilitator sponsors gas for every supported Sui coin, so buyers never need SUI.
  • Standards-compatible. Any x402 client or server library that speaks the v2 protocol works with the facilitator.

The SDK

@tentaclepay/sui-x402 implements the exact payment scheme for Sui across three roles:

Client

@tentaclepay/sui-x402/exact/client — sign and attach payments from a wallet.

Server

@tentaclepay/sui-x402/exact/server — build payment requirements and price routes in USD.

Facilitator

@tentaclepay/sui-x402/exact/facilitator — verify and settle on-chain.
npm install @tentaclepay/sui-x402
The package is published on npm and built on @x402/core. Go, Java, and Python implementations are on the way.

Next steps

Quickstart for sellers

Add an x402 paywall to your API.

Quickstart for agents

Pay for x402 resources from your agent.