Niobi STK Deposit
curl --request POST \
--url https://sandbox.users.niobi.co/api/stk-deposit \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "integer",
"country_id": "integer",
"correspondent": "MTN_MOMO_NGA",
"currency": "string",
"mobile": "254647647649",
"callback_url": "string"
}
'import requests
url = "https://sandbox.users.niobi.co/api/stk-deposit"
payload = {
"amount": "integer",
"country_id": "integer",
"correspondent": "MTN_MOMO_NGA",
"currency": "string",
"mobile": "254647647649",
"callback_url": "string"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 'integer',
country_id: 'integer',
correspondent: 'MTN_MOMO_NGA',
currency: 'string',
mobile: '254647647649',
callback_url: 'string'
})
};
fetch('https://sandbox.users.niobi.co/api/stk-deposit', 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.users.niobi.co/api/stk-deposit",
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([
'amount' => 'integer',
'country_id' => 'integer',
'correspondent' => 'MTN_MOMO_NGA',
'currency' => 'string',
'mobile' => '254647647649',
'callback_url' => 'string'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.users.niobi.co/api/stk-deposit"
payload := strings.NewReader("{\n \"amount\": \"integer\",\n \"country_id\": \"integer\",\n \"correspondent\": \"MTN_MOMO_NGA\",\n \"currency\": \"string\",\n \"mobile\": \"254647647649\",\n \"callback_url\": \"string\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.users.niobi.co/api/stk-deposit")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"integer\",\n \"country_id\": \"integer\",\n \"correspondent\": \"MTN_MOMO_NGA\",\n \"currency\": \"string\",\n \"mobile\": \"254647647649\",\n \"callback_url\": \"string\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.users.niobi.co/api/stk-deposit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"integer\",\n \"country_id\": \"integer\",\n \"correspondent\": \"MTN_MOMO_NGA\",\n \"currency\": \"string\",\n \"mobile\": \"254647647649\",\n \"callback_url\": \"string\"\n}"
response = http.request(request)
puts response.read_body{
"success": "true",
"message": "Verification token was sent to your mobile number. Kindly verify to proceed with payment",
"data": {
"MerchantRequestID": "1234-123456789-1",
"CheckoutRequestID": "ab_XY_*******************",
"ResponseCode": "0",
"ResponseDescription": "Success. Request accepted for processing",
"CustomerMessage": "Success. Request accepted for processing"
}
}Niobi STK Deposit
Niobi STK Deposit
POST
/
api
/
stk-deposit
Niobi STK Deposit
curl --request POST \
--url https://sandbox.users.niobi.co/api/stk-deposit \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "integer",
"country_id": "integer",
"correspondent": "MTN_MOMO_NGA",
"currency": "string",
"mobile": "254647647649",
"callback_url": "string"
}
'import requests
url = "https://sandbox.users.niobi.co/api/stk-deposit"
payload = {
"amount": "integer",
"country_id": "integer",
"correspondent": "MTN_MOMO_NGA",
"currency": "string",
"mobile": "254647647649",
"callback_url": "string"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 'integer',
country_id: 'integer',
correspondent: 'MTN_MOMO_NGA',
currency: 'string',
mobile: '254647647649',
callback_url: 'string'
})
};
fetch('https://sandbox.users.niobi.co/api/stk-deposit', 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.users.niobi.co/api/stk-deposit",
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([
'amount' => 'integer',
'country_id' => 'integer',
'correspondent' => 'MTN_MOMO_NGA',
'currency' => 'string',
'mobile' => '254647647649',
'callback_url' => 'string'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.users.niobi.co/api/stk-deposit"
payload := strings.NewReader("{\n \"amount\": \"integer\",\n \"country_id\": \"integer\",\n \"correspondent\": \"MTN_MOMO_NGA\",\n \"currency\": \"string\",\n \"mobile\": \"254647647649\",\n \"callback_url\": \"string\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.users.niobi.co/api/stk-deposit")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"integer\",\n \"country_id\": \"integer\",\n \"correspondent\": \"MTN_MOMO_NGA\",\n \"currency\": \"string\",\n \"mobile\": \"254647647649\",\n \"callback_url\": \"string\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.users.niobi.co/api/stk-deposit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"integer\",\n \"country_id\": \"integer\",\n \"correspondent\": \"MTN_MOMO_NGA\",\n \"currency\": \"string\",\n \"mobile\": \"254647647649\",\n \"callback_url\": \"string\"\n}"
response = http.request(request)
puts response.read_body{
"success": "true",
"message": "Verification token was sent to your mobile number. Kindly verify to proceed with payment",
"data": {
"MerchantRequestID": "1234-123456789-1",
"CheckoutRequestID": "ab_XY_*******************",
"ResponseCode": "0",
"ResponseDescription": "Success. Request accepted for processing",
"CustomerMessage": "Success. Request accepted for processing"
}
}Authorizations
Enter token in format (Bearer )
Body
application/json
Deposit STK Payment.
Example:
"integer"
Example:
"integer"
Example:
"MTN_MOMO_NGA"
Example:
"string"
This is the mobile number of the Payee who is being paid out. Use the correct formatting as described in the example
Example:
"254647647649"
Example:
"string"

