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

# Transactions

> Track and monitor all transaction activity in Busha. View history, statuses, and transaction details.

A **Transaction** in Busha Business is a historical record of any financial activity that affects an account balance. While Transfers represent the process of moving assets, Transactions represent the ledger entries that record all balance changes, providing a complete, immutable history of financial activity.

## What is a Transaction?

A Transaction is a record of a completed financial event that has impacted a balance on the Busha platform. Transactions serve as the official ledger of all account activity, providing a historical record of all balance changes, an audit trail for compliance and reconciliation, user-facing statements for account activity, and reporting data for analytics and accounting.

### Transactions vs. transfers

It's important to understand the distinction between Transactions and Transfers:

<table style={{ width: '100%', borderCollapse: 'collapse' }}>
  <thead>
    <tr>
      <th style={{ width: '20%', textAlign: 'left', padding: '12px' }}>
        Aspect
      </th>

      <th style={{ width: '40%', textAlign: 'left', padding: '12px' }}>
        Transfer
      </th>

      <th style={{ width: '40%', textAlign: 'left', padding: '12px' }}>
        Transaction
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td style={{ padding: '12px' }}>Purpose</td>
      <td style={{ padding: '12px' }}>Process of moving assets</td>
      <td style={{ padding: '12px' }}>Record of balance change</td>
    </tr>

    <tr>
      <td style={{ padding: '12px' }}>Lifecycle</td>

      <td style={{ padding: '12px' }}>
        Has multiple statuses (pending, processing, completed)
      </td>

      <td style={{ padding: '12px' }}>Always completed</td>
    </tr>

    <tr>
      <td style={{ padding: '12px' }}>Timing</td>

      <td style={{ padding: '12px' }}>
        Created when initiated, updated until complete
      </td>

      <td style={{ padding: '12px' }}>Created only when finalized</td>
    </tr>

    <tr>
      <td style={{ padding: '12px' }}>Use Case</td>
      <td style={{ padding: '12px' }}>Track asset movement in progress</td>
      <td style={{ padding: '12px' }}>View historical account activity</td>
    </tr>
  </tbody>
</table>

## Core Components of a Transaction

Every Transaction contains these essential pieces of information:

### Identification

* **`id`**: Unique identifier for the transaction
* **`reference`**: A tracking reference
* **`user_id`**: The user who owns this transaction
* **`profile_id`**: The profile (business or customer) the transaction belongs to

### Amount and value

* **`amount`**: How much was transacted
* **`currency`**: Which currency (BTC, NGN, USDT, etc.)
* **`rate`**: The exchange rate used
* **`is_fiat`**: Boolean indicating if the currency is fiat
* **`is_credit`**: Boolean indicating if this adds or removes from balance

### Balance information

The transaction response includes a complete snapshot of the account balance:

* **`total_balance`**: Total balance after the transaction
* **`available_balance`**: Balance available for immediate use
* **`pending_balance`**: Funds pending confirmation
* **`hold`**: Funds temporarily held (e.g., for open orders)
* **`savings`**: Funds in savings/locked accounts

This balance snapshot helps you reconcile accounts and verify that transactions were processed correctly.

### Transaction metadata

The `meta` object contains transaction-specific details:

#### Balance snapshot

Shows balance state after the transaction:

```json theme={null}
{
  "balance": {
    "total": "610000",
    "available": "610000"
  }
}
```

#### Amount breakdown

Detailed breakdown of amounts:

```json theme={null}
{
  "amounts": {
    "fee": "100",
    "amount_paid": "200100",
    "amount_added": "200000"
  }
}
```

#### Fee details

Fee information:

```json theme={null}
{
  "fee": {
    "amount": "100",
    "currency": "NGN"
  }
}
```

#### Price information

Transaction pricing:

```json theme={null}
{
  "price": {
    "amount": "1",
    "currency": "NGN"
  }
}
```

### Source/destination details

For deposits and withdrawals:

```json theme={null}
{
  "source": {
    "type": "bank_transfer",
    "account_name": "John Doe",
    "account_number": "0320484721"
  }
}
```

### Crypto transaction details

For blockchain transactions:

* **`address`**: Blockchain address
* **`blockchain_url`**: Link to view transaction on blockchain explorer
* **`confirmations`**: Number of blockchain confirmations received
* **`required_confirmations`**: Number of confirmations needed

### Conversion details

For buy, sell, and convert transactions:

* **`credit`**: What was added to the balance
* **`debit`**: What was removed from the balance (e.g., "USDT 10")
* **`rate`**: The conversion rate used (e.g., "NGN 1474.86")
* **`fiat_value`**: Fiat equivalent value
* **`fiat_currency`**: The fiat currency for valuation

## Transaction Types

Transactions are categorized by type to make filtering and reporting easier:

| Transaction Type | Description                                                                                          |
| ---------------- | ---------------------------------------------------------------------------------------------------- |
| **Deposits**     | Incoming deposits to Busha balances from external sources.                                           |
| **Buys**         | Cryptocurrency purchase transactions where fiat currency was used to acquire crypto.                 |
| **Sells**        | Cryptocurrency sale transactions where crypto was converted to fiat currency.                        |
| **Converts**     | Currency conversion transactions within Busha balances (crypto-to-crypto or crypto-to-fiat).         |
| **Withdrawals**  | Outgoing withdrawals from Busha balances to external accounts.                                       |
| **Fees**         | Fee transactions for various operations like deposits, withdrawals, conversions, and other services. |
