> ## Documentation Index
> Fetch the complete documentation index at: https://docs.handcash.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Business Payouts

> Manage business payouts and automated payment systems

## Suggested Prompt

```text theme={null}
Read this documentation then integrate business payouts from the v3 SDK: https://docs.handcash.io/v3/business-wallet/payouts
```

## Business Wallet Authentication

Business payouts require a business wallet authentication token. You need to obtain this token through the Handcash Developer Dashboard for your business wallet.

```typescript theme={null}
import { getInstance, Connect } from '@handcash/sdk';

const sdk = getInstance({
  appId: 'your-app-id',
  appSecret: 'your-app-secret'
});

// Get business wallet client using business auth token
const businessClient = sdk.getAccountClient('<BUSINESS_WALLET_AUTH_TOKEN>');
```

## Send Business Payouts

### Basic Payout

```typescript theme={null}
// Send payout from business wallet
const payout = await Connect.pay({
  client: businessClient,
  body: {
    instrumentCurrencyCode: 'BSV',
    denominationCurrencyCode: 'USD',
    receivers: [
      {
        destination: 'recipient@handcash.io',
        sendAmount: 0.01
      }
    ]
  }
});
```

### Bulk Payouts

```typescript theme={null}
// Send multiple payouts
const bulkPayout = await Connect.pay({
  client: businessClient,
  body: {
    instrumentCurrencyCode: 'BSV',
    denominationCurrencyCode: 'USD',
    receivers: [
      {
        destination: 'user1@handcash.io',
        sendAmount: 0.01
      },
      {
        destination: 'user2@handcash.io',
        sendAmount: 0.02
      }
    ]
  }
});
```

## Business Wallet Management

### Check Balance

```typescript theme={null}
// Get business wallet balance
const balance = await Connect.getSpendableBalances({
  client: businessClient
});

console.log('Business wallet balance:', balance);
```

### Exchange Rates

```typescript theme={null}
// Get current exchange rates
const rates = await Connect.getExchangeRate({
  client: businessClient,
  path: { currencyCode: 'USD' }
});

console.log('USD to BSV rate:', rates.data?.rate);
```

## Error Handling

```typescript theme={null}
try {
  const payout = await Connect.pay({
    client: businessClient,
    body: {
      instrumentCurrencyCode: 'BSV',
      denominationCurrencyCode: 'USD',
      receivers: [
        {
          destination: 'recipient@handcash.io',
          sendAmount: 0.01
        }
      ]
    }
  });
  
  if (payout.data) {
    console.log('Payout successful:', payout.data);
  }
} catch (error) {
  console.error('Payout failed:', error.message);
}
```
