PaysClone API

Developers can use the following APIs to connect to PaysClone from their applications. NO ACTIVATION FEE REQUIRED!

BALANCE CHECK API

Command:

https://paysclone.com/api/balance.php?email=****&password=****

Replace **** with your email and password. E.g. https://paysclone.com/api/balance.php/?email=email@example.com&password=1234 where email is email@example.com and password is 1234.
Response:
Invalid User: email and Password incorrect

DATA API

Command:

https://paysclone.com/api/data.php?email=****&password=****&network=****&phone=***&amount=****

Parameters:
email: Use your PaysClone email
password: Your PaysClone account password
network: MTN, 9MOBILE, GLO or AIRTEL (UPPERCASE)
phone: The beneficiary (080*** format)
amount: Use the price of the data plan e.g. 250 for Etisalat 250mb
ref: Give us your preferred reference number
return_url: Provide the url for order status.

Response:
00 = Approved
01 = UnSuccessful
02 = Incomplete Parameters
03 = Insufficient Balance
04 = Wrong email or Password
05 = Invalid recipient
06 = Invalid Amount or Product/Package

These parameters will be returned in the return_url:
status, beneficiary and ref
status: Can be Approved or Cancelled
beneficiary: The phone number you ordered the data plan for
ref: The reference number you provided.

AIRTIME VTU API

Command:

https://paysclone.com/api/airtime.php?email=****&password=****&network=****&phone=****&amount=****

Parameters:
email: Use your PaysClone email
password: Your PaysClone account password
network: MTN, 9MOBILE, GLO or AIRTEL (UPPERCASE)
phone: The beneficiary (080*** format)
amount: airtime amount (50 - 50000)
Api Example: https://paysclone.com/api/airtime.php/?email=email@example.com&password=1234&network=MTN&phone=08124173066&amount=200

Response:
00 = Approved
01 = UnSuccessful
02 = Incomplete Parameters
03 = Insufficient Balance
04 = Wrong email or Password.

BILLS API

DSTV, GOTV AND STARTIMES

A customer must be validated before processing subscription. This will return the account status and associated information such as the customer’s name, customer's number, invoice period and due date.

Request can be made using the smart card number.

Command:
https://paysclone.com/api/bill_check.php?email=****&password=****&service=****&smartno=****

Parameters:
email: Use your PaysClone email
password: Your PaysClone account password
service: DSTV
JSON return format: {"details": {"accountStatus":"OPEN","firstName":"ESU","lastName":"INI OBONG BASSEY","customerType":"SUD","invoicePeriod":1,"dueDate":"2018-11-13T00:00:00+01:00","customerNumber":275953782}}

PROCESSING SUBSCRIPTION

Command:

DSTV: https://paysclone.com/api/bill.php?email=****&password=****&smartno=****&bill_type=DSTV&package=dstv_access&customer_name=****&customer_number=****

GOTV: https://paysclone.com/api/bill.php?email=****&password=****&smartno=****&bill_type=GOTV&package=gotv_value&customer_name=****&customer_number=****

STARTIMES: https://paysclone.com/api/bill.php?email=****&password=****&smartno=****&bill_type=STARTIMES&package=startimes_basic&customer_name=****&customer_number=****

PARAMETERS: email, Password, smartno, package:, customer_name(optional), customer_number(optional)

Parameters:
email: Use your PaysClone email
password: Your PaysClone account password
smartno: The decoder number
package: Package code as shown in the table below

You can use this smart number 1234567890 for testing

JSON return format:
{"code":"00","message":"Transaction Was Succesful","result":"Approved"}

Package

Package Package Code Amount
DStv Access dstv_access 2000
DStv Compact dstv_compact 6800
DStv Compact Plus dstv_compact_plus 10650
DStv Premium dstv_premium 15800
GOtv LITE gotv_lite 400
GOtv Value gotv_value 1250
GOtv Plus gotv_plus 1900
GOtv Max gotv_max 3200
StarTimes Nova startimes_nova 900
StarTimes Basic startimes_basic 1300
StarTimes Smart startimes_smart 1900
StarTimes Classic startimes_classic 2600

Response:
00 = Approved
01 = UnSuccessful
02 = Incomplete Parameters
03 = Insufficient Balance
04 = Wrong email or Password
05 = Invalid smartcard no


VALIDATING RESULT

PHP SAMPLE


$ch = curl_init ("API_URL");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER , true);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER , false);
$response = curl_exec ($ch);
curl_close ($ch);

$resp = json_decode ($response, true);
//Simple API result
if($resp['code'] == "00") {
//Order has been approved:
// Do something
}

//Automatic processing
if($resp['code'] == "00" && $resp['result'] == "Approved") {
//Order has been approved and Processed:
// Do something
}

//Manuel processing if($resp['code'] == "00" && $resp['result'] == "Pending") { //Order has been approved and is waiting to be Processed:
// Do something
}

Thanks for choosing PaysClone.