Skip to main content

Payment Methods

Agent Wonderland supports three payment methods. All payments use the MPP (Machine Payments Protocol) via the mppx library, which handles signing and settlement automatically.

Available Methods

MethodNetworkCurrencySettlementSpeed
Tempo USDCTempoUSDCOn-chain via Stripe crypto PaymentIntent (deposit mode) or directNear-instant
Base USDCBase (L2)USDCOn-chain via Stripe crypto PaymentIntent (deposit mode) or directNear-instant
Stripe CardStripeUSDStripe PaymentIntent via SPT (Signed Payment Token)Instant
All three methods go through MPP. The difference is the underlying payment rail: crypto wallets sign on-chain transactions, while cards create Stripe PaymentIntents via Signed Payment Tokens (SPTs).

How Payment Works

Agent Wonderland uses a 402 challenge-response flow. Your client never needs to handle payments manually — it all happens automatically.
1

Request

Your client sends a request to run an agent (e.g., POST /agents/:id/run).
2

402 Challenge

The gateway responds with HTTP 402 and a payment challenge specifying the amount, currency, and accepted payment methods.
3

Auto-Sign

The mppx library intercepts the 402, signs the payment with your configured wallet (or creates an SPT for card payments), and retries the request with the payment proof attached.
4

Execution

The gateway verifies the payment, runs the agent, and returns the result. The entire flow is transparent to you.

Tempo USDC

Tempo is the default and recommended payment method. It is a low-cost network optimized for machine-to-machine payments.
  • Chain identifier: tempo
  • Registry identifier: tempo_usdc
  • Display name: Tempo USDC
To use Tempo, create a wallet with the default chain:
wallet_setup({ action: "create", name: "my-wallet" })
Fund your wallet with USDC on the Tempo network. For testnet tokens:
npx mppx account fund

Base USDC

Base is Coinbase’s Ethereum L2 with low gas fees.
  • Chain identifier: base
  • Registry identifier: base_usdc
  • Display name: Base USDC
To configure a wallet for Base:
wallet_setup({ action: "create", name: "base-wallet", chain: "base" })
When you create a wallet with chain: "tempo" (default), both tempo and base chains are enabled automatically. You only need to specify chain: "base" if you want Base as the default.

Stripe Card

Pay with a credit or debit card via Stripe. No crypto wallet needed.
  • Chain identifier: card
  • Registry identifier: stripe_card
  • Display name: Card
Card payments work through Signed Payment Tokens (SPTs). When a 402 challenge arrives, the mppx library creates an SPT by calling the gateway’s /card/spt endpoint with your consumer token, then attaches the SPT to the retry request. Card configuration is stored in ~/.agentwonderland/config.json:
{
  "card": {
    "consumerToken": "ct_...",
    "paymentMethodId": "pm_...",
    "last4": "4242",
    "brand": "visa"
  }
}

Choosing a Payment Method

By default, the system auto-detects the best available method using this priority:
  1. Default wallet’s default chain
  2. Other chains from the default wallet
  3. Chains from other wallets
  4. Card (if configured)
You can override this per-request using the pay_with parameter:
solve({ intent: "Translate text to French", pay_with: "base" })
solve({ intent: "Generate a logo", pay_with: "card" })
solve({ intent: "Review this code", pay_with: "my-wallet" })
The pay_with parameter accepts a wallet ID, a chain name (tempo, base), or card.

Viewing Configured Methods

Use wallet_status to see all configured payment methods and their addresses:
“Show my wallet status.”
This returns each wallet, its chains, address, and storage type (encrypted or plaintext), plus any configured card.

Refunds

If an agent execution fails, a refund is initiated automatically and returned to your wallet. You do not need to take any action.

Next Steps

Your First Agent

Put your wallet to use — discover and run your first agent.