cURL
curl --request POST \
--url https://test.digitaltermination.com/api/v2/pay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data channel=1 \
--data first_name= \
--data last_name= \
--data email= \
--data 'phone_number=+233245519485' \
--data card_number=4411223344556 \
--data card_cvv=123 \
--data expiry_month= \
--data expiry_year= \
--data amount=1 \
--data callback_url=https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b \
--data return_url=https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3bimport requests
url = "https://test.digitaltermination.com/api/v2/pay"
payload = {
"channel": "1",
"first_name": "",
"last_name": "",
"email": "",
"phone_number": "+233245519485",
"card_number": "4411223344556",
"card_cvv": "123",
"expiry_month": "",
"expiry_year": "",
"amount": "1",
"callback_url": "https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b",
"return_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({
channel: '1',
first_name: '',
last_name: '',
email: '',
phone_number: '+233245519485',
card_number: '4411223344556',
card_cvv: '123',
expiry_month: '',
expiry_year: '',
amount: '1',
callback_url: 'https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b',
return_url: 'https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b'
})
};
fetch('https://test.digitaltermination.com/api/v2/pay', 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/v2/pay",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "channel=1&first_name=&last_name=&email=&phone_number=%2B233245519485&card_number=4411223344556&card_cvv=123&expiry_month=&expiry_year=&amount=1&callback_url=https%3A%2F%2Fwebhook.site%2F3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b&return_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/v2/pay"
payload := strings.NewReader("channel=1&first_name=&last_name=&email=&phone_number=%2B233245519485&card_number=4411223344556&card_cvv=123&expiry_month=&expiry_year=&amount=1&callback_url=https%3A%2F%2Fwebhook.site%2F3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b&return_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/v2/pay")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("channel=1&first_name=&last_name=&email=&phone_number=%2B233245519485&card_number=4411223344556&card_cvv=123&expiry_month=&expiry_year=&amount=1&callback_url=https%3A%2F%2Fwebhook.site%2F3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b&return_url=https%3A%2F%2Fwebhook.site%2F3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b")
.asString();require 'uri'
require 'net/http'
url = URI("https://test.digitaltermination.com/api/v2/pay")
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 = "channel=1&first_name=&last_name=&email=&phone_number=%2B233245519485&card_number=4411223344556&card_cvv=123&expiry_month=&expiry_year=&amount=1&callback_url=https%3A%2F%2Fwebhook.site%2F3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b&return_url=https%3A%2F%2Fwebhook.site%2F3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b"
response = http.request(request)
puts response.read_body{
"transaction": {
"id": 88,
"merchant_id": "1",
"type": "Cr",
"medium": "Card",
"reference": "1-2438378-0998",
"zeepay_id": 22389,
"amount": 1.01,
"amount_details": {
"cc": 0.02,
"rate": "1.00",
"send": 1.01,
"receive": 0.99,
"send_local": 1.01,
"send_currency": "GHS",
"receive_currency": "GHS"
},
"medium_details": {
"threeds_url": "https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b"
},
"status": "2"
}
}API Endpoint
Send Card Payment Request
Sends a payment request via VISA or MasterCard
POST
/
api
/
v2
/
pay
cURL
curl --request POST \
--url https://test.digitaltermination.com/api/v2/pay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data channel=1 \
--data first_name= \
--data last_name= \
--data email= \
--data 'phone_number=+233245519485' \
--data card_number=4411223344556 \
--data card_cvv=123 \
--data expiry_month= \
--data expiry_year= \
--data amount=1 \
--data callback_url=https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b \
--data return_url=https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3bimport requests
url = "https://test.digitaltermination.com/api/v2/pay"
payload = {
"channel": "1",
"first_name": "",
"last_name": "",
"email": "",
"phone_number": "+233245519485",
"card_number": "4411223344556",
"card_cvv": "123",
"expiry_month": "",
"expiry_year": "",
"amount": "1",
"callback_url": "https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b",
"return_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({
channel: '1',
first_name: '',
last_name: '',
email: '',
phone_number: '+233245519485',
card_number: '4411223344556',
card_cvv: '123',
expiry_month: '',
expiry_year: '',
amount: '1',
callback_url: 'https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b',
return_url: 'https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b'
})
};
fetch('https://test.digitaltermination.com/api/v2/pay', 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/v2/pay",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "channel=1&first_name=&last_name=&email=&phone_number=%2B233245519485&card_number=4411223344556&card_cvv=123&expiry_month=&expiry_year=&amount=1&callback_url=https%3A%2F%2Fwebhook.site%2F3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b&return_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/v2/pay"
payload := strings.NewReader("channel=1&first_name=&last_name=&email=&phone_number=%2B233245519485&card_number=4411223344556&card_cvv=123&expiry_month=&expiry_year=&amount=1&callback_url=https%3A%2F%2Fwebhook.site%2F3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b&return_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/v2/pay")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("channel=1&first_name=&last_name=&email=&phone_number=%2B233245519485&card_number=4411223344556&card_cvv=123&expiry_month=&expiry_year=&amount=1&callback_url=https%3A%2F%2Fwebhook.site%2F3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b&return_url=https%3A%2F%2Fwebhook.site%2F3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b")
.asString();require 'uri'
require 'net/http'
url = URI("https://test.digitaltermination.com/api/v2/pay")
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 = "channel=1&first_name=&last_name=&email=&phone_number=%2B233245519485&card_number=4411223344556&card_cvv=123&expiry_month=&expiry_year=&amount=1&callback_url=https%3A%2F%2Fwebhook.site%2F3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b&return_url=https%3A%2F%2Fwebhook.site%2F3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b"
response = http.request(request)
puts response.read_body{
"transaction": {
"id": 88,
"merchant_id": "1",
"type": "Cr",
"medium": "Card",
"reference": "1-2438378-0998",
"zeepay_id": 22389,
"amount": 1.01,
"amount_details": {
"cc": 0.02,
"rate": "1.00",
"send": 1.01,
"receive": 0.99,
"send_local": 1.01,
"send_currency": "GHS",
"receive_currency": "GHS"
},
"medium_details": {
"threeds_url": "https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b"
},
"status": "2"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/x-www-form-urlencoded
Example:
1
Example:
""
Example:
""
Example:
""
Example:
"+233245519485"
Example:
"4411223344556"
Example:
"123"
Example:
""
Example:
""
Example:
"1"
Example:
"https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b"
Example:
"https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b"
Response
200 - application/json
The status of the transaction.
Show child attributes
Show child attributes
⌘I
