Skip to main content
GET
/
payments
/
v1
/
payments
Fetch Collection History
curl --request GET \
  --url https://sandbox-api.payfonte.com/payments/v1/payments \
  --header 'client-id: <api-key>' \
  --header 'client-secret: <api-key>'
import requests

url = "https://sandbox-api.payfonte.com/payments/v1/payments"

headers = {
"client-id": "<api-key>",
"client-secret": "<api-key>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {
method: 'GET',
headers: {'client-id': '<api-key>', 'client-secret': '<api-key>'}
};

fetch('https://sandbox-api.payfonte.com/payments/v1/payments', 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.payfonte.com/payments/v1/payments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"client-id: <api-key>",
"client-secret: <api-key>"
],
]);

$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.payfonte.com/payments/v1/payments"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("client-id", "<api-key>")
req.Header.Add("client-secret", "<api-key>")

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.payfonte.com/payments/v1/payments")
.header("client-id", "<api-key>")
.header("client-secret", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://sandbox-api.payfonte.com/payments/v1/payments")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["client-id"] = '<api-key>'
request["client-secret"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "statusCode": 200,
  "total": 1253,
  "page": 1,
  "pages": 314,
  "limit": 4,
  "data": [
    {
      "checkoutId": "67ccca10721271b00713d4c3",
      "clientId": "payfusion",
      "provider": "MTN MoMo",
      "providerLogo": "https://seeklogo.com/images/M/mtn-logo-40644FC8B0-seeklogo.com.png",
      "channel": "mobile-money",
      "reference": "D20250308225200TLWNG",
      "providersReference": "1690402150",
      "currency": "KES",
      "amount": 281400,
      "user": {
        "name": "katigbanoma ent",
        "email": "bidemi64@gmail.com",
        "phoneNumber": "+2348171633912"
      },
      "merchantFee": 0,
      "customerFee": 0,
      "merchantFeeLabel": "KES 0.00",
      "customerFeeLabel": "KES 0.00",
      "charge": 0,
      "paidAt": 1741188234,
      "status": "success",
      "availableBalance": 0,
      "createdAt": "2025-03-08T22:52:00.729Z"
    }
  ]
}

Authorizations

client-id
string
header
required
client-secret
string
header
required

Query Parameters

page
integer
default:1

Page number for pagination

Required range: x >= 1
limit
integer
default:4

Number of records per page

Required range: 1 <= x <= 100
dateFrom
string<date>

Start date for filtering transactions (inclusive)

Example:

"2024-01-01"

dateTo
string<date>

End date for filtering transactions (inclusive)

Example:

"2025-01-01"

Response

200 - application/json

Successfully retrieved transactions

statusCode
integer
Example:

200

total
integer

Total number of records

Example:

1253

page
integer

Current page number

Example:

1

pages
integer

Total number of pages

Example:

314

limit
integer

Number of records per page

Example:

4

data
object[]