API

Our API

API

This guide shows how to connect with our system via API

Base URL: https://ewealthconcept.com/api/
Type: Rest API

Authentication

This API uses Basic Authentication method for all api calls. To use Base64 encode your username and password separated by colon symbol. E.g:

$auth = base64_encode('username'.':'.'password');


Get data plans

Endpoint: /get_data_plan
Method: POST
Network IDs: MTN - 1, GLO - 2, 9mobile - 3, Airtel - 4

Parameters:
network - Network ID

Sample response:
stdClass Object
(
    [status] => success
    [data] => stdClass Object
        (
            [plan] => Array
                (
                    [0] => stdClass Object
                        (
                            [id] => 1
                            [title] => 50 MB - 30 days (Corporate)
                            [price] => 30
                        )
                    [1] => stdClass Object
                        (
                            [id] => 2
                            [title] => 150 MB - 30 days (Corporate)
                            [price] => 100
                        )
                )
        )
)


Data

Endpoint: /data
Method: POST

Parameters:
plan - Plan ID
tell - Phone number

Sample response:
stdClass Object
(
    [status] => success
)


Recharge

Endpoint: /recharge
Method: POST
Network IDs: MTN - 1, GLO - 2, 9mobile - 3, Airtel - 4

Parameters:
amount - Recharge amount
tell - Phone number
network - Network ID

Sample response:
stdClass Object
(
    [status] => success
)


Data Print

Endpoint: /data_print
Method: POST

Parameters:
value - Amount value
quantity - Pin quantity
plan - Plan ID
title - Pin title

Sample response:
stdClass Object
(
    [status] => success
    [value] => 100
    [quantity] => 3
    [network] => MTN
    [title] => 'Onecrib House'
    [plan] => 1GB
    [instruction] => Dial *7006*30*pin#
    [data] => stdClass Object
        (
            [pin] => Array
                (
                    [0] => 271442311215
                    [1] => 945598191362
                    [2] => 571577678383
                )

        )

)


Recharge Print

Endpoint: /recharge_print
Method: POST
Network IDs: MTN - 1, Airtel - 2, GLO - 3, 9mobile - 4

Parameters:
value - Amount value
quantity - Pin quantity
network - Network ID
title - Pin title

Sample response:
stdClass Object
(
    [status] => success
    [value] => 100
    [quantity] => 3
    [network] => MTN
    [title] => Onecrib House
    [instruction] => Dial *630*89*pin#
    [data] => stdClass Object
        (
            [pin] => Array
                (
                    [0] => 577331192612
                    [1] => 767835421514
                    [2] => 193621274419
                )

        )

)


TV Plans

Endpoint: /tv_plan
Method: POST

Parameters:
service - DStv, GOtv or Startimes
quantity - Pin quantity
network - Network ID
title - Pin title

Sample response:
stdClass Object
(
    [status] => success
    [service] => DStv
    [data] => Array
        (
            [0] => stdClass Object
                (
                    [PACKAGE_ID] => dstv-padi
                    [PACKAGE_NAME] => DStv Padi N2,950
                    [PACKAGE_AMOUNT] => 2950.00
                    [PRODUCT_DISCOUNT_AMOUNT] => 885
                    [PRODUCT_DISCOUNT] => 0.07
                )

            [1] => stdClass Object
                (
                    [PACKAGE_ID] => dstv-yanga
                    [PACKAGE_NAME] => DStv Yanga N4,200
                    [PACKAGE_AMOUNT] => 4200.00
                    [PRODUCT_DISCOUNT_AMOUNT] => 1260
                    [PRODUCT_DISCOUNT] => 0.07
                )

            [2] => stdClass Object
                (
                    [PACKAGE_ID] => dstv-confam
                    [PACKAGE_NAME] => Dstv Confam N7,400
                    [PACKAGE_AMOUNT] => 7400.00
                    [PRODUCT_DISCOUNT_AMOUNT] => 2220
                    [PRODUCT_DISCOUNT] => 0.07
                )

            [3] => stdClass Object
                (
                    [PACKAGE_ID] => dstv79
                    [PACKAGE_NAME] => DStv  Compact N12,500
                    [PACKAGE_AMOUNT] => 12500.00
                    [PRODUCT_DISCOUNT_AMOUNT] => 3750
                    [PRODUCT_DISCOUNT] => 0.07
                )
        )

)


TV subscription

Endpoint: /tv
Method: POST

Parameters:
cnumber - Customer number
service - DStv, GOtv or Startimes
plan - Tv plan index for e.g when fetching tv plans, if you have:
stdClass Object
(
    [status] => success
    [service] => DStv
    [data] => Array
        (
            [0] => stdClass Object
                (
                    [PACKAGE_ID] => dstv-padi
                    [PACKAGE_NAME] => DStv Padi N2,950
                    [PACKAGE_AMOUNT] => 2950.00
                    [PRODUCT_DISCOUNT_AMOUNT] => 885
                    [PRODUCT_DISCOUNT] => 0.07
                )

            [1] => stdClass Object
                (
                    [PACKAGE_ID] => dstv-yanga
                    [PACKAGE_NAME] => DStv Yanga N4,200
                    [PACKAGE_AMOUNT] => 4200.00
                    [PRODUCT_DISCOUNT_AMOUNT] => 1260
                    [PRODUCT_DISCOUNT] => 0.07
                )
        )
)
Here the plan index for 'DStv Padi' is 0 while that of 'DStv Yanga' is 1

Sample response:
stdClass Object
(
    [status] => success
)


DISCO List

Endpoint: /disco_list
Method: GET

Sample response:
stdClass Object
(
    [status] => success
    [data] => stdClass Object
        (
            [disco] => Array
                (
                    [0] => stdClass Object
                        (
                            [id] => 8
                            [name] => Abuja Electric
                            [code] => ABUJA
                        )

                    [1] => stdClass Object
                        (
                            [id] => 2
                            [name] => EKO Electric
                            [code] => EKO
                        )
                )

        )

)


Electricity

Endpoint: /electric
Method: POST

Parameters:
mnumber - Meter number
amount - Amount to be paid
disco - Disco code
Sample response:
stdClass Object
(
    [status] => success
    [data] => stdClass Object
        (
            [token] => | Pin: 234567898765

        )

)