Pay for a Service
This section explains how an agent pays for x402 services from a spending session.
This guide takes you from installing Trellis to an agent paying for an x402 service inside a spending session.
Overview of the steps
- Install Trellis Wallet.
- Fund your main wallet.
- Create a SignetPass.
- Move funds to your spending wallet.
- Install the Signet CLI.
- Connect your agent.
- Create a spending session.
- Ask the agent to buy something.
Install Trellis Wallet
Trellis can run as a mobile app (iOS and Android) or in a web browser together with a wallet extension such as MetaMask.
- Mobile: search for Trellis Wallet in the App Store (iOS) or in Google Play (Android).
- Web: open signetpass.ai in your browser.
Fund your main wallet
A new main wallet starts with a balance of zero. You can add funds at any time by card, bank transfer or crypto.
- Open Trellis and select the Add funds tab.
- Choose how you want to pay (for example by card) and select Continue.
- Enter the amount that you want to buy.
- Follow the on-screen steps to complete the purchase.
- When the purchase settles, your Trellis main wallet balance updates.
Create a SignetPass
Select Create SignetPass. Trellis opens the creation form for the main wallet that is currently selected.
Move funds to your spending wallet
Agents spend from the spending wallet, and only within a spending session whose limits you define. You stay in control.
Select Move funds. If you do not yet have a SignetPass, Trellis opens the SignetPass creation form first. Otherwise it opens the transfer form of the SignetPass that belongs to the selected main wallet. Add only what the agent needs, and keep a small reserve: every operation, including revoking a session, is charged for its own gas.
Install the Signet CLI
In your SignetPass, open the Install Signet CLI section and copy the install code. It is valid for 24 hours and works for one agent. Create a folder for the agent (one folder is one agent), open a terminal in it and run the command that Trellis shows. It installs the signet command and the tools and protocols that your agent needs to communicate with Signet:
curl -fsSL https://signetpass.ai/install.sh | sh -s -- <INSTALL_CODE>If you work from the Claude desktop app, you can instead open the Code tab on the agent’s folder and paste this prompt into Claude:
Run this command to install SignetPass: curl -fsSL https://signetpass.ai/install.sh | sh -s -- <INSTALL_CODE>Open a new terminal, then check the installation:
signet --versionThe Claude.ai website does not work for this flow. Use the Claude desktop app, and see the Claude Desktop Quickstart. Other agents work too: signet skills install adds the Signet skills to Claude Code, Cursor, Codex and Cline.
Piping a downloaded script into a shell runs it with your privileges. Open the script address in your browser and read it first if you want to check what it does.
Connect your agent
Installing with an install code links the agent to your SignetPass. If you installed without a code, link it yourself from the agent’s folder:
signet register agent --code <INSTALL_CODE> --hereThe CLI prints a pairing code and waits. Trellis opens an Approve agent dialog that shows the same code. Check that the two codes are identical, then approve. If they differ, reject.
When the CLI prints approved, check the result:
signet agentsThe agent is now linked to your SignetPass and ready to ask for spending sessions. See Signet CLI for every option.
Create a spending session
A spending session limits what an agent can spend. You define a per-transaction limit, a total budget and an expiry (at most 30 days). Sessions are flexible. You can create a session in advance and then let the agent spend on its own whenever it needs to, without asking for your approval each time. You can also let Signet propose a session that matches the purchase the agent wants to make: you receive a notification in Trellis, review the proposal, adjust the amount if necessary and approve it.
An agent has at most one active session at a time. A new one waits as pending and, once approved and installed, replaces the current one.
You can create a session in two ways.
Option A: from the Signet CLI
signet session \
--signetpass <SIGNETPASS_ID> \
--per-tx 0.5 \
--total 1 \
--expires-in 86400 \
--task-summary "Make one weather API call"The CLI sends the request and waits. Then open Trellis, go to the agentic section and find the session request waiting for review. Check the values and approve it. Approving writes the permission on chain, which takes some tens of seconds. A request expires after 10 minutes, so approve it promptly; if it expires, run the command again.
Option B: from Trellis
- Open Trellis and go to the agentic section.
- Select Create a Spending Session.
- Check the values and approve it.
Then fetch the session key into the agent’s folder:
signet session pullIn both cases, check that the session is active:
signet sessionsThe session is now ready. The agent can use it at any time before it expires.
| Option | Meaning | Example |
|---|---|---|
--signetpass | The SignetPass that the session spends from. | <SIGNETPASS_ID> |
--per-tx | The maximum amount for a single transaction. | 0.5 |
--total | The maximum total spend for the whole session. | 1 |
--expires-in | The session lifetime, in seconds (at most 30 days). | 86400 (24 hours) |
--task-summary | A human-readable description of what the agent will do. | Make one weather API call |
Ask the agent to buy something
Open your AI in the agent’s folder (signet open <name>, or claude inside the folder) and give it a prompt such as the following:
Search for a weather API service in the bazaar catalog
Buy the service item #2Behind the scenes the agent runs signet bazaar search and then signet pay --url <buy address> --max <price>. You can run the same commands yourself, see Signet CLI.
Why a payment may be declined
| Cause | What to check |
|---|---|
| Amount above the per-transaction limit | Compare the price with --per-tx. |
| Session budget used up | Compare spending so far (signet sessions) with --total. |
| Session expired or revoked | Create a new session; the old one cannot be reused after --expires-in. |
| Price above the agent’s own ceiling | signet pay refuses terms above its --max before it signs. Raise --max, or ask for a cheaper item. |
| Wrong network | A SignetPass pays only on its own network. Check the product’s accepted payments, or search with --chain. |
| Spending wallet balance too low | Move more funds to the spending wallet. |
If the agent has no usable session for the price, signet pay proposes a new one for you to approve in Trellis. Add --no-propose for unattended runs, so that it stops instead.