Check Refund Status
curl --request POST \
--url https://api.payaza.africa/live/card/card_charge/refund_status \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"service_payload": {
"refund_transaction_reference": "RF20231112-Q232USD"
}
}
'import requests
url = "https://api.payaza.africa/live/card/card_charge/refund_status"
payload = { "service_payload": { "refund_transaction_reference": "RF20231112-Q232USD" } }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({service_payload: {refund_transaction_reference: 'RF20231112-Q232USD'}})
};
fetch('https://api.payaza.africa/live/card/card_charge/refund_status', 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/card_charge/refund_status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'service_payload' => [
'refund_transaction_reference' => 'RF20231112-Q232USD'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.payaza.africa/live/card/card_charge/refund_status"
payload := strings.NewReader("{\n \"service_payload\": {\n \"refund_transaction_reference\": \"RF20231112-Q232USD\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.payaza.africa/live/card/card_charge/refund_status")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"service_payload\": {\n \"refund_transaction_reference\": \"RF20231112-Q232USD\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payaza.africa/live/card/card_charge/refund_status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"service_payload\": {\n \"refund_transaction_reference\": \"RF20231112-Q232USD\"\n }\n}"
response = http.request(request)
puts response.read_body{
"transactionReference": "T3737157",
"refundReference": "RF20231112-Q232USD",
"refundStatus": "SUCCESS",
"statusReason": "Refund processed successfully",
"refundDate": "2023-11-12T23:30:06.688465",
"refundedAmount": 5.2,
"parentTransactionAmount": 5.2,
"message": "Request Completed",
"statusOk": true
}Card Collection
Check Refund Status
This endpoint is used to fetch the status of a refunded card payment (transaction).
POST
/
card
/
card_charge
/
refund_status
Check Refund Status
curl --request POST \
--url https://api.payaza.africa/live/card/card_charge/refund_status \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"service_payload": {
"refund_transaction_reference": "RF20231112-Q232USD"
}
}
'import requests
url = "https://api.payaza.africa/live/card/card_charge/refund_status"
payload = { "service_payload": { "refund_transaction_reference": "RF20231112-Q232USD" } }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({service_payload: {refund_transaction_reference: 'RF20231112-Q232USD'}})
};
fetch('https://api.payaza.africa/live/card/card_charge/refund_status', 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/card_charge/refund_status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'service_payload' => [
'refund_transaction_reference' => 'RF20231112-Q232USD'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.payaza.africa/live/card/card_charge/refund_status"
payload := strings.NewReader("{\n \"service_payload\": {\n \"refund_transaction_reference\": \"RF20231112-Q232USD\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.payaza.africa/live/card/card_charge/refund_status")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"service_payload\": {\n \"refund_transaction_reference\": \"RF20231112-Q232USD\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payaza.africa/live/card/card_charge/refund_status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"service_payload\": {\n \"refund_transaction_reference\": \"RF20231112-Q232USD\"\n }\n}"
response = http.request(request)
puts response.read_body{
"transactionReference": "T3737157",
"refundReference": "RF20231112-Q232USD",
"refundStatus": "SUCCESS",
"statusReason": "Refund processed successfully",
"refundDate": "2023-11-12T23:30:06.688465",
"refundedAmount": 5.2,
"parentTransactionAmount": 5.2,
"message": "Request Completed",
"statusOk": true
}Authorizations
Payaza {{Public API Key in Base 64}}
Body
application/json
It contains the details of the service payload.
Show child attributes
Show child attributes
Response
Check Transaction Status Response
Indicates if the request was successful.
Example:
true
Response message.
Example:
"Request Completed"
The reference of the original transaction being refunded.
Example:
"T3737157"
Unique reference for this refund request.
Example:
"RF20231112-Q232USD"
Status of the refund (e.g., SUCCESS).
Example:
"SUCCESS"
Detailed reason for the status.
Example:
"Refund processed successfully"
Timestamp when the refund was processed.
Example:
"2023-11-12T23:30:06.688465"
The amount that was refunded.
Example:
5.2
The total amount of the original transaction.
Example:
5.2
⌘I