Momo Suite
  • Introduction
  • Getting Started
  • Basic Concepts
  • Providers (Hubtel)
    • Korba
    • PayStack
    • ITC
  • Dashboard (Overview)
    • Transaction Detail Page
      • Status Check for Pending Transactions
      • Manual Status Update (Admin Only)
      • Transaction Timeline
      • Technical Details
  • User Management
  • Transaction Status Update Notifications
Powered by GitBook
On this page

Providers (Hubtel)

Hubtel

Configuration

  1. Add the following variables to your .env file:

HUBTEL_USERNAME=your-username
HUBTEL_PASSWORD=your-password
HUBTEL_POS_ID_SALES=your-pos-id-for-sales
HUBTEL_POS_ID_DEPOSIT=your-pos-id-for-deposit
HUBTEL_RECEIVE_URL=https://rmp.hubtel.com/merchantaccount/merchants/
HUBTEL_SEND_MONEY_URL=https://smp.hubtel.com/api/merchants/
HUBTEL_RECEIVE_STATUS_URL=https://api-txnstatus.hubtel.com/transactions/
HUBTEL_SEND_STATUS_URL=https://smrsc.hubtel.com/api/merchants/
  1. The configuration will be automatically loaded from config/momo-suite.php:

'hubtel' => [
    'username' => env('HUBTEL_USERNAME'),
    'password' => env('HUBTEL_PASSWORD'),
    'pos_id_sales' => env('HUBTEL_POS_ID_SALES'),
    'pos_id_deposit' => env('HUBTEL_POS_ID_DEPOSIT'),
    'receive_url' => env('HUBTEL_RECEIVE_URL'),
    'send_url' => env('HUBTEL_SEND_MONEY_URL'),
    'receive_status_url' => env('HUBTEL_RECEIVE_STATUS_URL'),
    'send_status_url' => env('HUBTEL_SEND_STATUS_URL'),
],

Receiving Money

To receive money using Hubtel:

use Rais\MomoSuite\Facades\Momo;

// Using Facade
$result = Momo::setProvider('hubtel')
    ->receive([
        'phone' => '0241234567',
        'amount' => 1.00,
        'network' => 'MTN',
        'reference' => 'Test Payment',
        'customer_name' => 'James Doe', // Required for Hubtel
    ]);

// Using Service Container
$momo = app('momo-suite');
$momo->setProvider('hubtel');
$result = $momo->receive([
    'phone' => '0241234567',
    'amount' => 1.00,
    'network' => 'MTN',
    'reference' => 'Test Payment',
    'customer_name' => 'James Doe',
]);

// Required Parameters:
// - phone: Customer's phone number
// - amount: Transaction amount
// - network: Mobile network (MTN, VODAFONE, AIRTELTIGO)
// - reference: Your transaction reference
// - customer_name: Customer's name (Hubtel specific requirement)

Sending Money

To send money using Hubtel:

use Rais\MomoSuite\Facades\Momo;

$result = Momo::setProvider('hubtel')
    ->send([
        'phone' => '0241234567',
        'amount' => 1.00,
        'network' => 'MTN',
        'reference' => 'Test Disbursement',
        'customer_name' => 'James Doe',
    ]);

// Required Parameters:
// - phone: Recipient's phone number
// - amount: Amount to send
// - network: Mobile network (MTN, VODAFONE, AIRTELTIGO)
// - reference: Your transaction reference
// - customer_name: Recipient's name

Webhook Handling

Hubtel sends webhook notifications for transaction updates. Configure your webhook URL in your Hubtel dashboard.

The package automatically handles webhooks at:

POST /momo/webhooks/hubtel

PreviousBasic ConceptsNextKorba

Last updated 1 month ago