Skip to content

Quick Start: Run Your First Paid Request ​

This is the fastest way to see FluxA working. In about five minutes you will:

  • install the FluxA Agent Wallet skill and CLI into your agent,
  • approve the agent and a small budget in your wallet, and
  • watch the agent call a paid API, pay for it with x402, and get the result.

Prerequisites ​

  • A FluxA Wallet account with a non-zero USDC balance. You can add funds by card, by sending USDC on Base, or by bridging from another chain. 0.10 USDC is enough for this guide.
  • An agent that can run shell commands, such as Claude Code or OpenClaw.
  • Node.js 18 or newer.

Dashboard

Step 1: Install the skill ​

Tell your agent:

text
Read and install https://fluxapay.xyz/skill.md

Or install it yourself:

bash
npx skills add -s fluxa-agent-wallet -y -g FluxA-Agent-Payment/FluxA-AI-Wallet-MCP

The skill installs the FluxA Wallet CLI (npm install -g @fluxa-pay/fluxa-wallet@latest).

The agent registers its Agent ID and asks you to link it to your wallet:

bash
fluxa-wallet init --name "My Claude Code" --client "Claude Code on macOS"
fluxa-wallet link-wallet

Open the URL that link-wallet returns and approve the agent.

Step 3: Approve a budget ​

Paid APIs need a budget, called a mandate. The agent creates one and gives you a link to sign:

bash
fluxa-wallet mandate-create \
  --desc "Up to 0.10 USDC for weather API calls over 7 days" \
  --amount 100000 \
  --seconds 604800

Open the authorizationUrl and sign. The agent checks that it's ready:

bash
fluxa-wallet mandate-status --id <mandateId>    # ready when status is "signed"

Step 4: Call a paid API ​

Paste this prompt into your agent:

text
Use FluxA Agent Wallet to get the current temperature in San Francisco from
this paid API, paying with x402 from my existing mandate:

https://router.fluxapay.xyz/api/open-meteo/v1/forecast?latitude=37.77&longitude=-122.42&current=temperature_2m

What the agent does:

  1. It calls the URL and gets HTTP 402 Payment Required with an accepts list (0.01 USDC).

  2. It pays from your mandate:

    bash
    fluxa-wallet x402 --mandate <mandateId> --payload '<full 402 response body>'
  3. It retries the request with the returned xPaymentB64 in the X-Payment header and gets the weather data.

You don't approve anything in this step: the payment fits inside the budget you already signed.

Step 5: Check the payment in your wallet ​

  • On Home, Transactions shows the new 0.01 USDC payment.
  • On AI Agents, the agent's Total Spent has gone up and its activity shows the payment.

You can also ask the agent: fluxa-wallet recent-transactions and fluxa-wallet mandates show the spend and the budget left.

Playground Spent

Where to go next ​

Released under the MIT License.