curl --location --request POST 'https://api.oneappgo.com/v1/cabletv' \
--header 'Authorization: Bearer SECRET_KEY' \
--form 'tvno="7528393100"' \
--form 'tv="GOTV"' \
--form 'custname="IBRAHIM MARY OPE"' \
--form 'custno="376946518"' \
--form 'amount="5000"' \
--form 'reference="OI8UYTEFYDTYTG7"'
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api.oneappgo.com/v1/cabletv',
'headers': {
'Authorization': 'Bearer SECRET_KEY'
},
formData: {
'tvno': '7528393100',
'tv': 'GOTV',
'custname': 'IBRAHIM MARY OPE',
'custno': '376946518',
'amount': '5000',
'reference': 'OI8UYTEFYDTYTG7'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.oneappgo.com/v1/cabletv',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('tvno' => '7528393100','tv' => 'GOTV','custname' => 'IBRAHIM MARY OPE','custno' => '376946518','amount' => '5000','reference' => 'OI8UYTEFYDTYTG7'),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer SECRET_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import requests
url = "https://api.oneappgo.com/v1/cabletv"
payload={'tvno': '7528393100',
'tv': 'GOTV',
'custname': 'IBRAHIM MARY OPE',
'custno': '376946518',
'amount': '5000',
'reference': 'OI8UYTEFYDTYTG7'}
files=[
]
headers = {
'Authorization': 'Bearer SECRET_KEY'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
var headers = {
'Authorization': 'Bearer SECRET_KEY'
};
var request = http.MultipartRequest('POST', Uri.parse('https://api.oneappgo.com/v1/cabletv'));
request.fields.addAll({
'tvno': '7528398333',
'tv': 'GOTV',
'custname': 'OLATUNJI OLAJIDE',
'custno': '176146518',
'amount': '200',
'reference': 'OI8UYTEFYDTYTG7'
});
request.headers.addAll(headers);
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}
{
"status": true,
"message": "Success",
"txref": "API8650294032c698",
"charged": 5030,
"newbal": 100064.8
}