cURL
curl --request POST \
--url https://test.digitaltermination.com/api/debits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data customer_first_name=GODWIN \
--data customer_last_name=HOTTOR \
--data source_country=GHA \
--data customer_msisdn=233245519485 \
--data amount=0.1 \
--data service_type=Wallet \
--data extr_id=guid-example \
--data description=ZeepayTest \
--data debit_currency=GHS \
--data debit_country=GHA \
--data mno=MTN \
--data transaction_type=DR \
--data callback_url=https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3bimport requests
url = "https://test.digitaltermination.com/api/debits"
payload = {
"customer_first_name": "GODWIN",
"customer_last_name": "HOTTOR",
"source_country": "GHA",
"customer_msisdn": "233245519485",
"amount": "0.1",
"service_type": "Wallet",
"extr_id": "guid-example",
"description": "ZeepayTest",
"debit_currency": "GHS",
"debit_country": "GHA",
"mno": "MTN",
"transaction_type": "DR",
"callback_url": "https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
customer_first_name: 'GODWIN',
customer_last_name: 'HOTTOR',
source_country: 'GHA',
customer_msisdn: '233245519485',
amount: '0.1',
service_type: 'Wallet',
extr_id: 'guid-example',
description: 'ZeepayTest',
debit_currency: 'GHS',
debit_country: 'GHA',
mno: 'MTN',
transaction_type: 'DR',
callback_url: 'https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b'
})
};
fetch('https://test.digitaltermination.com/api/debits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://test.digitaltermination.com/api/debits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "customer_first_name=GODWIN&customer_last_name=HOTTOR&source_country=GHA&customer_msisdn=233245519485&amount=0.1&service_type=Wallet&extr_id=guid-example&description=ZeepayTest&debit_currency=GHS&debit_country=GHA&mno=MTN&transaction_type=DR&callback_url=https%3A%2F%2Fwebhook.site%2F3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://test.digitaltermination.com/api/debits"
payload := strings.NewReader("customer_first_name=GODWIN&customer_last_name=HOTTOR&source_country=GHA&customer_msisdn=233245519485&amount=0.1&service_type=Wallet&extr_id=guid-example&description=ZeepayTest&debit_currency=GHS&debit_country=GHA&mno=MTN&transaction_type=DR&callback_url=https%3A%2F%2Fwebhook.site%2F3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://test.digitaltermination.com/api/debits")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("customer_first_name=GODWIN&customer_last_name=HOTTOR&source_country=GHA&customer_msisdn=233245519485&amount=0.1&service_type=Wallet&extr_id=guid-example&description=ZeepayTest&debit_currency=GHS&debit_country=GHA&mno=MTN&transaction_type=DR&callback_url=https%3A%2F%2Fwebhook.site%2F3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b")
.asString();require 'uri'
require 'net/http'
url = URI("https://test.digitaltermination.com/api/debits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "customer_first_name=GODWIN&customer_last_name=HOTTOR&source_country=GHA&customer_msisdn=233245519485&amount=0.1&service_type=Wallet&extr_id=guid-example&description=ZeepayTest&debit_currency=GHS&debit_country=GHA&mno=MTN&transaction_type=DR&callback_url=https%3A%2F%2Fwebhook.site%2F3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b"
response = http.request(request)
puts response.read_body{
"code": 411,
"zeepay_id": 123456,
"amount": 0.1,
"message": "Transaction Pending Gateway Response"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}API Endpoint
Debit Mobile Wallet
Debits a mobile wallet with the specified amount
POST
/
api
/
debits
cURL
curl --request POST \
--url https://test.digitaltermination.com/api/debits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data customer_first_name=GODWIN \
--data customer_last_name=HOTTOR \
--data source_country=GHA \
--data customer_msisdn=233245519485 \
--data amount=0.1 \
--data service_type=Wallet \
--data extr_id=guid-example \
--data description=ZeepayTest \
--data debit_currency=GHS \
--data debit_country=GHA \
--data mno=MTN \
--data transaction_type=DR \
--data callback_url=https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3bimport requests
url = "https://test.digitaltermination.com/api/debits"
payload = {
"customer_first_name": "GODWIN",
"customer_last_name": "HOTTOR",
"source_country": "GHA",
"customer_msisdn": "233245519485",
"amount": "0.1",
"service_type": "Wallet",
"extr_id": "guid-example",
"description": "ZeepayTest",
"debit_currency": "GHS",
"debit_country": "GHA",
"mno": "MTN",
"transaction_type": "DR",
"callback_url": "https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({
customer_first_name: 'GODWIN',
customer_last_name: 'HOTTOR',
source_country: 'GHA',
customer_msisdn: '233245519485',
amount: '0.1',
service_type: 'Wallet',
extr_id: 'guid-example',
description: 'ZeepayTest',
debit_currency: 'GHS',
debit_country: 'GHA',
mno: 'MTN',
transaction_type: 'DR',
callback_url: 'https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b'
})
};
fetch('https://test.digitaltermination.com/api/debits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://test.digitaltermination.com/api/debits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "customer_first_name=GODWIN&customer_last_name=HOTTOR&source_country=GHA&customer_msisdn=233245519485&amount=0.1&service_type=Wallet&extr_id=guid-example&description=ZeepayTest&debit_currency=GHS&debit_country=GHA&mno=MTN&transaction_type=DR&callback_url=https%3A%2F%2Fwebhook.site%2F3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://test.digitaltermination.com/api/debits"
payload := strings.NewReader("customer_first_name=GODWIN&customer_last_name=HOTTOR&source_country=GHA&customer_msisdn=233245519485&amount=0.1&service_type=Wallet&extr_id=guid-example&description=ZeepayTest&debit_currency=GHS&debit_country=GHA&mno=MTN&transaction_type=DR&callback_url=https%3A%2F%2Fwebhook.site%2F3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://test.digitaltermination.com/api/debits")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("customer_first_name=GODWIN&customer_last_name=HOTTOR&source_country=GHA&customer_msisdn=233245519485&amount=0.1&service_type=Wallet&extr_id=guid-example&description=ZeepayTest&debit_currency=GHS&debit_country=GHA&mno=MTN&transaction_type=DR&callback_url=https%3A%2F%2Fwebhook.site%2F3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b")
.asString();require 'uri'
require 'net/http'
url = URI("https://test.digitaltermination.com/api/debits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "customer_first_name=GODWIN&customer_last_name=HOTTOR&source_country=GHA&customer_msisdn=233245519485&amount=0.1&service_type=Wallet&extr_id=guid-example&description=ZeepayTest&debit_currency=GHS&debit_country=GHA&mno=MTN&transaction_type=DR&callback_url=https%3A%2F%2Fwebhook.site%2F3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b"
response = http.request(request)
puts response.read_body{
"code": 411,
"zeepay_id": 123456,
"amount": 0.1,
"message": "Transaction Pending Gateway Response"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/x-www-form-urlencoded
The first name of the customer
Example:
"GODWIN"
The mobile number of the wallet to debit
Example:
"HOTTOR"
The country code of the source
Example:
"GHA"
The mobile number of the wallet to debit
Example:
233245519485
The amount to debit the mobile wallet
Example:
0.1
The service type
Example:
"Wallet"
The external ID
Example:
"guid-example"
The description of the transaction
Example:
"ZeepayTest"
The currency code of the debit
Example:
"GHS"
The country code of the debit
Example:
"GHA"
The mobile service provider
Example:
"MTN"
The transaction type
Example:
"DR"
The callback URL (optional)
Example:
"https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b"
Response
Successfully debited the mobile wallet
⌘I
