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

# Transfers

> Send payouts to bank accounts and mobile money wallets

Send payouts to bank accounts and mobile money wallets for vendor payments, salaries, refunds, or disbursements.

## Endpoints

| Endpoint                             | Method | Description                      |
| ------------------------------------ | ------ | -------------------------------- |
| `/bila/transfers`                    | GET    | List all transfers               |
| `/bila/transfers/{id}`               | GET    | Get a single transfer by ID      |
| `/bila/transfers/status/{reference}` | GET    | Get transfer by your reference   |
| `/bila/transfers/bank-account`       | POST   | Initiate a bank transfer         |
| `/bila/transfers/mobile-money`       | POST   | Initiate a mobile money transfer |

## Transfer Object

```json theme={null}
{
  "id": "txn-001",
  "reference": "payout-12345",
  "type": "bank-account",
  "status": "successful",
  "amount": 1000.00,
  "currency": "ZMW",
  "narration": "Salary payment",
  "recipient": {
    "accountNumber": "1234567890",
    "accountName": "JOHN DOE",
    "bankName": "Zambia National Commercial Bank"
  },
  "createdAt": "2024-01-15T10:30:00Z",
  "completedAt": "2024-01-15T10:31:00Z"
}
```

## Transfer Statuses

| Status       | Description                     |
| ------------ | ------------------------------- |
| `pending`    | Transfer is being processed     |
| `successful` | Transfer completed successfully |
| `failed`     | Transfer failed                 |

## Bank Transfer

Send money to a bank account:

```bash theme={null}
curl -X POST "https://api.usebila.com/api/v1/bila/transfers/bank-account" \
  -H "x-api-key: sk_test_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "accountId": "your-wallet-id",
    "amount": 1000,
    "reference": "payout-12345",
    "accountNumber": "1234567890",
    "bankId": "bank-001",
    "country": "zm",
    "narration": "Salary payment"
  }'
```

## Mobile Money Transfer

Send money to a mobile wallet:

```bash theme={null}
curl -X POST "https://api.usebila.com/api/v1/bila/transfers/mobile-money" \
  -H "x-api-key: sk_test_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 500,
    "reference": "mobile-payout-123",
    "phone": "0977123456",
    "operator": "airtel",
    "country": "zm",
    "walletId": "your-wallet-id",
    "narration": "Commission payout"
  }'
```

## Check Transfer Status

Use your reference to check the status:

```bash theme={null}
curl -X GET "https://api.usebila.com/api/v1/bila/transfers/status/payout-12345" \
  -H "x-api-key: sk_test_your_api_key"
```

## Best Practices

<AccordionGroup>
  <Accordion title="Use unique references">
    Always use unique references for each transfer to enable idempotency and easy tracking.
  </Accordion>

  <Accordion title="Resolve accounts first">
    Resolve recipient accounts before transfer to prevent failures.
  </Accordion>

  <Accordion title="Check balance before transfer">
    Verify your wallet has sufficient funds before initiating transfers.
  </Accordion>
</AccordionGroup>

<a href="/docs/api-reference" style={{ textDecoration: 'none', borderBottom: 'none', display: 'block' }}>
  <div
    style={{
  borderRadius: '16px',
  padding: '32px',
  height: '120px',
  display: 'flex',
  flexDirection: 'column',
  justifyContent: 'flex-end',
  border: '0.5px solid #f16101',
  cursor: 'pointer',
  transition: 'all 0.15s ease-in-out',
  boxShadow: '0 4px 14px 0 rgba(241, 97, 1, 0.1)',
}}
    onMouseEnter={e => {
  e.currentTarget.style.background = 'rgba(241, 97, 1, 0.05)';
  e.currentTarget.style.boxShadow = '0 6px 20px 0 rgba(241, 97, 1, 0.2)';
  e.currentTarget.style.transform = 'translateY(-2px)';
}}
    onMouseLeave={e => {
  e.currentTarget.style.background = 'transparent';
  e.currentTarget.style.boxShadow = '0 4px 14px 0 rgba(241, 97, 1, 0.1)';
  e.currentTarget.style.transform = 'none';
}}
  >
    <div style={{ fontSize: '24px', marginBottom: '8px' }}>⟡</div>
    <div style={{ fontWeight: '500', fontSize: '16px' }}>API Reference</div>
    <div style={{ opacity: 0.6, fontSize: '13px', marginTop: '4px' }}>Explore the complete API reference</div>
  </div>
</a>
