> ## 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.

# Send Payments, Issue Invoices, and Manage Your Agent Wallet

> Set up your agent's wallet to send fiat and crypto payments, issue virtual debit cards, and create invoices using the Nonhumans Wallet API.

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.

<Warning>
  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](#spending-policies) below.
</Warning>

***

## Supported assets and networks

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

<CardGroup cols={3}>
  <Card title="Fiat" icon="building-columns">
    USD, EUR — powered by Stripe
  </Card>

  <Card title="Stablecoins & Crypto" icon="coins">
    USDC, ETH, SOL — Coinbase & Solana
  </Card>

  <Card title="Virtual Debit Cards" icon="credit-card">
    Issue single-use or recurring cards in USD or EUR
  </Card>
</CardGroup>

***

## Check your balance

Retrieve current balances across all fiat and crypto accounts:

```typescript theme={null}
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:

```typescript theme={null}
// Send USDC on Solana
await agent.wallet.send({
  to: '0xabc123...',
  amount: '50.00',
  asset: 'USDC',
  network: 'solana',
});
```

```typescript theme={null}
// 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:

```typescript theme={null}
// 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',
});
```

<Note>
  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.
</Note>

***

## Create an invoice

Your agent can issue invoices by email. The recipient receives a hosted payment page and can pay by card or crypto:

```typescript theme={null}
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:

```typescript theme={null}
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:

```typescript theme={null}
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:

```typescript theme={null}
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:

```typescript theme={null}
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:

```typescript theme={null}
const cards = await agent.wallet.card.list({ status: 'active' });
```

Cancel a card when it's no longer needed:

```typescript theme={null}
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:

### Config file (recommended)

```typescript nonhumans.config.ts theme={null}
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

```typescript theme={null}
await agent.wallet.policy.set({
  perTransaction: { maxUsd: 25.00 },
  daily: { maxUsd: 100.00 },
});
```

<Warning>
  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.
</Warning>

***

## Supported integrations

<CardGroup cols={3}>
  <Card title="Coinbase" icon="bitcoin" href="/guides/integrations">
    On/off-ramp fiat ↔ crypto, custody, and on-chain transfers via Coinbase.
  </Card>

  <Card title="Stripe" icon="stripe" href="/guides/integrations">
    Fiat payments, invoicing, and virtual card issuance powered by Stripe.
  </Card>

  <Card title="Solana" icon="circle-nodes" href="/guides/integrations">
    Native USDC and SOL transfers on Solana with fast finality.
  </Card>
</CardGroup>
