Skip to main content

Wallet API

Manage wallets for on-chain transactions and payments. Supports session-based wallets, Coinbase Developer Platform (CDP) wallets, and Tempo network balance queries.

Get wallet

Returns wallet information. Behavior depends on whether an address query parameter is provided and on your server configuration.

Tempo balance query

When the address query parameter is present, the endpoint queries the Tempo blockchain for the wallet’s balance and fee token information.

Query parameters

Response

Response fields

Balance values are formatted to 6 decimal places. pathUSD uses 6 decimals, not 18. The network is determined server-side by the TEMPO_TESTNET environment variable.

Errors

CDP / session wallet query

When no address parameter is provided, the endpoint returns CDP or session-based wallet information. When CDP is configured, returns CDP status without authentication. Otherwise, requires session authentication.

Response (CDP configured)

Response (user wallet exists)

Response (no wallet)

Errors

Wallet actions

Requires session authentication.

Request body

Action: create

Creates a new wallet for the authenticated user.
Returns 400 if a wallet already exists.

Action: get_seed

Returns wallet metadata. Private keys are stored encrypted server-side and are never exposed.

Action: export_seed

Seed export is disabled for security. Returns 403.

Errors

Get CDP wallet address

Returns the address of the CDP Agentic Wallet.

Response (authenticated)

Response (not authenticated)

When the CDP wallet address cannot be retrieved, the response includes authenticated: false and needsAuth: true. The remaining fields vary by failure reason:
If the failure is caused by a configuration error, the response includes error and setup fields instead of message:

Create CDP wallet

Creates a new wallet using the Coinbase Developer Platform SDK.

Request body

Response

Errors

CDP wallet status

Returns supported chain information for the CDP wallet.

Create CDP wallet client

Creates a viem wallet client on Base Sepolia.

Request body

Response

USDC transfer validation

When transferring USDC through the wallet service, the following validation rules apply:
  • The transfer amount must be a positive finite number. Values such as NaN, Infinity, negative numbers, and zero are rejected.
  • Amounts are rounded to 6 decimal places (USDC precision). If the rounded value equals zero, the transfer is rejected.
These checks run before any on-chain transaction is initiated.
When payments are initiated through the x402 pay action, additional protections apply: a per-payment maximum of $100, recipient address format validation (EVM or Solana), and audit logging of every payment attempt. See the x402 gateway reference for details.

Wallet top-up

Fund your wallet via Stripe checkout to credit your payment session balance.

Create checkout session

Creates a Stripe checkout session for wallet top-up. Requires session authentication.

Query parameters

Response

Errors

Stripe webhook

Handles the Stripe checkout.session.completed webhook to credit the user’s wallet after payment. This endpoint verifies the Stripe webhook signature before processing.
This endpoint is called by Stripe, not by your application. Configure your Stripe webhook to point to this URL with the checkout.session.completed event.

Errors

MPP payment sessions

Payment sessions enable off-chain, per-call billing for agent requests. Instead of settling every call on-chain, you deposit funds into a session and sign lightweight vouchers that are batched and settled periodically. When you send a request to the gateway with X-Session-Id and X-Wallet-Address headers, the gateway auto-debits your session balance and returns the updated balance in the X-Session-Remaining response header. See MPP payments — sessions for the full protocol description.

List sessions

Returns all sessions (active and closed) for the given wallet address.

Query parameters

Response

Get session

Returns a single session by ID.

Query parameters

Response

Errors

Session fields

Create session

Opens a new payment session. If the wallet already has an active session, the existing session is returned instead.

Request body

Response (201 Created)

Response (existing session)

Errors

Close session

Closes an active session. Any pending vouchers are settled on-chain first, and the remaining balance is returned to the user.

Query parameters

Response

Errors

Submit voucher

Submits a signed voucher to debit the session balance off-chain. This is the primary billing mechanism during an active session — each agent call produces one voucher.

Request body

The voucher amount is determined automatically from the plugin’s pricing. See plugin pricing for current rates.

Response

Response fields

Errors