The problem
An autonomous agent that hits a paid API stalls at the paywall — it has no card, no checkout, and no human to approve the charge:402 Payment Required status code into a real payment handshake. The agent reads the price, signs a payment, and retries — and the request clears. Tentacle Pay runs that handshake on Sui, where stablecoins settle gasless and in under a second.
Core concepts
x402
An open standard built on HTTP
402 Payment Required. A server states its price; a client signs a payment; a facilitator verifies and settles it on-chain.Facilitator
A hosted service that verifies signed payments and submits them to Sui. It sponsors gas and never custodies funds — settlement goes straight to the seller.
Gasless settlement
On Sui, stablecoin transfers need no gas token. The facilitator sponsors gas for every supported coin, so agents hold only stablecoins.
dWallet
A distributed wallet powered by Ika 2PC-MPC. It signs payments for other chains using a threshold signature — no single party holds the key.
Roles
- Agent (buyer) — a client, script, or AI agent that pays for resources. It wraps its HTTP client with the x402 SDK and signs payments with a Sui wallet.
- Seller — an API, MCP server, or agent that charges for a resource. It runs x402 middleware and points it at the Tentacle Pay facilitator.
- Facilitator — the Tentacle Pay service at
facilitator.tentaclepay.com. It verifies payment payloads, sponsors gas, and settles on Sui.
The x402 flow
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.Agent signs a payment
The agent picks an option it supports, signs a Sui transaction authorizing the transfer, and retries the request with the signed payload attached.
Server verifies with the facilitator
The server forwards the payload to the facilitator’s
/verify endpoint, which checks the signature, amount, recipient, and network.Settling across chains
Some services live on other chains. Rather than make an agent fund a wallet per chain, Tentacle Pay lets it keep a single Sui wallet and pay outward from there. This uses a dWallet — a distributed wallet whose private key is split across Ika’s 2PC-MPC network, so no single party can sign alone. To pay a service on another chain, the agent:Pays USDC on Sui
The agent calls the
pay_and_sign function in the Tentacle Pay Move package, depositing USDC and asking the dWallet to sign the destination-chain payment.Gets a verifier attestation
A verifier service signs an attestation bound to this exact call — protocol, signer, amount, message, and an expiry. The on-chain contract rejects the call without it.
The dWallet signs
The Ika coordinator produces a threshold signature over the destination-chain payment authorization, valid on that chain.
Where each piece lives
| Piece | What it is | Repository |
|---|---|---|
Wallet (tpay) | The agent’s CLI wallet and MCP server | tentaclepay/tpay |
@tentaclepay/sui-x402 | The x402 SDK for Sui (client, server, facilitator) | tentaclepay/sui-x402 |
| Facilitator | The hosted x402 facilitator on Sui | tentaclepay |
| Smart contracts | The Move package for cross-chain pay_and_sign | tentaclepay |
Next steps
Set up the wallet
Install
tpay and let your agent pay for an API.x402 overview
The payment rail in depth — schemes, networks, and the facilitator.