API - Buy Data


Parameters:
Parameter_Name Description
username Your SubAndGain username
apiKey Your SubAndGain API Key
network MTN, GLO, AIRTEL or 9MOBILE (UPPERCASE)
dataPlan data plan code, click Here to see
phoneNumber recipient number

API Command:


https://subandgain.com/api/data.php?username=****&apiKey=****&network=****&dataPlan=****&phoneNumber=****
//Replace **** with your username, api key...

E.g.
https://subandgain.com/api/data.php?username=Peter&apiKey=sag8rqpfa8vkpn1ler56ygh8kxxw1aor8&network=MTN&dataPlan=1GB&phoneNumber=09067879810
//where username is Peter, apiKey is sag8rqpfa8vkpn1ler56ygh8kxxw1aor8, network is MTN, dataPlan = 1GB, phoneNumber is 09067879810

Response:


JSON Format:
{"status":"Approved","trans_id":"88c4r5one73","network":"MTN","dataPlan":"1GB","phoneNumber":"09067879810","api_response":"Dear Customer, You have successfully shared 1GB Data to 2349067879810.","balance":"2500"}

Else, if there is an error in your request, one of the responses below will be displayed in this format:
{"error":"ERR201","description":"Invalid Username or Api Key"}
status can be - Approved or Cancelled

Responses:
Error Description
ERR200 Username Field Is Empty
ERR201 Invalid Username or Api Key
ERR202 Invalid Recipient number
ERR203 Insufficient Balance
ERR204 Invalid Network
ERR206 Order Not Processed
ERR207 Data Plan does not tally with Network

API Query:


https://subandgain.com/api/query_data.php?username=****&apiKey=****&trans_id=****
//Replace **** with your username, api key...

E.g.
https://subandgain.com/api/query_data.php?username=Peter&apiKey=sag8rqpfa8vkpn1ler56ygh8kxxw1aor8&trans_id=88c4r5one73
//where username is Peter, apiKey is sag8rqpfa8vkpn1ler56ygh8kxxw1aor8, trans_id is 88c4r5one73

Response:


JSON Format:
{"status":"Approved","trans_id":"88c4r5one73","network":"MTN","phoneNumber":"09067879810","amount":"235","dataPlan":"1GB","api_response":"Dear Customer, You have successfully shared 1GB Data to 2349067879810."}

Else, if there is an error in your request, response will be displayed in this format:
{"error":"ERR210","description":"Transaction not found on SubAndGain"}

MTN:
Data Bundle dataPlan Type Durations
500MB 500MB SME (30 Days)
1GB 1GB SME (30 Days)
2GB 2GB SME (30 Days)
3GB 3GB SME (30 Days)
5GB 5GB SME (30 Days)
10GB 10GB SME (30 Days)
500.0MB 500.0MB CORPORATE GIFTING (30 Days)
1.0GB 1.0GB CORPORATE GIFTING (30 Days)
2.0GB 2.0GB CORPORATE GIFTING (30 Days)
3.0GB 3.0GB CORPORATE GIFTING (30 Days)
5.0GB 5.0GB CORPORATE GIFTING (30 Days)
10.0GB 10.0GB CORPORATE GIFTING (30 Days)
15.0GB 15.0GB CORPORATE GIFTING (30 Days)
20.0GB 20.0GB CORPORATE GIFTING (30 Days)
40.0GB 40.0GB CORPORATE GIFTING (30 Days)
100.0GB 100.0GB CORPORATE GIFTING (30 Days)
50.0MB 50.0MB CORPORATE GIFTING (30 Days)
150.0MB 150.0MB CORPORATE GIFTING (30 Days)
250.0MB 250.0MB CORPORATE GIFTING (30 Days)
12.0GB 12.0GB CORPORATE GIFTING (30 Days)
60.0GB 60.0GB CORPORATE GIFTING (30 Days)
20.00MB 20.00MB SME 2 (30 Days)
25.00MB 25.00MB SME 2 (30 Days)
100.00MB 100.00MB SME 2 (30 Days)
50.00MB 50.00MB SME 2 (30 Days)
500.00MB 500.00MB SME 2 (30 Days)
1.00GB 1.00GB SME 2 (30 Days)
1.50GB 1.50GB SME 2 (30 Days)
2.00GB 2.00GB SME 2 (30 Days)
3.00GB 3.00GB SME 2 (30 Days)
4.00GB 4.00GB SME 2 (30 Days)
5.00GB 5.00GB SME 2 (30 Days)
6.00GB 6.00GB SME 2 (30 Days)
7.00GB 7.00GB SME 2 (30 Days)
10.00GB 10.00GB SME 2 (30 Days)
1.000GB 1.000GB DATA AWOOF (1 Day)
3.5GB 3.5GB DATA AWOOF (2 Days)
15.000GB 15.000GB DATA AWOOF (7 Days)

