Incoming SMS Webhook
curl --request POST \
--url https://sandbox-api.kotanipay.io/api/v3/sms/incomingimport requests
url = "https://sandbox-api.kotanipay.io/api/v3/sms/incoming"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://sandbox-api.kotanipay.io/api/v3/sms/incoming', 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/sms/incoming",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.kotanipay.io/api/v3/sms/incoming"
req, _ := http.NewRequest("POST", url, nil)
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/sms/incoming")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.kotanipay.io/api/v3/sms/incoming")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodySMS
Incoming SMS Webhook
Webhook endpoint for AfricasTalking incoming SMS messages.
POST
/
api
/
v3
/
sms
/
incoming
Incoming SMS Webhook
curl --request POST \
--url https://sandbox-api.kotanipay.io/api/v3/sms/incomingimport requests
url = "https://sandbox-api.kotanipay.io/api/v3/sms/incoming"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://sandbox-api.kotanipay.io/api/v3/sms/incoming', 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/sms/incoming",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.kotanipay.io/api/v3/sms/incoming"
req, _ := http.NewRequest("POST", url, nil)
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/sms/incoming")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.kotanipay.io/api/v3/sms/incoming")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyThis endpoint is called directly by AfricasTalking when an inbound SMS is received on your registered shortcode. No authentication is required. KotaniPay saves the message and forwards it to all registered webhook clients for your account.
Configure this URL (
https://sandbox-api.kotanipay.io/api/v3/sms/incoming) as the callback URL in your AfricasTalking dashboard under SMS → Callback URL.Response
200
Incoming message processed successfully