# Basic Concepts

#### Understanding Transactions

In Momo Suite, transactions are the core of mobile money operations. Each transaction represents either a money collection (receive) or disbursement (send) operation.

**Transaction Types**

1. **Receive Money (Collection)**
   * Customer sends money to your account
   * Typically used for payments and collections
   * Initiated by calling the `receive()` method
2. **Send Money (Disbursement)**
   * You send money to a customer
   * Used for refunds, payouts, or disbursements
   * Initiated by calling the `send()` method

**Transaction States**

* **Pending**: Initial state when transaction is created
* **Success**: Transaction completed successfully
* **Failed**: Transaction failed to complete

**Transaction Properties**

```php
use Rais\MomoSuite\Models\Transaction;
$transaction = Transaction::find($id);

// Basic Information
$transaction->transaction_id;    // Unique identifier
$transaction->type;             // 'receive' or 'send'
$transaction->amount;           // Transaction amount
$transaction->status;           // Current status
$transaction->provider;         // Payment provider used
$transaction->network;          // Mobile network (MTN, Vodafone, etc.)

// Customer Information
$transaction->phone;            // Customer's phone number
$transaction->reference;        // Your reference for this transaction

// Timestamps
$transaction->created_at;       // When transaction was created
$transaction->updated_at;       // Last status update time
```

#### Provider Architecture

Momo Suite uses a provider-based architecture to support multiple payment services.

**Provider Structure**

```php
// Setting up a provider
Momo::setProvider('hubtel');  // Use Hubtel provider
Momo::setProvider('korba');   // Use Korba provider
Momo::setProvider('paystack'); // Use Paystack provider
```

**Supported Providers**

1. **Hubtel**
   * Full-featured provider
   * Supports all major networks
   * Real-time status updates
2. **Korba**
   * Direct integration
   * Comprehensive API
   * Webhook support
3. **Paystack**
   * Mobile money collection
   * Bank transfers
   * Advanced features

#### Dashboard Overview

The Momo Suite dashboard provides a comprehensive view of your mobile money operations.

**Key Features**

1. **Transaction Overview**
   * Total volume
   * Success rate
   * Pending transactions
   * Failed rate
2. **Transaction Volume Chart**
   * Daily transaction volume
   * Filter by total/receive/send
   * Date range selection
3. **Network Distribution**
   * Visual breakdown by network
   * Filter by transaction type
   * Percentage distribution
4. **Recent Transactions**
   * Live transaction list
   * Quick status checks
   * Detailed transaction view

**Navigation**

The dashboard is organized into several sections:

* **Overview**: Main dashboard with key metrics
* **Transactions**: Detailed transaction list and management
* **Users**: User management (for admin users)
