curl --request GET \
--url 'https://api.payaza.africa/live/card/auth_capture/authorize?status=AUTHORIZED&page={page}&size={size}&from_date={from_date}&to_date={to_date}' \
--header 'Authorization: <api-key>'import requests
url = "https://api.payaza.africa/live/card/auth_capture/authorize?status=AUTHORIZED&page={page}&size={size}&from_date={from_date}&to_date={to_date}"
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/card/auth_capture/authorize?status=AUTHORIZED&page={page}&size={size}&from_date={from_date}&to_date={to_date}', 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/card/auth_capture/authorize?status=AUTHORIZED&page={page}&size={size}&from_date={from_date}&to_date={to_date}",
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/card/auth_capture/authorize?status=AUTHORIZED&page={page}&size={size}&from_date={from_date}&to_date={to_date}"
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/card/auth_capture/authorize?status=AUTHORIZED&page={page}&size={size}&from_date={from_date}&to_date={to_date}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payaza.africa/live/card/auth_capture/authorize?status=AUTHORIZED&page={page}&size={size}&from_date={from_date}&to_date={to_date}")
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{
"authorizations": [
{
"authorization_reference": "AUTH-1234567890",
"status": "AUTHORIZED",
"authorization_amount": 100,
"captured_amount": 0,
"remaining_amount": 100,
"currency": "NGN",
"authorization_code": "123456",
"expires_at": "2025-01-19T10:30:00",
"created_at": "2025-01-12T10:30:00",
"updated_at": "2025-01-12T10:30:00",
"captured_at": null,
"voided_at": null,
"card_last_4": "2346",
"card_brand": "MASTERCARD",
"order_reference": "ORD-001",
"merchant_reference": "MR-001",
"customer_email": "customer@example.com",
"customer_name": "John Doe",
"error_reason": null,
"void_reason": null
}
],
"page": 0,
"size": 20,
"total_elements": 1,
"total_pages": 1,
"has_next": false,
"has_previous": false
}Get All Authorizations
The merchant uses this endpoint to fetch refund transaction history. The data output can be filtered using a date range and/or status..
curl --request GET \
--url 'https://api.payaza.africa/live/card/auth_capture/authorize?status=AUTHORIZED&page={page}&size={size}&from_date={from_date}&to_date={to_date}' \
--header 'Authorization: <api-key>'import requests
url = "https://api.payaza.africa/live/card/auth_capture/authorize?status=AUTHORIZED&page={page}&size={size}&from_date={from_date}&to_date={to_date}"
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/card/auth_capture/authorize?status=AUTHORIZED&page={page}&size={size}&from_date={from_date}&to_date={to_date}', 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/card/auth_capture/authorize?status=AUTHORIZED&page={page}&size={size}&from_date={from_date}&to_date={to_date}",
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/card/auth_capture/authorize?status=AUTHORIZED&page={page}&size={size}&from_date={from_date}&to_date={to_date}"
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/card/auth_capture/authorize?status=AUTHORIZED&page={page}&size={size}&from_date={from_date}&to_date={to_date}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payaza.africa/live/card/auth_capture/authorize?status=AUTHORIZED&page={page}&size={size}&from_date={from_date}&to_date={to_date}")
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{
"authorizations": [
{
"authorization_reference": "AUTH-1234567890",
"status": "AUTHORIZED",
"authorization_amount": 100,
"captured_amount": 0,
"remaining_amount": 100,
"currency": "NGN",
"authorization_code": "123456",
"expires_at": "2025-01-19T10:30:00",
"created_at": "2025-01-12T10:30:00",
"updated_at": "2025-01-12T10:30:00",
"captured_at": null,
"voided_at": null,
"card_last_4": "2346",
"card_brand": "MASTERCARD",
"order_reference": "ORD-001",
"merchant_reference": "MR-001",
"customer_email": "customer@example.com",
"customer_name": "John Doe",
"error_reason": null,
"void_reason": null
}
],
"page": 0,
"size": 20,
"total_elements": 1,
"total_pages": 1,
"has_next": false,
"has_previous": false
}Authorizations
Payaza {{Public API Key in Base 64}}
Path Parameters
Authorization status to filter results (e.g. AUTHORIZED, PENDING, FAILED).
Start date for filtering records, in yyyy-MM-dd HH:mm:ss format.
End date for filtering records, in yyyy-MM-dd HH:mm:ss format.
Page number for paginated results.
The number of records to return per page.
Response
Get All Authorizations Response
Error status (present in error responses).
"ERROR"
Error message details (present in error responses).
"Invalid date format. Use ISO 8601 format (e.g., 2024-01-01T00:00:00)"
List of authorization records.
Show child attributes
Show child attributes
Current page index (0-based).
0
Number of items per page.
20
Total number of authorization records found.
1
Total number of pages available.
1
Indicates if there is a next page.
false
Indicates if there is a previous page.
false