iBilling Supports Hooks from V 4.2. You can add various features to your iBilling without editing the core files.

What is hook?

Action Hooks allow you to add your own code to iBilling. The code will run when specific events or actions occur inside the system. iBilling has over 100 different hook points. These you can tie custom code into.

Get started with Hooks

You will find hooks directory inside application. To know where the hooks directory located, click "application" directory below.

  • iBilling
    • application
      • autoload
      • controllers
      • dev
      • hooks
        • action.php
        • index.html
      • install
      • lan
      • lib
      • plugins
      • uploads
      • util
      • boot.php
      • config.php
      • functions.php
      • index.html
      • orm.php
      • plugged.php
    • ui
      • theme
        • ...
      • index.html
    • vendor
      • ...
    • index.php

Create a file inside hooks directory with any name. (e.g.- action.php)

Now add the following codes inside action.php


    global $_L;

    $_L['CRM'] = 'Customers';
    $_L['Add Contact'] = 'Add Customer';
    $_L['List Contacts'] = 'List Customers';


The possibilities with hooks are many, Here is some example when you might use hooks-

  • Registering users in another system when they signup via iBilling.
  • Sending various notifications.
  • Keeping contacts in sync with third party applications.
  • Modifying features.
  • Making Custom action when invoice is paid.

Real Life Example

Here is the some usage example

Sending SMS Notification

Here is an example to send SMS notification to client when invoice marked as paid.


    $nexmo_api_key = ''; # Nexmo API Key
    $nexmo_api_secret = ''; # Nexmo API Secret
    $from = 'iBilling'; # Message from

    // Find the client

    $client = ORM::for_table('crm_accounts')->find_one($invoice->userid);

    if($client->phone == ''){
    return false;

    $to = $client->phone;

    $text = 'Hi '.$client->account.'! Thanks for your payment. Invoice- '.$invoice->id.' Paid Successfully.';

    $url = 'https://rest.nexmo.com/sms/json?' . http_build_query(
    'api_key' =>  $nexmo_api_key,
    'api_secret' => $nexmo_api_secret,
    'to' => $to,
    'from' => $from,
    'text' => $text

    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $response = curl_exec($ch);

    return $response;


Sending Additional Email

Send a notification to admin that a new client has been registered.


    $message = 'New Client Registered. Client: '.$data['account'].' Email: '.$data['email'];

    Ib_Email::sendEmail('admin@example.com','Client Signup',$message);


Creating Custom Menu

Dynamically create menu inside iBilling.

add_menu_admin('About','#','about','fa fa-paper-plane',2,array(
    'name' => 'Documentation',
    'link' => 'http://www.ibilling.io/documentation/'
    'name' => 'Purchase',
    'link' => 'https://codecanyon.net/item/ibilling-crm-accounting-and-billing-software/11021678',
    'target' => '_blank'

Registering users in another system

After clinet signup, call api to create user to your another system.


    $name = $data['account'];
    $email = $data['email'];

    // Your logic to create account through api


Getting Support

For any support, contact me using my profile page - https://codecanyon.net/user/sadiasharmin