Get Deposit Onchain Status
curl --request GET \
--url https://preview.kotanipay.com/api/v3/deposit/on-chain/status/{reference_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://preview.kotanipay.com/api/v3/deposit/on-chain/status/{reference_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://preview.kotanipay.com/api/v3/deposit/on-chain/status/{reference_id}', 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://preview.kotanipay.com/api/v3/deposit/on-chain/status/{reference_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://preview.kotanipay.com/api/v3/deposit/on-chain/status/{reference_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://preview.kotanipay.com/api/v3/deposit/on-chain/status/{reference_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://preview.kotanipay.com/api/v3/deposit/on-chain/status/{reference_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Deposit status successfully retrieved.",
"data": {
"mobile_money": {
"id": "5f9b2c7b9c9d6b0017b4e6b1",
"amount": 10,
"wallet_id": "5f9b2c7b9c9d6b0017b4e6b1",
"status": "PENDING",
"reference_number": 123,
"created_at": "2023-11-07T05:31:56Z",
"transaction_cost": 123,
"transaction_amount": 123,
"customer_key": "<string>",
"callback_url": "https://example.com",
"customer_redirect_url": "https://example.com/success",
"reference_id": "5f9b2c7b9c9d6b0017b4e6b1",
"currency": "USD",
"provider": "<string>",
"providerReference": "<string>",
"providerRequest": "<string>",
"providerResponse": "<string>",
"callbackUrlStatus": 123,
"callbackResponse": "<string>",
"callbackPayload": {},
"transactionError": "<string>",
"retries": 123,
"network": "<string>",
"environment": "<string>",
"integratorsAmount": 123,
"wallet": {},
"customer": {},
"paymentLinkTransaction": {},
"updatedAt": "<string>",
"confirmation_id": "<string>",
"threeDSEci": "<string>",
"uniqueIdentifier": "<string>",
"initialDepositBalance": 123,
"finalDepositBalance": 123,
"error_message": "<string>",
"error_code": "<string>",
"error_description": "<string>",
"telco_id": "<string>"
},
"onchain": {
"chain": "ETHEREUM",
"token": "CUSD",
"public_address": "<string>",
"reference_id": "<string>",
"crypto_amount": "<string>",
"transaction_hash": "<string>",
"status": "PENDING",
"crypto_received_status": "PENDING"
}
}
}{
"success": false,
"message": "Bad Request",
"data": {}
}{
"success": false,
"message": "Unauthorized",
"data": {}
}{
"success": false,
"message": "Not Found",
"data": {}
}Crypto Deposits (On-Chain)
Get Deposit On-Chain Status
deprecated
This endpoint will be used to get the status of the deposit onchain request
GET
/
api
/
v3
/
deposit
/
on-chain
/
status
/
{reference_id}
Get Deposit Onchain Status
curl --request GET \
--url https://preview.kotanipay.com/api/v3/deposit/on-chain/status/{reference_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://preview.kotanipay.com/api/v3/deposit/on-chain/status/{reference_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://preview.kotanipay.com/api/v3/deposit/on-chain/status/{reference_id}', 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://preview.kotanipay.com/api/v3/deposit/on-chain/status/{reference_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://preview.kotanipay.com/api/v3/deposit/on-chain/status/{reference_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://preview.kotanipay.com/api/v3/deposit/on-chain/status/{reference_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://preview.kotanipay.com/api/v3/deposit/on-chain/status/{reference_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Deposit status successfully retrieved.",
"data": {
"mobile_money": {
"id": "5f9b2c7b9c9d6b0017b4e6b1",
"amount": 10,
"wallet_id": "5f9b2c7b9c9d6b0017b4e6b1",
"status": "PENDING",
"reference_number": 123,
"created_at": "2023-11-07T05:31:56Z",
"transaction_cost": 123,
"transaction_amount": 123,
"customer_key": "<string>",
"callback_url": "https://example.com",
"customer_redirect_url": "https://example.com/success",
"reference_id": "5f9b2c7b9c9d6b0017b4e6b1",
"currency": "USD",
"provider": "<string>",
"providerReference": "<string>",
"providerRequest": "<string>",
"providerResponse": "<string>",
"callbackUrlStatus": 123,
"callbackResponse": "<string>",
"callbackPayload": {},
"transactionError": "<string>",
"retries": 123,
"network": "<string>",
"environment": "<string>",
"integratorsAmount": 123,
"wallet": {},
"customer": {},
"paymentLinkTransaction": {},
"updatedAt": "<string>",
"confirmation_id": "<string>",
"threeDSEci": "<string>",
"uniqueIdentifier": "<string>",
"initialDepositBalance": 123,
"finalDepositBalance": 123,
"error_message": "<string>",
"error_code": "<string>",
"error_description": "<string>",
"telco_id": "<string>"
},
"onchain": {
"chain": "ETHEREUM",
"token": "CUSD",
"public_address": "<string>",
"reference_id": "<string>",
"crypto_amount": "<string>",
"transaction_hash": "<string>",
"status": "PENDING",
"crypto_received_status": "PENDING"
}
}
}{
"success": false,
"message": "Bad Request",
"data": {}
}{
"success": false,
"message": "Unauthorized",
"data": {}
}{
"success": false,
"message": "Not Found",
"data": {}
}Get the status of a deposit on-chain transaction, including both mobile money collection and blockchain transfer details.
Response Structure
The response contains two parts:- mobile_money - Status of the mobile money collection
- onchain - Status of the blockchain transfer
Status Values
Mobile Money Status
| Status | Description |
|---|---|
PENDING | STK push sent, waiting for customer |
SUCCESSFUL | Payment collected successfully |
FAILED | Payment failed or cancelled |
Crypto Received Status
| Status | Description |
|---|---|
PENDING | Blockchain transaction in progress |
SUCCESSFUL | Crypto received at destination |
FAILED | Blockchain transaction failed |
Example Response
{
"data": {
"mobile_money": {
"id": "dep_abc123",
"status": "SUCCESSFUL",
"amount": 1450,
"currency": "CDF",
"transaction_amount": 1450,
"transaction_cost": 50,
"reference_id": "order_12345",
"provider": "VODACOM",
"created_at": "2025-01-07T12:00:00Z"
},
"onchain": {
"status": "SUCCESSFUL",
"crypto_received_status": "SUCCESSFUL",
"chain": "POLYGON",
"token": "USDT",
"public_address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"crypto_amount": 0.65,
"transaction_hash": "0xabc...def"
}
}
}
Webhook Notification
You’ll receive a webhook when the transaction completes:{
"event": "deposit.onchain.successful",
"data": {
"reference_id": "order_12345",
"status": "SUCCESSFUL",
"mobile_money_status": "SUCCESSFUL",
"crypto_received_status": "SUCCESSFUL",
"amount": 1450,
"currency": "CDF",
"crypto_amount": 0.65,
"chain": "POLYGON",
"token": "USDT",
"transaction_hash": "0xabc...def",
"created_at": "2025-01-07T12:00:00Z",
"completed_at": "2025-01-07T12:02:30Z"
}
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.