Skip to content

Request a refund

POST
/Transactions/RefundRequest
curl --request POST \
--url https://cybqa.pesapal.com/pesapalv3/api/Transactions/RefundRequest \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "confirmation_code": "example", "amount": "example", "username": "example", "remarks": "example" }'

Submits a refund request against a completed payment.

Only one request is accepted per payment. A second request against the same confirmation_code is rejected regardless of amount, so a partial refund permanently forecloses refunding the remainder.

The response carries no refund identifier, amount or timestamp, and getTransactionStatus continues to report the payment as completed. There is no way to query a refund afterwards, so log the request and response yourself.

Media typeapplication/json
object
confirmation_code
required

From a completed payment.

string
amount
required

May be less than the original amount.

string
username
required

Your identifier for whoever authorised the refund.

string
remarks
required
string
Examplegenerated
{
"confirmation_code": "example",
"amount": "example",
"username": "example",
"remarks": "example"
}

Returned for both success and failure. This response has no error key in either case. Read status.

Media typeapplication/json

Returned by cancellation and refund operations. There is no error key in this shape, on success or failure.

object
status

"200" on success, "500" on failure.

string
message
string
Examples
{
"status": "200",
"message": "Refund request successfully"
}