Fetch Refund History
curl --request GET \
--url 'https://api.payaza.africa/live/refund-chargeback/refund/merchant/api/refund_history?from={from}&to={to}¤cy={currency}&page={page}&size={size}&refund_status={refund_status}&refund_reference={refund_reference}' \
--header 'Authorization: <api-key>'import requests
url = "https://api.payaza.africa/live/refund-chargeback/refund/merchant/api/refund_history?from={from}&to={to}¤cy={currency}&page={page}&size={size}&refund_status={refund_status}&refund_reference={refund_reference}"
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/refund-chargeback/refund/merchant/api/refund_history?from={from}&to={to}¤cy={currency}&page={page}&size={size}&refund_status={refund_status}&refund_reference={refund_reference}', 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/refund-chargeback/refund/merchant/api/refund_history?from={from}&to={to}¤cy={currency}&page={page}&size={size}&refund_status={refund_status}&refund_reference={refund_reference}",
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/refund-chargeback/refund/merchant/api/refund_history?from={from}&to={to}¤cy={currency}&page={page}&size={size}&refund_status={refund_status}&refund_reference={refund_reference}"
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/refund-chargeback/refund/merchant/api/refund_history?from={from}&to={to}¤cy={currency}&page={page}&size={size}&refund_status={refund_status}&refund_reference={refund_reference}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payaza.africa/live/refund-chargeback/refund/merchant/api/refund_history?from={from}&to={to}¤cy={currency}&page={page}&size={size}&refund_status={refund_status}&refund_reference={refund_reference}")
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{
"status": "success",
"message": "Refund History Success.",
"data": {
"content": [
{
"id": 28824,
"refund_amount": 0.05,
"transaction_amount": 0.05,
"transaction_fee": 0,
"transaction_reference": "RF20230228-PS56JY26JYJ0USD",
"mpgs_refund_type": "REFUNDED",
"mpgs_refund_status": "SUCCESS",
"refund_order_id": "QA-PL-1KBPSCJCRD947",
"refund_transaction_id": "RF20230228-LDUUSD",
"start_at": "2024-08-06 12:44:48.652847",
"end_at": "2024-08-06 12:44:50.408276",
"transaction": {
"id": 20149381,
"description": "Test for Headers",
"ended_at": "2024-08-05 12:03:13.777000",
"fee_amount": 0,
"rrn": "000812310925",
"collection_channel": "Card",
"started_at": "2024-08-05 12:03:13.777000",
"status_reason": "Payment Approved",
"transaction_amount": 0.05,
"transaction_reference": "QA-PL-1KBPSCJCRD947",
"transaction_status": "Completed",
"customer": {
"id": 29425269,
"email_address": "johndoe@gmail.com",
"first_name": "John",
"last_name": "Doe",
"mobile_number": "08123456789"
},
"currency": {
"id": 2,
"name": "US Dollar",
"code": "USD",
"html_code": "$",
"iso_code": "USA",
"unicode": "$",
"active": true
}
},
"status_reason": "Refund processed successfully",
"merchant_name": "Integration"
}
],
"total": 1,
"last": false,
"first": true,
"pageable": {
"page": 1,
"size": 10
}
}
}Refunds And Chargebacks
Fetch Refund History
The merchant uses this endpoint to fetch refund transaction history for card transactions. The data output can be filtered using a date range and/or status..
GET
/
refund-chargeback
/
refund
/
merchant
/
api
/
refund_history?from=
{from}
&to=
{to}
¤cy=
{currency}
&page=
{page}
&size=
{size}
&refund_status=
{refund_status}
&refund_reference=
{refund_reference}
Fetch Refund History
curl --request GET \
--url 'https://api.payaza.africa/live/refund-chargeback/refund/merchant/api/refund_history?from={from}&to={to}¤cy={currency}&page={page}&size={size}&refund_status={refund_status}&refund_reference={refund_reference}' \
--header 'Authorization: <api-key>'import requests
url = "https://api.payaza.africa/live/refund-chargeback/refund/merchant/api/refund_history?from={from}&to={to}¤cy={currency}&page={page}&size={size}&refund_status={refund_status}&refund_reference={refund_reference}"
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/refund-chargeback/refund/merchant/api/refund_history?from={from}&to={to}¤cy={currency}&page={page}&size={size}&refund_status={refund_status}&refund_reference={refund_reference}', 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/refund-chargeback/refund/merchant/api/refund_history?from={from}&to={to}¤cy={currency}&page={page}&size={size}&refund_status={refund_status}&refund_reference={refund_reference}",
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/refund-chargeback/refund/merchant/api/refund_history?from={from}&to={to}¤cy={currency}&page={page}&size={size}&refund_status={refund_status}&refund_reference={refund_reference}"
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/refund-chargeback/refund/merchant/api/refund_history?from={from}&to={to}¤cy={currency}&page={page}&size={size}&refund_status={refund_status}&refund_reference={refund_reference}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payaza.africa/live/refund-chargeback/refund/merchant/api/refund_history?from={from}&to={to}¤cy={currency}&page={page}&size={size}&refund_status={refund_status}&refund_reference={refund_reference}")
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{
"status": "success",
"message": "Refund History Success.",
"data": {
"content": [
{
"id": 28824,
"refund_amount": 0.05,
"transaction_amount": 0.05,
"transaction_fee": 0,
"transaction_reference": "RF20230228-PS56JY26JYJ0USD",
"mpgs_refund_type": "REFUNDED",
"mpgs_refund_status": "SUCCESS",
"refund_order_id": "QA-PL-1KBPSCJCRD947",
"refund_transaction_id": "RF20230228-LDUUSD",
"start_at": "2024-08-06 12:44:48.652847",
"end_at": "2024-08-06 12:44:50.408276",
"transaction": {
"id": 20149381,
"description": "Test for Headers",
"ended_at": "2024-08-05 12:03:13.777000",
"fee_amount": 0,
"rrn": "000812310925",
"collection_channel": "Card",
"started_at": "2024-08-05 12:03:13.777000",
"status_reason": "Payment Approved",
"transaction_amount": 0.05,
"transaction_reference": "QA-PL-1KBPSCJCRD947",
"transaction_status": "Completed",
"customer": {
"id": 29425269,
"email_address": "johndoe@gmail.com",
"first_name": "John",
"last_name": "Doe",
"mobile_number": "08123456789"
},
"currency": {
"id": 2,
"name": "US Dollar",
"code": "USD",
"html_code": "$",
"iso_code": "USA",
"unicode": "$",
"active": true
}
},
"status_reason": "Refund processed successfully",
"merchant_name": "Integration"
}
],
"total": 1,
"last": false,
"first": true,
"pageable": {
"page": 1,
"size": 10
}
}
}Authorizations
Payaza {{Public API Key in Base 64}}
Path Parameters
The start date range to filter data in YYYY-MM-DD format
The end date range to filter data in YYYY-MM-DD format
The ISO 4217 alpha-3 currency code. e.g. NGN, USD
The page number
The total number of transactions per page.
“Success” or “Initialized”
The refund reference
⌘I