Skip to main content
GET
/
subscription
/
api
/
v1
/
subscriptions
/
{id}
/
events?page=
{page}
&size=
{size}
Subscription Event History
curl --request GET \
  --url 'https://api.payaza.africa/live/subscription/api/v1/subscriptions/{id}/events?page={page}&size={size}' \
  --header 'Authorization: <api-key>'
import requests

url = "https://api.payaza.africa/live/subscription/api/v1/subscriptions/{id}/events?page={page}&size={size}"

headers = {"Authorization": "<api-key>"}

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

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

fetch('https://api.payaza.africa/live/subscription/api/v1/subscriptions/{id}/events?page={page}&size={size}', 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://api.payaza.africa/live/subscription/api/v1/subscriptions/{id}/events?page={page}&size={size}",
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: <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://api.payaza.africa/live/subscription/api/v1/subscriptions/{id}/events?page={page}&size={size}"

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

req.Header.Add("Authorization", "<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://api.payaza.africa/live/subscription/api/v1/subscriptions/{id}/events?page={page}&size={size}")
.header("Authorization", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.payaza.africa/live/subscription/api/v1/subscriptions/{id}/events?page={page}&size={size}")

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

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

response = http.request(request)
puts response.read_body
{
  "success": true,
  "message": "Success",
  "data": {
    "content": [
      {
        "id": 3,
        "subscriptionId": 21,
        "cycleNumber": 1,
        "attemptNumber": 1,
        "transactionReference": "SUB_ENROLL_21_1783539495235",
        "amount": 1000,
        "currency": "NGN",
        "description": "Subscription cycle 1 (enrollment charge)",
        "status": "SUCCESS",
        "respCode": null,
        "failureReason": null,
        "isRetriable": null,
        "isExternal": false,
        "chargedAt": "2026-07-08T19:38:18.30726",
        "nextRetryAt": null,
        "cardServiceResponse": null,
        "createdAt": "2026-07-08T19:38:18.307196",
        "updatedAt": "2026-07-08T19:38:18.307197"
      },
      {
        "id": 9,
        "subscriptionId": 21,
        "cycleNumber": 2,
        "attemptNumber": 1,
        "transactionReference": "SUB_CYCLE_2_A11783542029433",
        "amount": 20,
        "currency": "NGN",
        "description": "Custom Charge Test Rest",
        "status": "SUCCESS",
        "respCode": null,
        "failureReason": null,
        "isRetriable": null,
        "isExternal": false,
        "chargedAt": "2026-07-08T20:20:29.433374",
        "nextRetryAt": null,
        "cardServiceResponse": null,
        "createdAt": "2026-07-08T20:20:29.433369",
        "updatedAt": "2026-07-08T20:20:32.871194"
      },
      {
        "id": 10,
        "subscriptionId": 21,
        "cycleNumber": 3,
        "attemptNumber": 1,
        "transactionReference": "SUB_CYCLE_3_A11783543072399",
        "amount": 1000,
        "currency": "NGN",
        "description": "Subscription cycle 3",
        "status": "SUCCESS",
        "respCode": null,
        "failureReason": null,
        "isRetriable": null,
        "isExternal": false,
        "chargedAt": "2026-07-08T20:37:52.404149",
        "nextRetryAt": null,
        "cardServiceResponse": null,
        "createdAt": "2026-07-08T20:37:52.404128",
        "updatedAt": "2026-07-08T20:37:55.437197"
      },
      {
        "id": 12,
        "subscriptionId": 21,
        "cycleNumber": 4,
        "attemptNumber": 1,
        "transactionReference": "SUB_CYCLE_4_A11783543972681",
        "amount": 1000,
        "currency": "NGN",
        "description": "Subscription cycle 4",
        "status": "SUCCESS",
        "respCode": null,
        "failureReason": null,
        "isRetriable": null,
        "isExternal": false,
        "chargedAt": "2026-07-08T20:52:52.685766",
        "nextRetryAt": null,
        "cardServiceResponse": null,
        "createdAt": "2026-07-08T20:52:52.685744",
        "updatedAt": "2026-07-08T20:52:55.789479"
      },
      {
        "id": 13,
        "subscriptionId": 21,
        "cycleNumber": 5,
        "attemptNumber": 1,
        "transactionReference": "SUB_CYCLE_5_A11783544272773",
        "amount": 1000,
        "currency": "NGN",
        "description": "Subscription cycle 5",
        "status": "SUCCESS",
        "respCode": null,
        "failureReason": null,
        "isRetriable": null,
        "isExternal": false,
        "chargedAt": "2026-07-08T20:57:52.77686",
        "nextRetryAt": null,
        "cardServiceResponse": null,
        "createdAt": "2026-07-08T20:57:52.776841",
        "updatedAt": "2026-07-08T20:57:55.828179"
      }
    ],
    "pageable": {
      "sort": {
        "sorted": false,
        "unsorted": true,
        "empty": true
      },
      "pageNumber": 0,
      "pageSize": 20,
      "offset": 0,
      "paged": true,
      "unpaged": false
    },
    "last": true,
    "totalPages": 1,
    "totalElements": 5,
    "numberOfElements": 5,
    "first": true,
    "size": 20,
    "number": 0,
    "sort": {
      "sorted": false,
      "unsorted": true,
      "empty": true
    },
    "empty": false
  }
}

Authorizations

Authorization
string
header
required

Payaza {{Public API Key in Base 64}}

Path Parameters

id
integer
required

The unique identifier of the subscription.

Query Parameters

page
integer
required

The page number to be retrieved.

size
integer
required

The number of records per page.

Response

Request Successful

success
boolean

Indicates if the request was successful.

Example:

true

message
string

Descriptive message regarding the operation.

Example:

"Success"

data
object

The payload containing the paginated history of transaction charge attempts.