Payment verifier
A payment check for your subscription app
A payment gateway here asks for a business license. That blocks a solo developer who just needs subscriptions to renew. Your customer pays you. Your server sends the receipt and the price. VerifyETB asks the bank, then tells you if the payment covers it.
The key is a normal secret. Python, PHP, Node, and every other language send it the same way. Follow the steps below, then copy the example for the language you already use.
- 1
Create an account
Open verifyetb.site and create an account.
- 2
Create a workspace
Open verifyetb.site/workspace and create a workspace. That workspace is your app.
- 3
Create a key
On the workspace page, open Keys and create a key. It is shown once and starts with vk_. Copy it before you close the sheet.
- 4
Save the key on your server
The same key works in Python, PHP, Node, Go, Java, and every other language. Save it as VERIFYETB_KEY. Keep it on the server. Keep it out of the website, the mobile app, and git.
VERIFYETB_KEY=vk_live_…
Your screen, VerifyETB behind it
The customer stays in your app. You add the capture button and the reference box. Your server holds the key and sends what they entered to /api/v1/receipts. VerifyETB asks the bank. When ok is true and the amount covers the price, grant the purchase. Save the sender, the receiver, the reference, the provider, the amount, and the time in your own database.
Capture
Your app opens the camera or the photo picker. The customer photographs the Telebirr, CBE, or other receipt. Your server uploads that photo as file and the price as expectedAmount. VerifyETB reads the bank and the transaction number from the picture.
Reference number
Your app has a box for the transaction number. The customer can also paste the receipt link or the SMS. Your server sends that text as reference. A link or an SMS usually names the bank. A bare number also needs bank, such as cbe or telebirr. Some banks need accountNumber, the last digits of the account.
Any language that can send HTTPS uses the same call. Put the key in the Authorization header.
curl https://verifyetb.site/api/v1/receipts \ -H "Authorization: Bearer $VERIFYETB_KEY" \ -F "file=@receipt.jpg" \ -F "expectedAmount=500"
When something is wrong
- A missing or wrong key is refused.
- A full monthly quota is refused until the next month.
- Some banks also need the last digits of the account. Send those with the receipt and try again.
A note when the check finishes
In the workspace, open Hooks and add an address on your server. After each check, VerifyETB sends the same answer there. Use the secret shown when you create the hook to confirm the note came from VerifyETB.
For your code agent
Paste this into Cursor, Antigravity, OpenCode, or the agent you already use. You can also save it as AGENTS.md in the project. The agent keeps the key in VERIFYETB_KEY and writes the check in the language that project already uses.
# VerifyETB
This app needs to confirm an Ethiopian bank or wallet payment. A payment gateway here asks for a business license. Use VerifyETB instead. The customer pays the business directly. VerifyETB checks whether the receipt is real and whether it covers the price.
The API key is a normal HTTPS secret. It works from Python, PHP, Node, Go, Java, C#, Ruby, and any other language that can send an HTTP request. Do not install a Node package unless this project is already Node.
Do these steps:
1. Create an account on https://verifyetb.site
2. Create a workspace on https://verifyetb.site/workspace
3. On the workspace page, open Keys and create a key. It is shown once and starts with `vk_`. Copy it before the sheet closes.
4. Put that key in this app's environment as `VERIFYETB_KEY`. Keep it on the server only. Keep it out of the browser, the mobile app, and git.
5. From the server, POST the receipt to https://verifyetb.site/api/v1/receipts with the header `Authorization: Bearer <the key>`.
Build both ways into this app. The customer never opens VerifyETB.
- Capture: a camera or photo picker. The server uploads that photo as `file` with `expectedAmount`. VerifyETB reads the bank and the transaction number from the picture.
- Reference number: a text box. The customer types the transaction number, or pastes the receipt link or the SMS. The server sends that text as `reference` with `expectedAmount`. A link or an SMS usually names the bank. A bare number also sends `bank`. Some banks also need `accountNumber`.
`expectedAmount` is the price in ETB. A subscription that costs 500 ETB sends `500`.
`ok: true` means the bank confirmed the receipt and the amount is at least that price. Grant the period. Save the sender, the receiver, the reference, the provider, the amount, and the time in this app's database. One reference pays for one period.
`ok: false` means do not grant it. Show `reason`. A receipt under the price is `ok: false` (400 ETB does not cover a 500 ETB plan). A missing or wrong key returns HTTP 401. A full monthly quota returns HTTP 429.
Leave the bank out when the receipt already names it. If the answer asks for the last digits of the account or a phone number, collect those and send the receipt again as `accountNumber` or `phoneNumber`.
A link, an SMS, or a transaction number can be sent as JSON instead of a file:
```json
{ "reference": "FT26140P01YB", "bank": "cbe", "accountNumber": "12345678", "expectedAmount": 500 }
```
## Python
```python
import os
import requests
with open("receipt.jpg", "rb") as receipt:
payment = requests.post(
"https://verifyetb.site/api/v1/receipts",
headers={"Authorization": f"Bearer {os.environ['VERIFYETB_KEY']}"},
files={"file": receipt},
data={"expectedAmount": "500"},
timeout=60,
).json()
```
## PHP
```php
$key = getenv("VERIFYETB_KEY");
$ch = curl_init("https://verifyetb.site/api/v1/receipts");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer $key"],
CURLOPT_POSTFIELDS => [
"file" => new CURLFile("receipt.jpg", "image/jpeg", "receipt.jpg"),
"expectedAmount" => "500",
],
]);
$payment = json_decode(curl_exec($ch), true);
```
## Node
A normal `fetch` is enough. `npm install verifyetb` is optional and only for Node 18 or newer.
```js
import fs from "node:fs/promises";
const form = new FormData();
form.append("file", new Blob([await fs.readFile("receipt.jpg")]), "receipt.jpg");
form.append("expectedAmount", "500");
const payment = await fetch("https://verifyetb.site/api/v1/receipts", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.VERIFYETB_KEY}` },
body: form,
}).then((res) => res.json());
```
A hook is optional. If you add one in the workspace, the header `x-verifyetb-signature` is `sha256=` plus HMAC-SHA256 of the raw body, using the secret shown when you created the hook. Check that signature in this project's language before trusting the note.
Guide: https://verifyetb.site/docs