Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.nonhumans.ai/llms.txt

Use this file to discover all available pages before exploring further.

Every Nonhumans agent comes with a built-in wallet that handles both fiat and crypto — no bank account integrations, no third-party payment processor setup. Your agent can check balances, send funds, create invoices, and issue its own virtual debit cards, all through the same API key that powers its email, memory, and compute. This guide walks you through the full Wallet API so your agent can transact autonomously — with the guardrails you define.
Always configure spending limits before deploying an agent that can make payments autonomously. An uncapped agent with wallet access can spend real money without further confirmation. See Spending policies below.

Supported assets and networks

Your agent’s wallet supports the following out of the box:

Fiat

USD, EUR — powered by Stripe

Stablecoins & Crypto

USDC, ETH, SOL — Coinbase & Solana

Virtual Debit Cards

Issue single-use or recurring cards in USD or EUR

Check your balance

Retrieve current balances across all fiat and crypto accounts:
import { createAgent } from '@nonhumans/sdk';

const agent = createAgent({ apiKey: process.env.NONHUMANS_API_KEY! });

const balances = await agent.wallet.balance();
// {
//   fiat:   { usd: 120.50, eur: 95.00 },
//   crypto: { usdc: 200.00, eth: 0.05, sol: 12.3 }
// }

console.log(`USD balance: $${balances.fiat.usd}`);
console.log(`USDC balance: ${balances.crypto.usdc}`);

Send a payment

Send crypto

Send USDC, ETH, or SOL to any wallet address. Specify the asset and the target network:
// Send USDC on Solana
await agent.wallet.send({
  to: '0xabc123...',
  amount: '50.00',
  asset: 'USDC',
  network: 'solana',
});
// Send ETH on Ethereum mainnet
await agent.wallet.send({
  to: '0xdef456...',
  amount: '0.01',
  asset: 'ETH',
  network: 'ethereum',
});

Send fiat

Transfer USD or EUR to a bank account or another Nonhumans agent handle:
// Send USD to a bank account via ACH
await agent.wallet.send({
  to: {
    type: 'bank',
    routingNumber: '021000021',
    accountNumber: '1234567890',
  },
  amount: '250.00',
  asset: 'USD',
  memo: 'Freelance invoice payment',
});

// Send USD to another Nonhumans agent
await agent.wallet.send({
  to: { handle: 'vendor-agent' },
  amount: '100.00',
  asset: 'USD',
});
Fiat transfers to bank accounts are processed via ACH (1–2 business days) or wire (same day, additional fee). Crypto transfers are on-chain and subject to normal network confirmation times.

Create an invoice

Your agent can issue invoices by email. The recipient receives a hosted payment page and can pay by card or crypto:
const invoice = await agent.wallet.invoice.create({
  to: 'client@acme.com',
  amount: 500,
  currency: 'USD',
  description: 'Research report — January 2025',
  dueDate: '2025-02-15',
});

console.log(`Invoice created: ${invoice.id}`);
console.log(`Payment link: ${invoice.url}`);
// https://pay.nonhumans.ai/inv_xxxxxxx
Listen for payment confirmation by polling the invoice status:
const status = await agent.wallet.invoice.get(invoice.id);

if (status.paid) {
  console.log(`Invoice ${invoice.id} paid at ${status.paidAt}`);
}
Or register a webhook to be notified instantly:
await agent.web.endpoint.register({
  path: '/invoice-paid',
  events: ['invoice.paid'],
});

Issue a virtual debit card

Your agent can create virtual debit cards — useful for purchasing SaaS subscriptions, paying for API access, or any situation where you need a card number:
const card = await agent.wallet.card.create({
  limit: 100,       // USD spending limit for this card
  currency: 'USD',
  label: 'SaaS subscriptions',
});

console.log(`Card number: ${card.number}`);
console.log(`Expiry: ${card.expiry}`);
console.log(`CVV: ${card.cvv}`);
console.log(`Billing zip: ${card.billingZip}`);
Create a single-use card for one-time purchases:
const card = await agent.wallet.card.create({
  limit: 29.99,
  currency: 'USD',
  label: 'One-time tool purchase',
  singleUse: true, // Card is invalidated after first charge
});
List all active cards:
const cards = await agent.wallet.card.list({ status: 'active' });
Cancel a card when it’s no longer needed:
await agent.wallet.card.cancel(card.id);

Spending policies

Spending policies let you define hard limits on what your agent can spend — per transaction, per day, or per category. Configure them in nonhumans.config.ts or set them programmatically:
nonhumans.config.ts
import { defineConfig } from '@nonhumans/sdk';

export default defineConfig({
  handle: 'my-agent',
  spending: {
    perTransaction: {
      maxUsd: 50.00,         // Any single payment capped at $50
    },
    daily: {
      maxUsd: 200.00,        // Total daily outflow cap
    },
    categories: {
      crypto: {
        maxUsdPerDay: 100.00, // Separate cap for crypto sends
      },
      cards: {
        maxUsdPerMonth: 50.00, // Cap all virtual card charges combined
      },
    },
    requireApproval: {
      above: 100.00,          // Human-in-the-loop for payments > $100
      notifyEmail: 'owner@yourcompany.com',
    },
  },
});

Programmatic policy update

await agent.wallet.policy.set({
  perTransaction: { maxUsd: 25.00 },
  daily: { maxUsd: 100.00 },
});
Spending policies are enforced server-side by Nonhumans — they cannot be bypassed by agent code. If a transaction exceeds a limit, the API returns a SPENDING_LIMIT_EXCEEDED error and the transfer is blocked.

Supported integrations

Coinbase

On/off-ramp fiat ↔ crypto, custody, and on-chain transfers via Coinbase.

Stripe

Fiat payments, invoicing, and virtual card issuance powered by Stripe.

Solana

Native USDC and SOL transfers on Solana with fast finality.