This API provides verification services for payment transactions made through Commercial Bank of Ethiopia (CBE) and Telebirr mobile payment platforms in Ethiopia.
It allows applications to verify the authenticity and details of payment receipts by reference numbers or uploaded images.
β οΈ Disclaimer: This is not an official API. I am not affiliated with Ethio Telecom, Telebirr, or Commercial Bank of Ethiopia (CBE). This tool is built for personal and developer utility purposes only and scrapes publicly available data.
- Verifies CBE bank transfers using reference number and account suffix
- Extracts key payment details:
- Payer name and account
- Receiver name and account
- Transaction amount
- Payment date and time
- Reference number
- Payment description/reason
- Verifies Telebirr mobile money transfers using a reference number
- Extracts key transaction details:
- Payer name and Telebirr number
- Credited party name and account
- Transaction status
- Receipt number
- Payment date
- Settled amount
- Service fees and VAT
- Total paid amount
- Verifies payments by analyzing uploaded receipt images
- Uses Mistral AI to detect receipt type and extract transaction details
- Supports both CBE and Telebirr receipt screenshots
Due to regional restrictions by the Telebirr system, hosting the verify-telebirr
endpoint outside of Ethiopia (e.g., on a VPS like Hetzner or AWS) may result in failed receipt verification. Specifically:
- Telebirrβs receipt pages (
https://transactioninfo.ethiotelecom.et/receipt/[REFERENCE]
) often block or timeout requests made from foreign IP addresses. - This results in errors such as
ERR_FAILED
,403
, or DNS resolution failures.
- VPS or cloud servers located outside Ethiopia
- Ethiopian-hosted servers (e.g., Ethio Telecom web hosting, TeleCloud VPS)
- Developers self-hosting the code on infrastructure based in Ethiopia
This project includes a secondary Telebirr verification relay hosted inside Ethiopia. When the primary verify-telebirr
fetch fails on your foreign VPS, the server can fallback to our proxy to complete the verification.
For best results and full control, clone the repository and self-host from inside Ethiopia.
If you know your environment cannot access the primary endpoint, set the following in your .env
:
SKIP_PRIMARY_VERIFICATION=true
This will skip the primary Telebirr receipt fetch entirely and go straight to the fallback proxy β only for your local use case. Other users can still benefit from both layers.
# Clone the repository
git clone https://github.com/Vixen878/verifier-api
# Navigate to the project directory
cd verifier-api
# Install dependencies
pnpm install
pnpm dev
pnpm build
pnpm start
Verify a CBE payment using a reference number and account suffix.
Requires API Key
Request Body:
{
"reference": "REFERENCE_NUMBER",
"accountSuffix": "ACCOUNT_SUFFIX"
}
Verify a Telebirr payment using a reference number.
Requires API Key
Request Body:
{
"reference": "REFERENCE_NUMBER"
}
Requires API Key
Verify a payment by uploading an image of the receipt. This endpoint supports both CBE and Telebirr screenshots.
Request Body: Multipart form-data with an image file.
- Optional Query Param:
?autoVerify=true
When enabled, the system detects the receipt type and routes it to the correct verification flow automatically. - Note: If the auto-detected receipt is from CBE, the request must include your
Suffix
(last 8 digits of your account).
curl -X POST https://verifyapi.leulzenebe.pro/verify-cbe \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "reference": "FT2513001V2G", "accountSuffix": "39003377" }'
curl -X POST https://verifyapi.leulzenebe.pro/verify-telebirr \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "reference": "CE2513001XYT" }'
curl -X POST https://verifyapi.leulzenebe.pro/verify-image?autoVerify=true \
-H "x-api-key: YOUR_API_KEY" \
-F "file=@yourfile.jpg" \
-F "suffix=39003377"
Check if the API is running properly.
No API Key Required
Response:
{
"status": "ok",
"timestamp": "2023-06-15T12:34:56.789Z"
}
Get information about the API and available endpoints.
Response:
{
"message": "Verifier API is running",
"version": "1.0.0",
"endpoints": ["/verify-cbe", "/verify-telebirr", "/verify-image"],
"health": "/health",
"documentation": "https://github.com/Vixen878/verifier-api"
}
All verification endpoints require a valid API key.
Pass the key using either:
- Header:
x-api-key: YOUR_API_KEY
- Query:
?apiKey=YOUR_API_KEY
To generate an API key, visit: https://verify.leul.et
Use your API key to call endpoints from:
https://verifyapi.leulzenebe.pro/[endpoint]
API Documentation: https://verify.leul.et/docs
Requires
x-admin-key
in header (from your environment config).
Generate a new API key.
{
"owner": "your-identifier"
}
List existing API keys (masked view).
Retrieve usage statistics:
- Request count by endpoint
- Success/failure ratio
- Average response time
- Requests by IP
Create a .env
file in the root directory with the following variables:
PORT=3001
NODE_ENV=development # or production
LOG_LEVEL=info # or debug, error
MISTRAL_API_KEY=your_mistral_api_key # Required for image verification
SKIP_PRIMARY_VERIFICATION=false # Set to true to bypass primary fetch
You can get an API key for Mistral AI from https://mistral.ai/
- Uses
winston
for structured logging. - Log files are stored under the
logs/
directory:logs/error.log
β error-level logslogs/combined.log
β all logs including debug/info
debug
logs are only visible in development mode (NODE_ENV !== 'production'
).
To override log level manually:
LOG_LEVEL=debug
Method | Endpoint | Auth | Description |
---|---|---|---|
POST | /verify-cbe |
β | CBE transaction by reference + suffix |
POST | /verify-telebirr |
β | Telebirr receipt by reference |
POST | /verify-image |
β | Image upload for receipt OCR |
GET | /health |
β | Health check |
GET | / |
β | API metadata |
GET | /admin/stats |
π | API usage stats |
GET | /admin/api-keys |
π | List all API keys |
POST | /admin/api-keys |
π | Generate API key |
- Node.js with Express
- TypeScript
- Axios β HTTP requests
- Cheerio β HTML parsing
- Puppeteer β headless browser automation (used for CBE scraping)
- Winston β structured logging
- Prisma + MySQL (persistent storage)
- Mistral AI β OCR for image-based verification
apiKey
model stores API key, usage count, owner, timestamps.usageLog
model stores every request metadata:- endpoint, method, status code, duration, IP, API key ID
Stats are used for /admin/stats
endpoint and dashboard monitoring.
MIT License β see the LICENSE file for details.
Leul Zenebe
Creofam LLC
π creofam.com
π Personal Site