Payments
Verify a Payment
Retrieve a verified receipt for a completed transaction.
Verify a Payment
GET /v1/transactions/:reference/verify
Returns full receipt details for a completed transaction. Use this to confirm payment before fulfilling an order.
Returns 400 if the transaction is not yet completed. Poll
Retrieve first if you need to check status
before verifying.
Request
raw HTTP
npm install @e-pay/nodepip install epaycomposer require epay-et/php-sdkgo get github.com/epay-et/go-sdkcurl https://api.e-pay.et/v1/transactions/PAB12CD3420260813/verify \
-H "Authorization: Bearer sk_live_your_key_here"import { Epay, EpayBadRequestError } from '@e-pay/node';
const epay = new Epay({ apiKey: process.env.EPAY_SECRET_KEY });
try {
const receipt = await epay.payments.verify(reference);
// receipt.status === 'completed', plus serviceFee, paymentMethod, customer
await fulfil(receipt.merchantReference!, receipt.amount);
} catch (error) {
// The API rejects anything not yet completed.
if (error instanceof EpayBadRequestError) return 'not settled yet';
throw error;
}
const res = await fetch('https://api.e-pay.et/v1/transactions/PAB12CD3420260813/verify', {
headers: { Authorization: `Bearer ${process.env.EPAY_SECRET_KEY}` },
});
if (!res.ok) throw new Error(`ePay ${res.status}: ${await res.text()}`);
const receipt = await res.json();from epay import Epay, EpayBadRequestError
epay = Epay() # reads EPAY_SECRET_KEY
try:
receipt = epay.payments.verify(reference) # receipt["status"] == "completed", plus serviceFee, paymentMethod, customer
fulfil(receipt["merchantReference"], receipt["amount"])
except EpayBadRequestError: # The API rejects anything not yet completed.
return "not settled yet"
import os
import requests
res = requests.get(
"https://api.e-pay.et/v1/transactions/PAB12CD3420260813/verify",
headers={"Authorization": f"Bearer {os.environ['EPAY_SECRET_KEY']}"},
timeout=30,
)
res.raise_for_status()
receipt = res.json()use Epay\Epay;
use Epay\Exception\EpayBadRequestException;
$epay = new Epay(); // reads EPAY_SECRET_KEY
try {
$receipt = $epay->payments->verify($reference);
// $receipt['status'] === 'completed', plus serviceFee, paymentMethod, customer
fulfil($receipt['merchantReference'], $receipt['amount']);
} catch (EpayBadRequestException) {
// The API rejects anything not yet completed.
return 'not settled yet';
}
$ch = curl_init('https://api.e-pay.et/v1/transactions/PAB12CD3420260813/verify');
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 >= 400) {
throw new RuntimeException("ePay {$status}: {$body}");
}
$receipt = json_decode($body, true);receipt, err := client.Payments.Verify(ctx, reference)
switch {
case errors.Is(err, epay.ErrBadRequest):
// The API rejects anything not yet completed.
return errNotSettledYet
case err != nil:
return err
}
// receipt.Status == epay.StatusCompleted, plus ServiceFee, PaymentMethod, Customer
return fulfil(receipt.MerchantReference, receipt.Amount)
req, _ := http.NewRequestWithContext(ctx, http.MethodGet, "https://api.e-pay.et/v1/transactions/PAB12CD3420260813/verify", 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 >= 400 {
return fmt.Errorf("ePay %d", res.StatusCode)
}
var receipt struct {
Reference string `json:"reference"`
Status string `json:"status"`
Amount string `json:"amount"`
ServiceFee *string `json:"serviceFee"`
PaymentMethod *string `json:"paymentMethod"`
PaidAt string `json:"paidAt"`
}
if err := json.NewDecoder(res.Body).Decode(&receipt); err != nil {
return err
}Response
{
"reference": "PAB12CD3420260813",
"merchantReference": "order_123",
"status": "completed",
"amount": "250.00",
"serviceFee": "7.50",
"currencyCode": "ETB",
"paymentMethod": "telebirr",
"customer": {
"name": "Abebe Bikila",
"email": "abebe@example.com",
"phone": "+251911234567"
},
"paidAt": "2026-08-13T11:47:00.000Z",
"createdAt": "2026-08-13T11:30:00.000Z"
}Path Parameters
Prop
Type
Response
Prop
Type
Errors
| Status | Description |
|---|---|
400 | Transaction is not yet completed (message includes the current status). |
401 | Missing or invalid API key. |
404 | No transaction found for the given reference under your account. |
Next: Cancel a Payment — void a pending session.