Refunds

Retrieve a Refund

Fetch a single refund by its ePay reference.

Retrieve a Refund

GET /v1/refunds/:reference

Fetches a single refund by its ePay reference (prefixed with RF).

Connect

Platforms can call this on behalf of a connected business with the ePay-Account header. Requires the read_only scope. You only see payments your app created through that connection. See Act on behalf.


Request

raw HTTP
npm install @e-pay/node
npm install @e-pay/nestjs
pip install epay
pip install epay
pip install epay
pip install epay
composer require epay-et/php-sdk
composer require epay-et/php-sdk
implementation("com.epayethiopia:epay-java:0.1.0")
implementation("com.epayethiopia:epay-spring-boot-starter:0.1.0")
go get github.com/epay-et/go-sdk

Nothing NestJS-specific here — this is the same Node.js client call.

Nothing Django-specific here — this is the same Python client call.

Nothing Flask-specific here — this is the same Python client call.

Nothing FastAPI-specific here — this is the same Python client call.

Nothing Laravel-specific here — this is the same PHP client call.

Nothing Spring Boot-specific here — this is the same Java client call.

curl https://api.epayet.dev/v1/refunds/RF3A4B5C6D20261021 \
  -H "Authorization: Bearer sk_live_your_key_here"
import { Epay } from '@e-pay/node';

const epay = new Epay({ apiKey: process.env.EPAY_SECRET_KEY });

const { refund } = await epay.refunds.retrieve('RF3A4B5C6D20261021');

console.log(refund.status); // refund_status_completed
const res = await fetch('https://api.epayet.dev/v1/refunds/RF3A4B5C6D20261021', {
  headers: { Authorization: `Bearer ${process.env.EPAY_SECRET_KEY}` },
});

if (!res.ok) throw new Error(`ePay ${res.status}: ${await res.text()}`);
const { refund } = (await res.json()).data;
from epay import Epay

epay = Epay()  # reads EPAY_SECRET_KEY

result = epay.refunds.retrieve("RF3A4B5C6D20261021")
print(result.refund.status)  # refund_status_completed
import os
import requests

res = requests.get(
    "https://api.epayet.dev/v1/refunds/RF3A4B5C6D20261021",
    headers={"Authorization": f"Bearer {os.environ['EPAY_SECRET_KEY']}"},
    timeout=30,
)

res.raise_for_status()
refund = res.json()["data"]["refund"]
use Epay\Epay;

$epay = new Epay(); // reads EPAY_SECRET_KEY

$result = $epay->refunds->retrieve('RF3A4B5C6D20261021');
echo $result->refund->status; // refund_status_completed
$ch = curl_init('https://api.epayet.dev/v1/refunds/RF3A4B5C6D20261021');

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ['Authorization: Bearer ' . getenv('EPAY_SECRET_KEY')],
]);

$body   = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);

if ($status !== 200) throw new RuntimeException("ePay {$status}: {$body}");
$refund = json_decode($body, true)['data']['refund'];
result, err := client.Refunds.Retrieve(ctx, "RF3A4B5C6D20261021")
if err != nil {
	return err
}

fmt.Println(result.Refund.Status) // refund_status_completed
req, _ := http.NewRequestWithContext(ctx, http.MethodGet,
	"https://api.epayet.dev/v1/refunds/RF3A4B5C6D20261021", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("EPAY_SECRET_KEY"))

res, err := http.DefaultClient.Do(req)
if err != nil {
	return err
}
defer res.Body.Close()

if res.StatusCode != http.StatusOK {
	return fmt.Errorf("ePay %d", res.StatusCode)
}
Epay epay = Epay.fromEnvironment();

RetrieveRefundResult result = epay.refunds().retrieve("RF3A4B5C6D20261021");
System.out.println(result.getRefund().getStatus()); // refund_status_completed
HttpClient http = HttpClient.newHttpClient();

HttpRequest request = HttpRequest.newBuilder(
        URI.create("https://api.epayet.dev/v1/refunds/RF3A4B5C6D20261021"))
    .header("Authorization", "Bearer " + System.getenv("EPAY_SECRET_KEY"))
    .GET()
    .build();

HttpResponse<String> response = http.send(request, HttpResponse.BodyHandlers.ofString());

if (response.statusCode() != 200) {
    throw new IllegalStateException("ePay " + response.statusCode());
}

Path Parameters

Prop

Type


Response

Returns 200 OK with the refund in data.refund.

{
  "status": "success",
  "data": {
    "refund": {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "epayReference": "RF3A4B5C6D20261021",
      "type": "refund_type_full",
      "status": "refund_status_completed",
      "amount": "250.00",
      "refundFeeAmount": "0.00",
      "merchantDebitAmount": "250.00",
      "reason": "Customer requested cancellation",
      "merchantReference": "refund_order_123",
      "createdAt": "2026-10-21T10:00:00.000Z"
    }
  }
}

See Initiate a Refund for the full field reference.


Errors

StatusDescription
401Missing or invalid API key.
404No refund found for the given reference under your account.

On this page