Get transactions for a payment link
curl --request GET \
--url https://sandbox-api.kotanipay.io/api/v3/payment-links/{id}/transactions \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox-api.kotanipay.io/api/v3/payment-links/{id}/transactions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox-api.kotanipay.io/api/v3/payment-links/{id}/transactions', 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/payment-links/{id}/transactions",
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://sandbox-api.kotanipay.io/api/v3/payment-links/{id}/transactions"
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://sandbox-api.kotanipay.io/api/v3/payment-links/{id}/transactions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.kotanipay.io/api/v3/payment-links/{id}/transactions")
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": "Transactions retrieved successfully",
"data": [
{
"id": "<string>",
"referenceId": "<string>",
"paymentLinkId": "<string>",
"customer": {
"email": "you@example.com",
"phone": "+254712345678",
"name": "John Doe",
"address": "<string>"
},
"paymentMethod": "mobile_money",
"currency": "<string>",
"amount": 123,
"transactionAmount": 123,
"status": "pending",
"createdAt": "2023-11-07T05:31:56Z",
"transactionCost": 123,
"packageId": "<string>",
"packageName": "<string>",
"providerReference": "<string>",
"transactionError": "<string>",
"completedAt": "2023-11-07T05:31:56Z",
"deposit": {
"id": "<string>",
"referenceId": "<string>",
"referenceNumber": 123,
"amount": 123,
"transactionAmount": 123,
"transactionCost": 123,
"status": "PENDING",
"provider": "<string>",
"providerReference": "<string>",
"providerResponse": {},
"callbackResponse": {},
"callbackPayload": {},
"callbackStatusCode": 123,
"transactionError": "<string>",
"retries": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"redirectUrl": "<string>",
"requiresAction": true,
"redirectMode": "top",
"type": "<string>",
"walletAddress": "<string>",
"network": "<string>",
"token": "<string>"
}
],
"total": 1,
"limit": 20,
"offset": 0
}{
"success": false,
"message": "Invalid API Key",
"data": {}
}Payment Links
Get Payment Link Transactions
GET
/
api
/
v3
/
payment-links
/
{id}
/
transactions
Get transactions for a payment link
curl --request GET \
--url https://sandbox-api.kotanipay.io/api/v3/payment-links/{id}/transactions \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox-api.kotanipay.io/api/v3/payment-links/{id}/transactions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox-api.kotanipay.io/api/v3/payment-links/{id}/transactions', 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/payment-links/{id}/transactions",
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://sandbox-api.kotanipay.io/api/v3/payment-links/{id}/transactions"
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://sandbox-api.kotanipay.io/api/v3/payment-links/{id}/transactions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.kotanipay.io/api/v3/payment-links/{id}/transactions")
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": "Transactions retrieved successfully",
"data": [
{
"id": "<string>",
"referenceId": "<string>",
"paymentLinkId": "<string>",
"customer": {
"email": "you@example.com",
"phone": "+254712345678",
"name": "John Doe",
"address": "<string>"
},
"paymentMethod": "mobile_money",
"currency": "<string>",
"amount": 123,
"transactionAmount": 123,
"status": "pending",
"createdAt": "2023-11-07T05:31:56Z",
"transactionCost": 123,
"packageId": "<string>",
"packageName": "<string>",
"providerReference": "<string>",
"transactionError": "<string>",
"completedAt": "2023-11-07T05:31:56Z",
"deposit": {
"id": "<string>",
"referenceId": "<string>",
"referenceNumber": 123,
"amount": 123,
"transactionAmount": 123,
"transactionCost": 123,
"status": "PENDING",
"provider": "<string>",
"providerReference": "<string>",
"providerResponse": {},
"callbackResponse": {},
"callbackPayload": {},
"callbackStatusCode": 123,
"transactionError": "<string>",
"retries": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"redirectUrl": "<string>",
"requiresAction": true,
"redirectMode": "top",
"type": "<string>",
"walletAddress": "<string>",
"network": "<string>",
"token": "<string>"
}
],
"total": 1,
"limit": 20,
"offset": 0
}{
"success": false,
"message": "Invalid API Key",
"data": {}
}Get the transactions collected through a specific payment link, filterable by status and payment method.
For card and crypto payments, check
requiresAction/redirectUrl/redirectMode — some providers need an additional 3DS redirect before the payment completes. redirectMode tells you whether that redirect can be framed in-page (iframe) or must open the top-level window (top).Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Available options:
pending, processing, successful, failed, cancelled, expired Available options:
mobile_money, bank, card, crypto Search by customer email/phone/name