Initiate Paymeni Request
curl --request POST \
--url https://business-sandbox.instntmny.com/api/pay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data channel=2 \
--data phone_number=233245519485 \
--data 'name=Godwin Hottor' \
--data amount=1 \
--data voucher_code= \
--data callback_url=import requests
url = "https://business-sandbox.instntmny.com/api/pay"
payload = {
"channel": "2",
"phone_number": "233245519485",
"name": "Godwin Hottor",
"amount": "1",
"voucher_code": "",
"callback_url": ""
}
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: '2',
phone_number: '233245519485',
name: 'Godwin Hottor',
amount: '1',
voucher_code: '',
callback_url: ''
})
};
fetch('https://business-sandbox.instntmny.com/api/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://business-sandbox.instntmny.com/api/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=2&phone_number=233245519485&name=Godwin%20Hottor&amount=1&voucher_code=&callback_url=",
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://business-sandbox.instntmny.com/api/pay"
payload := strings.NewReader("channel=2&phone_number=233245519485&name=Godwin%20Hottor&amount=1&voucher_code=&callback_url=")
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://business-sandbox.instntmny.com/api/pay")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("channel=2&phone_number=233245519485&name=Godwin%20Hottor&amount=1&voucher_code=&callback_url=")
.asString();require 'uri'
require 'net/http'
url = URI("https://business-sandbox.instntmny.com/api/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=2&phone_number=233245519485&name=Godwin%20Hottor&amount=1&voucher_code=&callback_url="
response = http.request(request)
puts response.read_body{
"transaction": {
"type": "Cr",
"merchant_id": 5,
"reference": "5-234r433434-24e3ed",
"medium": "MTN Mobile Money",
"amount": 1.01,
"amount_details": "Hello, this is a test debit transaction",
"status": "2",
"status_message": "Request sent, pending processing",
"sender_details": {
"type": 2,
"no": "233245519485",
"name": "ZEEPAY GHANA LIMITED",
"token": null
},
"recipient_details": {
"type": 8,
"no": 5,
"name": "Godwin Hottor"
},
"description": "Payment",
"extra": "Testing",
"api": 1,
"callback_url": "https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b",
"updated_at": "2020-04-14 16:18:31",
"created_at": "2020-04-14 16:18:31",
"id": 26
},
"type": "Success",
"message": "Transaction Request Successful"
}API Endpoint
Send Mobile Money Payment Request
Debits a mobile wallet with the specified amount
POST
/
api
/
pay
Initiate Paymeni Request
curl --request POST \
--url https://business-sandbox.instntmny.com/api/pay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data channel=2 \
--data phone_number=233245519485 \
--data 'name=Godwin Hottor' \
--data amount=1 \
--data voucher_code= \
--data callback_url=import requests
url = "https://business-sandbox.instntmny.com/api/pay"
payload = {
"channel": "2",
"phone_number": "233245519485",
"name": "Godwin Hottor",
"amount": "1",
"voucher_code": "",
"callback_url": ""
}
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: '2',
phone_number: '233245519485',
name: 'Godwin Hottor',
amount: '1',
voucher_code: '',
callback_url: ''
})
};
fetch('https://business-sandbox.instntmny.com/api/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://business-sandbox.instntmny.com/api/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=2&phone_number=233245519485&name=Godwin%20Hottor&amount=1&voucher_code=&callback_url=",
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://business-sandbox.instntmny.com/api/pay"
payload := strings.NewReader("channel=2&phone_number=233245519485&name=Godwin%20Hottor&amount=1&voucher_code=&callback_url=")
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://business-sandbox.instntmny.com/api/pay")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("channel=2&phone_number=233245519485&name=Godwin%20Hottor&amount=1&voucher_code=&callback_url=")
.asString();require 'uri'
require 'net/http'
url = URI("https://business-sandbox.instntmny.com/api/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=2&phone_number=233245519485&name=Godwin%20Hottor&amount=1&voucher_code=&callback_url="
response = http.request(request)
puts response.read_body{
"transaction": {
"type": "Cr",
"merchant_id": 5,
"reference": "5-234r433434-24e3ed",
"medium": "MTN Mobile Money",
"amount": 1.01,
"amount_details": "Hello, this is a test debit transaction",
"status": "2",
"status_message": "Request sent, pending processing",
"sender_details": {
"type": 2,
"no": "233245519485",
"name": "ZEEPAY GHANA LIMITED",
"token": null
},
"recipient_details": {
"type": 8,
"no": 5,
"name": "Godwin Hottor"
},
"description": "Payment",
"extra": "Testing",
"api": 1,
"callback_url": "https://webhook.site/3b3b3b3b-3b3b-3b3b-3b3b-3b3b3b3b3b3b",
"updated_at": "2020-04-14 16:18:31",
"created_at": "2020-04-14 16:18:31",
"id": 26
},
"type": "Success",
"message": "Transaction Request Successful"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/x-www-form-urlencoded
The channel code for the mobile wallet provider
Example:
2
The mobile number of the wallet to debit
Example:
"233245519485"
The name of the account holder
Example:
"Godwin Hottor"
The amount to debit the mobile wallet
Example:
1
required only for Vodafone Cash Transactions
Example:
""
The callback URL (optional)
Example:
""
⌘I
