Deposit via bank checkout
curl --request POST \
--url https://sandbox-api.kotanipay.com/api/v3/deposit/bank/checkout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fullName": "John Doe",
"paymentMethod": "PAYBYBANK",
"currency": "ZAR",
"amount": 10,
"phoneNumber": "+245XXXXXXXXX",
"country": "<string>",
"referenceId": "5f9b2c7b9c9d6b0017b4e6b1",
"callbackUrl": "https://example.com",
"customerRedirectUrl": "https://example.com/success",
"idNumber": "9001010000084",
"forceDefaultMethod": false
}
'import requests
url = "https://sandbox-api.kotanipay.com/api/v3/deposit/bank/checkout"
payload = {
"fullName": "John Doe",
"paymentMethod": "PAYBYBANK",
"currency": "ZAR",
"amount": 10,
"phoneNumber": "+245XXXXXXXXX",
"country": "<string>",
"referenceId": "5f9b2c7b9c9d6b0017b4e6b1",
"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: 'John Doe',
paymentMethod: 'PAYBYBANK',
currency: 'ZAR',
amount: 10,
phoneNumber: '+245XXXXXXXXX',
country: '<string>',
referenceId: '5f9b2c7b9c9d6b0017b4e6b1',
callbackUrl: 'https://example.com',
customerRedirectUrl: 'https://example.com/success',
idNumber: '9001010000084',
forceDefaultMethod: false
})
};
fetch('https://sandbox-api.kotanipay.com/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.com/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' => 'John Doe',
'paymentMethod' => 'PAYBYBANK',
'currency' => 'ZAR',
'amount' => 10,
'phoneNumber' => '+245XXXXXXXXX',
'country' => '<string>',
'referenceId' => '5f9b2c7b9c9d6b0017b4e6b1',
'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.com/api/v3/deposit/bank/checkout"
payload := strings.NewReader("{\n \"fullName\": \"John Doe\",\n \"paymentMethod\": \"PAYBYBANK\",\n \"currency\": \"ZAR\",\n \"amount\": 10,\n \"phoneNumber\": \"+245XXXXXXXXX\",\n \"country\": \"<string>\",\n \"referenceId\": \"5f9b2c7b9c9d6b0017b4e6b1\",\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.com/api/v3/deposit/bank/checkout")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fullName\": \"John Doe\",\n \"paymentMethod\": \"PAYBYBANK\",\n \"currency\": \"ZAR\",\n \"amount\": 10,\n \"phoneNumber\": \"+245XXXXXXXXX\",\n \"country\": \"<string>\",\n \"referenceId\": \"5f9b2c7b9c9d6b0017b4e6b1\",\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.com/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\": \"John Doe\",\n \"paymentMethod\": \"PAYBYBANK\",\n \"currency\": \"ZAR\",\n \"amount\": 10,\n \"phoneNumber\": \"+245XXXXXXXXX\",\n \"country\": \"<string>\",\n \"referenceId\": \"5f9b2c7b9c9d6b0017b4e6b1\",\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": "John Doe",
"paymentMethod": "PAYBYBANK",
"currency": "ZAR",
"amount": 10,
"phoneNumber": "+245XXXXXXXXX",
"country": "<string>",
"referenceId": "5f9b2c7b9c9d6b0017b4e6b1",
"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.com/api/v3/deposit/bank/checkout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fullName": "John Doe",
"paymentMethod": "PAYBYBANK",
"currency": "ZAR",
"amount": 10,
"phoneNumber": "+245XXXXXXXXX",
"country": "<string>",
"referenceId": "5f9b2c7b9c9d6b0017b4e6b1",
"callbackUrl": "https://example.com",
"customerRedirectUrl": "https://example.com/success",
"idNumber": "9001010000084",
"forceDefaultMethod": false
}
'import requests
url = "https://sandbox-api.kotanipay.com/api/v3/deposit/bank/checkout"
payload = {
"fullName": "John Doe",
"paymentMethod": "PAYBYBANK",
"currency": "ZAR",
"amount": 10,
"phoneNumber": "+245XXXXXXXXX",
"country": "<string>",
"referenceId": "5f9b2c7b9c9d6b0017b4e6b1",
"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: 'John Doe',
paymentMethod: 'PAYBYBANK',
currency: 'ZAR',
amount: 10,
phoneNumber: '+245XXXXXXXXX',
country: '<string>',
referenceId: '5f9b2c7b9c9d6b0017b4e6b1',
callbackUrl: 'https://example.com',
customerRedirectUrl: 'https://example.com/success',
idNumber: '9001010000084',
forceDefaultMethod: false
})
};
fetch('https://sandbox-api.kotanipay.com/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.com/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' => 'John Doe',
'paymentMethod' => 'PAYBYBANK',
'currency' => 'ZAR',
'amount' => 10,
'phoneNumber' => '+245XXXXXXXXX',
'country' => '<string>',
'referenceId' => '5f9b2c7b9c9d6b0017b4e6b1',
'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.com/api/v3/deposit/bank/checkout"
payload := strings.NewReader("{\n \"fullName\": \"John Doe\",\n \"paymentMethod\": \"PAYBYBANK\",\n \"currency\": \"ZAR\",\n \"amount\": 10,\n \"phoneNumber\": \"+245XXXXXXXXX\",\n \"country\": \"<string>\",\n \"referenceId\": \"5f9b2c7b9c9d6b0017b4e6b1\",\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.com/api/v3/deposit/bank/checkout")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fullName\": \"John Doe\",\n \"paymentMethod\": \"PAYBYBANK\",\n \"currency\": \"ZAR\",\n \"amount\": 10,\n \"phoneNumber\": \"+245XXXXXXXXX\",\n \"country\": \"<string>\",\n \"referenceId\": \"5f9b2c7b9c9d6b0017b4e6b1\",\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.com/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\": \"John Doe\",\n \"paymentMethod\": \"PAYBYBANK\",\n \"currency\": \"ZAR\",\n \"amount\": 10,\n \"phoneNumber\": \"+245XXXXXXXXX\",\n \"country\": \"<string>\",\n \"referenceId\": \"5f9b2c7b9c9d6b0017b4e6b1\",\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": "John Doe",
"paymentMethod": "PAYBYBANK",
"currency": "ZAR",
"amount": 10,
"phoneNumber": "+245XXXXXXXXX",
"country": "<string>",
"referenceId": "5f9b2c7b9c9d6b0017b4e6b1",
"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:
"John Doe"
Payment Method
Available options:
PAYBYBANK, CARD, CAPITECPAY Example:
"PAYBYBANK"
Transaction currency
Example:
"ZAR"
amount to deposit
Example:
10
Customer Phone Number
Example:
"+245XXXXXXXXX"
Country where the wallet is used (optional if derivable from currency) - Cards are accepted globally
reference id
Example:
"5f9b2c7b9c9d6b0017b4e6b1"
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"
Show only the chosen paymentMethod to the customer, where the provider supports it.
Example:
false
⌘I