Deposit via bank checkout
curl --request POST \
--url https://sandbox-api.kotanipay.io/api/v3/deposit/bank/checkout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fullName": "Patrick Oduro",
"paymentMethod": "CARD",
"currency": "eg ZAR",
"referenceId": "gHjvySSAbZSX69Ux0455xqUpenREK3245223452zi",
"amount": 10,
"phoneNumber": "+233542885317",
"callbackUrl": "https://example.com",
"customerRedirectUrl": "https://example.com/success",
"idNumber": "9001010000084",
"forceDefaultMethod": false
}
'import requests
url = "https://sandbox-api.kotanipay.io/api/v3/deposit/bank/checkout"
payload = {
"fullName": "Patrick Oduro",
"paymentMethod": "CARD",
"currency": "eg ZAR",
"referenceId": "gHjvySSAbZSX69Ux0455xqUpenREK3245223452zi",
"amount": 10,
"phoneNumber": "+233542885317",
"callbackUrl": "https://example.com",
"customerRedirectUrl": "https://example.com/success",
"idNumber": "9001010000084",
"forceDefaultMethod": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fullName: 'Patrick Oduro',
paymentMethod: 'CARD',
currency: 'eg ZAR',
referenceId: 'gHjvySSAbZSX69Ux0455xqUpenREK3245223452zi',
amount: 10,
phoneNumber: '+233542885317',
callbackUrl: 'https://example.com',
customerRedirectUrl: 'https://example.com/success',
idNumber: '9001010000084',
forceDefaultMethod: false
})
};
fetch('https://sandbox-api.kotanipay.io/api/v3/deposit/bank/checkout', 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://sandbox-api.kotanipay.io/api/v3/deposit/bank/checkout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fullName' => 'Patrick Oduro',
'paymentMethod' => 'CARD',
'currency' => 'eg ZAR',
'referenceId' => 'gHjvySSAbZSX69Ux0455xqUpenREK3245223452zi',
'amount' => 10,
'phoneNumber' => '+233542885317',
'callbackUrl' => 'https://example.com',
'customerRedirectUrl' => 'https://example.com/success',
'idNumber' => '9001010000084',
'forceDefaultMethod' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://sandbox-api.kotanipay.io/api/v3/deposit/bank/checkout"
payload := strings.NewReader("{\n \"fullName\": \"Patrick Oduro\",\n \"paymentMethod\": \"CARD\",\n \"currency\": \"eg ZAR\",\n \"referenceId\": \"gHjvySSAbZSX69Ux0455xqUpenREK3245223452zi\",\n \"amount\": 10,\n \"phoneNumber\": \"+233542885317\",\n \"callbackUrl\": \"https://example.com\",\n \"customerRedirectUrl\": \"https://example.com/success\",\n \"idNumber\": \"9001010000084\",\n \"forceDefaultMethod\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox-api.kotanipay.io/api/v3/deposit/bank/checkout")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fullName\": \"Patrick Oduro\",\n \"paymentMethod\": \"CARD\",\n \"currency\": \"eg ZAR\",\n \"referenceId\": \"gHjvySSAbZSX69Ux0455xqUpenREK3245223452zi\",\n \"amount\": 10,\n \"phoneNumber\": \"+233542885317\",\n \"callbackUrl\": \"https://example.com\",\n \"customerRedirectUrl\": \"https://example.com/success\",\n \"idNumber\": \"9001010000084\",\n \"forceDefaultMethod\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.kotanipay.io/api/v3/deposit/bank/checkout")
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/json'
request.body = "{\n \"fullName\": \"Patrick Oduro\",\n \"paymentMethod\": \"CARD\",\n \"currency\": \"eg ZAR\",\n \"referenceId\": \"gHjvySSAbZSX69Ux0455xqUpenREK3245223452zi\",\n \"amount\": 10,\n \"phoneNumber\": \"+233542885317\",\n \"callbackUrl\": \"https://example.com\",\n \"customerRedirectUrl\": \"https://example.com/success\",\n \"idNumber\": \"9001010000084\",\n \"forceDefaultMethod\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Checkout Created successfully created.",
"data": {
"fullName": "Patrick Oduro",
"paymentMethod": "CARD",
"currency": "eg ZAR",
"referenceId": "gHjvySSAbZSX69Ux0455xqUpenREK3245223452zi",
"amount": 10,
"phoneNumber": "+233542885317",
"callbackUrl": "https://example.com",
"customerRedirectUrl": "https://example.com/success",
"idNumber": "9001010000084",
"forceDefaultMethod": false
}
}{
"success": false,
"message": "Bad Request",
"data": {}
}{
"success": false,
"message": "Unauthorized",
"data": {}
}Bank Deposits
Bank Checkout Deposit
Customer Completed transaction using Checkout Url
POST
/
api
/
v3
/
deposit
/
bank
/
checkout
Deposit via bank checkout
curl --request POST \
--url https://sandbox-api.kotanipay.io/api/v3/deposit/bank/checkout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fullName": "Patrick Oduro",
"paymentMethod": "CARD",
"currency": "eg ZAR",
"referenceId": "gHjvySSAbZSX69Ux0455xqUpenREK3245223452zi",
"amount": 10,
"phoneNumber": "+233542885317",
"callbackUrl": "https://example.com",
"customerRedirectUrl": "https://example.com/success",
"idNumber": "9001010000084",
"forceDefaultMethod": false
}
'import requests
url = "https://sandbox-api.kotanipay.io/api/v3/deposit/bank/checkout"
payload = {
"fullName": "Patrick Oduro",
"paymentMethod": "CARD",
"currency": "eg ZAR",
"referenceId": "gHjvySSAbZSX69Ux0455xqUpenREK3245223452zi",
"amount": 10,
"phoneNumber": "+233542885317",
"callbackUrl": "https://example.com",
"customerRedirectUrl": "https://example.com/success",
"idNumber": "9001010000084",
"forceDefaultMethod": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
fullName: 'Patrick Oduro',
paymentMethod: 'CARD',
currency: 'eg ZAR',
referenceId: 'gHjvySSAbZSX69Ux0455xqUpenREK3245223452zi',
amount: 10,
phoneNumber: '+233542885317',
callbackUrl: 'https://example.com',
customerRedirectUrl: 'https://example.com/success',
idNumber: '9001010000084',
forceDefaultMethod: false
})
};
fetch('https://sandbox-api.kotanipay.io/api/v3/deposit/bank/checkout', 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://sandbox-api.kotanipay.io/api/v3/deposit/bank/checkout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'fullName' => 'Patrick Oduro',
'paymentMethod' => 'CARD',
'currency' => 'eg ZAR',
'referenceId' => 'gHjvySSAbZSX69Ux0455xqUpenREK3245223452zi',
'amount' => 10,
'phoneNumber' => '+233542885317',
'callbackUrl' => 'https://example.com',
'customerRedirectUrl' => 'https://example.com/success',
'idNumber' => '9001010000084',
'forceDefaultMethod' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://sandbox-api.kotanipay.io/api/v3/deposit/bank/checkout"
payload := strings.NewReader("{\n \"fullName\": \"Patrick Oduro\",\n \"paymentMethod\": \"CARD\",\n \"currency\": \"eg ZAR\",\n \"referenceId\": \"gHjvySSAbZSX69Ux0455xqUpenREK3245223452zi\",\n \"amount\": 10,\n \"phoneNumber\": \"+233542885317\",\n \"callbackUrl\": \"https://example.com\",\n \"customerRedirectUrl\": \"https://example.com/success\",\n \"idNumber\": \"9001010000084\",\n \"forceDefaultMethod\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox-api.kotanipay.io/api/v3/deposit/bank/checkout")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fullName\": \"Patrick Oduro\",\n \"paymentMethod\": \"CARD\",\n \"currency\": \"eg ZAR\",\n \"referenceId\": \"gHjvySSAbZSX69Ux0455xqUpenREK3245223452zi\",\n \"amount\": 10,\n \"phoneNumber\": \"+233542885317\",\n \"callbackUrl\": \"https://example.com\",\n \"customerRedirectUrl\": \"https://example.com/success\",\n \"idNumber\": \"9001010000084\",\n \"forceDefaultMethod\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.kotanipay.io/api/v3/deposit/bank/checkout")
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/json'
request.body = "{\n \"fullName\": \"Patrick Oduro\",\n \"paymentMethod\": \"CARD\",\n \"currency\": \"eg ZAR\",\n \"referenceId\": \"gHjvySSAbZSX69Ux0455xqUpenREK3245223452zi\",\n \"amount\": 10,\n \"phoneNumber\": \"+233542885317\",\n \"callbackUrl\": \"https://example.com\",\n \"customerRedirectUrl\": \"https://example.com/success\",\n \"idNumber\": \"9001010000084\",\n \"forceDefaultMethod\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Checkout Created successfully created.",
"data": {
"fullName": "Patrick Oduro",
"paymentMethod": "CARD",
"currency": "eg ZAR",
"referenceId": "gHjvySSAbZSX69Ux0455xqUpenREK3245223452zi",
"amount": 10,
"phoneNumber": "+233542885317",
"callbackUrl": "https://example.com",
"customerRedirectUrl": "https://example.com/success",
"idNumber": "9001010000084",
"forceDefaultMethod": false
}
}{
"success": false,
"message": "Bad Request",
"data": {}
}{
"success": false,
"message": "Unauthorized",
"data": {}
}Customer completed transaction using checkout URL. This endpoint allows customers to deposit funds via bank checkout.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
full name
Example:
"Patrick Oduro"
Payment Method (PAYBYBANK, CARD, MASTERPASS)
Available options:
PAYBYBANK, CARD, MASTERPASS Example:
"CARD"
ZAR is currently supported
Available options:
KES, GHS, NGN, ZAR, ZAR, USD, XOF, ZMW, XAF, SLE, CDF, TZS, UGX, EGP, MWK, RWF, ETB, MZN, LSL, GNF, USDT, BTC, ETH, USDC Example:
"eg ZAR"
reference id
Example:
"gHjvySSAbZSX69Ux0455xqUpenREK3245223452zi"
amount to deposit
Example:
10
Customer Phone Number
Example:
"+233542885317"
callback url
Example:
"https://example.com"
customer redirect url
Example:
"https://example.com/success"
Customer national ID number (required for Capitec Pay in South Africa - 13 digit SA ID)
Example:
"9001010000084"
When true, force the payment method specified in paymentMethod to be the only option presented to the customer (no switching allowed). Passed to the provider as forceDefaultMethod where supported.
Example:
false
⌘I