GLO:
Data Bundle dataPlan Type Durations
200.0MB 200.0MB CORPORATE GIFTING (30 Days)
500.0MB 500.0MB CORPORATE GIFTING (30 Days)
1.0GB 1.0GB CORPORATE GIFTING (30 Days)
2.0GB 2.0GB CORPORATE GIFTING (30 Days)
3.0GB 3.0GB CORPORATE GIFTING (30 Days)
5.0GB 5.0GB CORPORATE GIFTING (30 Days)
10GB 10GB CORPORATE GIFTING (30 Days)

AIRTEL:
Data Bundle dataPlan Type Durations
100MB 100MB CORPORATE GIFTING (7 Days)
300MB 300MB CORPORATE GIFTING (7 Days)
500MB 500MB CORPORATE GIFTING (MONTHLY)
1GB 1GB CORPORATE GIFTING (MONTHLY)
2GB 2GB CORPORATE GIFTING (MONTHLY)
5GB 5GB CORPORATE GIFTING (MONTHLY)
15GB 15GB CORPORATE GIFTING (MONTHLY)
20GB 20GB CORPORATE GIFTING (MONTHLY)
10GB 10GB CORPORATE GIFTING (MONTHLY)
750MB 750MB GIFTING (30 Days)
1.50GB 1.50GB GIFTING (30 Days)
1.2GB 1.2GB GIFTING (30 Days)
3.00GB 3.00GB GIFTING (30 Days)
4.5GB 4.5GB GIFTING (30 Days)
6GB 6GB GIFTING (30 Days)
10.00GB 10.00GB GIFTING (30 Days)
18.00GB 18.00GB GIFTING (30 Days)
40.00GB 40.00GB GIFTING (30 Days)
75.0GB 75.0GB GIFTING (30 Days)
110.0GB 110.0GB GIFTING (30 Days)
100.0MB 100.0MB SME (7 Days)
300.0MB 300.0MB SME (7 Days)
500.0MB 500.0MB SME (30 Days)
1.0GB 1.0GB SME (30 Days)
2.0GB 2.0GB SME (30 Days)
5.0GB 5.0GB SME (30 Days)
10.0GB 10.0GB SME (30 Days)
15.0GB 15.0GB SME (30 Days)
20.0GB 20.0GB SME (30 Days)
1.00GB 1.00GB AWOOF GIFTING (2 Days)
2.00GB 2.00GB AWOOF GIFTING (2 Days)
3GB 3GB AWOOF GIFTING (7 Days)
4GB 4GB AWOOF GIFTING (30 Days)
10.000GB 10.000GB AWOOF GIFTING (30 Days)
15.00GB 15.00GB AWOOF GIFTING (30 Days)

9MOBILE:
Data Bundle dataPlan Type Durations
500MB 500MB GIFTING (7 Days)
1.5GB 1.5GB GIFTING (30 Days)
2GB 2GB GIFTING (30 Days)
3GB 3GB GIFTING (30 Days)
4.5GB 4.5GB GIFTING (30 Days)
1GB 1GB CORPORATE GIFTING (30 Days)
5GB 5GB CORPORATE GIFTING (30 Days)
1.50GB 1.50GB CORPORATE GIFTING (30 Days)
2.0GB 2.0GB CORPORATE GIFTING (30 Days)
3.0GB 3.0GB CORPORATE GIFTING (30 Days)
10.0GB 10.0GB CORPORATE GIFTING (30 Days)
500.0MB 500.0MB CORPORATE GIFTING (30 Days)

Alternative:

You can use the link below to get the all networks data bundles and prices in JSON format
https://subandgain.com/api/databundles.php