Initiate Refund/Reversal
curl --request POST \
--url https://dev.waftpay.io/payments/v1/refund-reversal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"transaction_reference": "TRC94513697913522",
"payment_uuid": "803556523944079845",
"amount": 400,
"notification_url": "https://webhook.site/679ced79-7dac-4977-be7a-3d600b39c245",
"remarks": "Test remarks"
}
'import requests
url = "https://dev.waftpay.io/payments/v1/refund-reversal"
payload = {
"transaction_reference": "TRC94513697913522",
"payment_uuid": "803556523944079845",
"amount": 400,
"notification_url": "https://webhook.site/679ced79-7dac-4977-be7a-3d600b39c245",
"remarks": "Test remarks"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
transaction_reference: 'TRC94513697913522',
payment_uuid: '803556523944079845',
amount: 400,
notification_url: 'https://webhook.site/679ced79-7dac-4977-be7a-3d600b39c245',
remarks: 'Test remarks'
})
};
fetch('https://dev.waftpay.io/payments/v1/refund-reversal', 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://dev.waftpay.io/payments/v1/refund-reversal",
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([
'transaction_reference' => 'TRC94513697913522',
'payment_uuid' => '803556523944079845',
'amount' => 400,
'notification_url' => 'https://webhook.site/679ced79-7dac-4977-be7a-3d600b39c245',
'remarks' => 'Test remarks'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://dev.waftpay.io/payments/v1/refund-reversal"
payload := strings.NewReader("{\n \"transaction_reference\": \"TRC94513697913522\",\n \"payment_uuid\": \"803556523944079845\",\n \"amount\": 400,\n \"notification_url\": \"https://webhook.site/679ced79-7dac-4977-be7a-3d600b39c245\",\n \"remarks\": \"Test remarks\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://dev.waftpay.io/payments/v1/refund-reversal")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"transaction_reference\": \"TRC94513697913522\",\n \"payment_uuid\": \"803556523944079845\",\n \"amount\": 400,\n \"notification_url\": \"https://webhook.site/679ced79-7dac-4977-be7a-3d600b39c245\",\n \"remarks\": \"Test remarks\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.waftpay.io/payments/v1/refund-reversal")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transaction_reference\": \"TRC94513697913522\",\n \"payment_uuid\": \"803556523944079845\",\n \"amount\": 400,\n \"notification_url\": \"https://webhook.site/679ced79-7dac-4977-be7a-3d600b39c245\",\n \"remarks\": \"Test remarks\"\n}"
response = http.request(request)
puts response.read_body{
"code": 102,
"status": "SUCCESS",
"description": "Request accepted",
"results": {
"request_uuid": "A333RTYUT"
}
}{
"error": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}{
"code": "400.001.100",
"status": "REJECTED",
"description": "Invalid or expired token",
"data": {}
}Collections
Initiate Refund/Reversal
Create a refund or reversal request for a collection payment.
POST
/
payments
/
v1
/
refund-reversal
Initiate Refund/Reversal
curl --request POST \
--url https://dev.waftpay.io/payments/v1/refund-reversal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"transaction_reference": "TRC94513697913522",
"payment_uuid": "803556523944079845",
"amount": 400,
"notification_url": "https://webhook.site/679ced79-7dac-4977-be7a-3d600b39c245",
"remarks": "Test remarks"
}
'import requests
url = "https://dev.waftpay.io/payments/v1/refund-reversal"
payload = {
"transaction_reference": "TRC94513697913522",
"payment_uuid": "803556523944079845",
"amount": 400,
"notification_url": "https://webhook.site/679ced79-7dac-4977-be7a-3d600b39c245",
"remarks": "Test remarks"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
transaction_reference: 'TRC94513697913522',
payment_uuid: '803556523944079845',
amount: 400,
notification_url: 'https://webhook.site/679ced79-7dac-4977-be7a-3d600b39c245',
remarks: 'Test remarks'
})
};
fetch('https://dev.waftpay.io/payments/v1/refund-reversal', 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://dev.waftpay.io/payments/v1/refund-reversal",
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([
'transaction_reference' => 'TRC94513697913522',
'payment_uuid' => '803556523944079845',
'amount' => 400,
'notification_url' => 'https://webhook.site/679ced79-7dac-4977-be7a-3d600b39c245',
'remarks' => 'Test remarks'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://dev.waftpay.io/payments/v1/refund-reversal"
payload := strings.NewReader("{\n \"transaction_reference\": \"TRC94513697913522\",\n \"payment_uuid\": \"803556523944079845\",\n \"amount\": 400,\n \"notification_url\": \"https://webhook.site/679ced79-7dac-4977-be7a-3d600b39c245\",\n \"remarks\": \"Test remarks\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://dev.waftpay.io/payments/v1/refund-reversal")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"transaction_reference\": \"TRC94513697913522\",\n \"payment_uuid\": \"803556523944079845\",\n \"amount\": 400,\n \"notification_url\": \"https://webhook.site/679ced79-7dac-4977-be7a-3d600b39c245\",\n \"remarks\": \"Test remarks\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.waftpay.io/payments/v1/refund-reversal")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"transaction_reference\": \"TRC94513697913522\",\n \"payment_uuid\": \"803556523944079845\",\n \"amount\": 400,\n \"notification_url\": \"https://webhook.site/679ced79-7dac-4977-be7a-3d600b39c245\",\n \"remarks\": \"Test remarks\"\n}"
response = http.request(request)
puts response.read_body{
"code": 102,
"status": "SUCCESS",
"description": "Request accepted",
"results": {
"request_uuid": "A333RTYUT"
}
}{
"error": "<string>",
"message": "<string>",
"param": "<string>",
"request_id": "<string>"
}{
"code": "400.001.100",
"status": "REJECTED",
"description": "Invalid or expired token",
"data": {}
}Overview
Use this endpoint to initiate a refund or reversal for a collection payment. The request is asynchronous: you receive arequest_uuid immediately, then check the final outcome via the status endpoint.
Auth: Requires a Collection token (Authorization: Bearer <collection_token>).
Endpoint
POST https://api.waftpay.io/payments/v1/refund-reversal
POST https://dev.waftpay.io/payments/v1/refund-reversal
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
transaction_reference | string | Yes | Original transaction reference to refund/reverse. |
payment_uuid | string | Yes | Original Waftpay payment UUID. |
amount | number | Yes | Amount to refund/reverse in major units. |
notification_url | string | Yes | HTTPS URL to receive the final status callback. |
remarks | string | No | Optional reason or notes. |
Example request
{
"transaction_reference": "TRC94513697913522",
"payment_uuid": "803556523944079845",
"amount": 400,
"notification_url": "https://webhook.site/679ced79-7dac-4977-be7a-3d600b39c245",
"remarks": "Test remarks"
}
Example response (accepted)
{
"code": 102,
"status": "SUCCESS",
"description": "Request accepted",
"results": {
"request_uuid": "A333RTYUT"
}
}
Next step
Use therequest_uuid to check the final outcome: Refund/Reversal status.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Original transaction reference to refund/reverse.
Original Waftpay payment UUID.
Amount to refund/reverse in major units.
HTTPS URL to receive final status callbacks.
Optional reason or notes.
