Sample cURL
curl -X POST "http://localhost/gemdata/api/buy-airtime.php" \
-H "X-API-KEY: gmd_live_your_key" \
-H "X-API-SECRET: your_one_time_secret" \
-H "Content-Type: application/json" \
-d '{
"phone": "08030000000",
"amount": 1000
}'
Sample JS Fetch
fetch('http://localhost/gemdata/api/buy-data.php', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-KEY': 'gmd_live_your_key',
'X-API-SECRET': 'your_one_time_secret'
},
body: JSON.stringify({
phone: '08030000000',
plan: '2GB',
amount: 1500
})
}).then((res) => res.json()).then(console.log);