npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@amanbel/payment-verifier-sdk

v1.0.2

Published

Ethiopian payment transaction verification SDK for Telebirr, CBE and Bank of Abyssinia.

Readme

Ethiopian Payment Verifier

A Node.js/TypeScript SDK for verifying Ethiopian payment transactions.

Currently supported providers:

  • Telebirr
  • Commercial Bank of Ethiopia (CBE)
  • Bank of Abyssinia
  • More Comming Soon

Installation

npm install @amanbel/ethiopian-payment-verifier

Usage

The package provides a simple PaymentVerifier class that allows you to verify payment transactions from supported Ethiopian payment providers.

1. Import the PaymentVerifier

import { PaymentVerifier } from "ethiopian-payment-verifier";

2. Create an instance

Create a PaymentVerifier instance. No API URLs or provider configuration are required.

const paymentVerifier = new PaymentVerifier();

3. Verify a payment

Use the verify() method and provide the payment provider and transaction number.

Telebirr

const result = await paymentVerifier.verify({
  provider: "telebirr",
  transactionNumber: "YOUR_TRANSACTION_NUMBER",
});

CBE

const result = await paymentVerifier.verify({
  provider: "cbe",
  transactionNumber: "YOUR_RECEIPT_NUMBER",
});

Bank of Abyssinia

const result = await paymentVerifier.verify({
  provider: "abyssinia",
  transactionNumber: "YOUR_TRANSACTION_NUMBER",
});

4. Handle the verification result

The verify() method returns a result that indicates whether the payment was successfully verified.

if (result.success) {
  console.log("Payment verified successfully");
  console.log(result.data);
} else {
  console.error("Payment verification failed");
  console.error(result.error);
}

Complete Example

import { PaymentVerifier } from "ethiopian-payment-verifier";

async function verifyPayment() {
  const paymentVerifier = new PaymentVerifier();

  const result = await paymentVerifier.verify({
    provider: "telebirr",
    transactionNumber: "YOUR_TRANSACTION_NUMBER",
  });

  if (result.success) {
    console.log("Payment verified successfully");

    console.log("Payer:", result.data.payerName);
    console.log("Amount:", result.data.totalPaidAmount);
    console.log("Transaction:", result.data.invoiceNo);
    console.log("Payment Date:", result.data.paymentDate);
    console.log("Payment Provider:", result.data.payedFrom);
  } else {
    console.error("Payment verification failed:");
    console.error(result.error.message);
  }
}

verifyPayment();

Supported Payment Providers

The following payment providers are currently supported:

| Provider | Value | | ----------------- | ----------- | | Telebirr | telebirr | | CBE | cbe | | Bank of Abyssinia | abyssinia |

Transaction Data

When a payment is successfully verified, the data property contains standardized transaction information regardless of the payment provider.

{
  payerName: string;
  payerTelebirrNo: string;
  transactionStatus: string;
  invoiceNo: string;
  paymentDate: string;
  paymentReciever: string;
  settledAmount: string;
  serviceFee: string;
  serviceFeeVAT: string;
  totalPaidAmount: string;
  paymentReason: string;
  paymentChannel: string;
  payedFrom: string;
}

This allows your application to work with different payment providers using the same data structure.

For example:

if (result.success) {
  const payment = result.data;

  if (payment.transactionStatus === "success") {
    console.log(`Received ${payment.totalPaidAmount}`);
  }
}

Using a Different Provider

The same PaymentVerifier instance can be used to verify payments from different providers.

const paymentVerifier = new PaymentVerifier();

const telebirrPayment = await paymentVerifier.verify({
  provider: "telebirr",
  transactionNumber: "TELEBIRR_TRANSACTION",
});

const cbePayment = await paymentVerifier.verify({
  provider: "cbe",
  transactionNumber: "CBE_RECEIPT_NUMBER",
});

const abyssiniaPayment = await paymentVerifier.verify({
  provider: "abyssinia",
  transactionNumber: "ABYSSINIA_TRANSACTION",
});

Error Handling

A failed verification does not require you to catch an exception in normal usage. The result will contain success: false and an error.

const result = await paymentVerifier.verify({
  provider: "cbe",
  transactionNumber: "INVALID_TRANSACTION",
});

if (!result.success) {
  console.log(result.error.message);
}

You can also use try/catch to handle unexpected errors:

try {
  const result = await paymentVerifier.verify({
    provider: "telebirr",
    transactionNumber: "YOUR_TRANSACTION_NUMBER",
  });

  if (result.success) {
    console.log(result.data);
  } else {
    console.error(result.error.message);
  }
} catch (error) {
  console.error("Unexpected error:", error);
}