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

# Transaction & Ledger Management

> How to manage user wallet balances and audit the transaction ledger.

TeraWallet provides a comprehensive transaction management system to view, audit, and manually adjust customer balances.

### Auditing the Ledger

Navigate to **TeraWallet** to view every balance modification recorded by the system. The ledger provides a detailed history, including:

* **User**: The customer associated with the transaction.
* **Type**: Indicates whether it was a **Credit** (funds added) or **Debit** (funds removed).
* **Amount**: The transaction value.
* **Balance**: The user's total balance *after* the transaction was recorded.
* **Details**: A system-generated or admin-provided description (e.g., "Cashback for Order #123" or "Manual credit by Admin").
* **Date**: The timestamp of the transaction.

### Manual Credit/Debit

As an administrator, you can manually adjust a user's wallet balance.

1. Go to **TeraWallet**.
2. Select the **Customer** by searching for their username or email.
3. Hover over the user and click **Edit Balance** to access edit transaction popup window.
4. Choose the **Transaction Type** (Credit or Debit).
5. Enter the **Amount**.
6. Provide a **Description** for the ledger entry.
7. Click **Save** to apply the changes and update the user's balance.

### User Balance Management

To view all customer balances in one place:

1. Navigate to **TeraWallet**.
2. This screen shows a list of all registered users and their current wallet balance.
3. You can quickly search for a specific user to check their available funds.
4. From this screen, you can  click on any user to view user's transaction history.

### Locking User Accounts

In cases of suspected fraud or dispute, you can lock a user's wallet account:

1. Edit the user profile under **Users** > **All Users**.
2. Find the **Wallet Management** section.
3. Check the **Lock Wallet** box.
4. While locked, the user cannot:
   * Use their wallet balance at checkout.
   * Top up their wallet.
   * Receive or send transfers.

<Warning>
  Manual adjustments to the ledger should be done carefully, as they are recorded permanently in the audit trail. Always provide a clear description for future reference.
</Warning>

### Bulk Credit & Debit

From the **Wallet → Users** screen you can select multiple users and apply a bulk **Credit** or
**Debit**. A popup collects the amount and description, and bulk adjustments are tagged with the
`adjustment` category. Bulk operations are idempotent per user, so a retry after an interrupted run
will not double-credit anyone.

### Deleting Transaction Logs

The **Delete Logs** bulk action opens a modal where you choose:

* **Delete mode** — **Soft** (recoverable; rows are flagged `deleted`) or **Hard** (permanent removal).
* **Balance handling** — **Keep** (insert a single balancing entry so the user's balance is
  unchanged) or **Wipe** (let the balance settle to `0`).

Negative balances are preserved symmetrically when **Keep** is chosen.

### Exporting Transactions

Transaction history can be exported to CSV for accounting and audits. The export includes the typed
**category** column (`topup`, `cashback`, `partial_payment`, `transfer`, `refund`, `adjustment`, etc.).

### Referral Report

<Info>
  **New in 1.6.2.** Available under **TeraWallet → Referral Report**.
</Info>

When the Referrals earning action is enabled, the Referral Report lists every referral with the
referrer, type, status (pending / credited / rejected) and date, plus referrer/type/status and
date-range filters, a store-wide summary header, and a filtered CSV export.
