Merchant API
Connect your shop's POS, ERP, or backend to PayProof. Submit a receipt, read the result, and list transactions with pagination, date ranges, filters, and receipt images. This is company-scoped verification, not the Gateway checkout product.
https://api.payproof.etAuthorization: Bearer mk_live_...multipart/form-dataQuick connect
Create a key in the Telegram mini app, then make one request. If this returns a list of employees, your key, base URL, and network path are correct.
curl https://api.payproof.et/api/merchant/v1/employees/ \
-H "Authorization: Bearer mk_live_..."{
"employees": [
{ "id": 12, "name": "Abebe Kebede", "role": "employee" }
]
}1. Create a key
In the PayProof Telegram mini app, open Settings → Merchant API. Create a named key. The mk_live_... secret is shown once. Only the company account can create, update, or revoke Merchant API keys.
Save an HTTPS webhook URL on the key if you want PayProof to notify you when a verification finishes. HTTP is accepted only for a local or private address.
2. Submit a receipt
employee_id is always required. A receipt photo by itself is enough. A reference or message must include bank_name on the same request. There is no second call to choose a bank.
bank_name is one of CBE, CBEBIRR, BOA, TELEBIRR, AWASH, or DASHEN. Bank of Abyssinia (BOA) also needs receiver_account on the first request, either the full number or the last five digits.
curl -X POST https://api.payproof.et/api/merchant/v1/verifications/ \
-H "Authorization: Bearer mk_live_..." \
-F "employee_id=12" \
-F "reference=FT1234567890" \
-F "bank_name=CBE" \
-F "message=Paid at the counter" \
-F "images=@receipt.jpg"Successful submission returns HTTP 201 and a verification envelope:
{
"outcome": "pending",
"message": "Verification is still running.",
"verification": {
"id": 123,
"status": "PENDING",
"processing_stage": "ocr_extracting",
"bank_name": "CBE",
"reference_number": "FT1234567890"
}
}3. Read one result
curl https://api.payproof.et/api/merchant/v1/verifications/123/ \
-H "Authorization: Bearer mk_live_..."The response has outcome (pending, success, or error), a message, and verification with the full status. While it runs, verification.status stays pending and processing_stage says which step it is on.
When it finishes, the same call returns the amount, reference, bank, employee name, and any failure reason in admin_note. A signed webhook can replace polling.
4. List transactions
GET /api/merchant/v1/verifications/ returns the company's transactions newest first by default. The response always includes pagination metadata.
curl "https://api.payproof.et/api/merchant/v1/verifications/?page=1&page_size=20&sort_by=verified_at&sort_dir=desc" \
-H "Authorization: Bearer mk_live_..."| Parameter | Values | Default | Meaning |
|---|---|---|---|
| page | integer ≥ 1 | 1 | Page number. |
| page_size | 1–100 | 20 | Rows per page. |
| sort_by | verified_at, transaction_date | verified_at | Primary sort field. |
| sort_dir | desc, asc | desc | Newest → oldest, or oldest → newest. |
| order | latest, oldest | — | Alias for sort_dir: latest = desc, oldest = asc. |
| date_field | transaction_date, verified_at | transaction_date | Which date the range filters on. |
| date_from | YYYY-MM-DD | — | Inclusive start date in Africa/Addis_Ababa. |
| date_to | YYYY-MM-DD | — | Inclusive end date in Africa/Addis_Ababa. |
| status | VERIFIED, FAILED, REJECTED, MANUAL_REVIEW, PENDING, PROCESSING | — | Comma-separated list. |
| outcome | success, error, pending | — | Convenience status grouping. |
| bank_name | CBE, CBEBIRR, BOA, TELEBIRR, AWASH, DASHEN | — | Comma-separated list. |
| employee_id | integer | — | Only this employee's verifications. |
| reference | string | — | Exact reference number, including canonical matches. |
| include_images | true, false | true | Set false to omit image fields entirely. |
Ordering
The default order is verified_at descending, then transaction_date descending, then id descending. Rows without a date fall back to their submission time, so pending verifications stay visible.
curl "https://api.payproof.et/api/merchant/v1/verifications/?sort_by=verified_at&sort_dir=asc" \
-H "Authorization: Bearer mk_live_..."curl "https://api.payproof.et/api/merchant/v1/verifications/?sort_by=transaction_date&sort_dir=desc" \
-H "Authorization: Bearer mk_live_..."Date range filtering
Dates are civil dates in Africa/Addis_Ababa and respect the tenant business-day setting (midnight or tewat 06:00). Both ends are inclusive. Invalid dates and inverted ranges return HTTP 400.
curl "https://api.payproof.et/api/merchant/v1/verifications/?date_field=transaction_date&date_from=2026-11-01&date_to=2026-11-30&page=1&page_size=50" \
-H "Authorization: Bearer mk_live_..."Use date_field=verified_at to filter by when PayProof finished the verification instead of when the bank transaction happened.
Other filters
curl "https://api.payproof.et/api/merchant/v1/verifications/?status=FAILED,REJECTED&bank_name=TELEBIRR&employee_id=12" \
-H "Authorization: Bearer mk_live_..."List response
{
"verifications": [
{
"outcome": "success",
"message": "Verified.",
"verification": {
"id": 123,
"status": "VERIFIED",
"verified_at": "2026-12-01T09:12:00Z",
"transaction_date": "2026-12-01T08:45:00Z",
"image_count": 2,
"image_url": "https://api.payproof.et/media/receipts/2026/12/01/abc_receipt.jpg",
"transaction_image_url": "https://api.payproof.et/media/receipts/2026/12/01/abc_receipt.jpg",
"images": [
{
"id": 55,
"image_url": "https://api.payproof.et/media/receipts/2026/12/01/abc_receipt.jpg",
"order": 0,
"created_at": "2026-12-01T09:10:00Z"
}
]
}
}
],
"count": 1,
"total_count": 137,
"page": 1,
"page_size": 20,
"total_pages": 7,
"has_more": true,
"next_page": 2,
"sort_by": "verified_at",
"sort_dir": "desc",
"date_field": "transaction_date",
"date_from": "2026-11-01",
"date_to": "2026-11-30"
}5. Images
Every list item and detail response includes the receipt images when they exist. The top-level image_url is the first image, and transaction_image_url is an alias for systems that use that name.
| Field | Type | Meaning |
|---|---|---|
| images | array | All receipt images, ordered by the bank receipt order. |
| images[].image_url | string | Public /media URL for that image. |
| image_url | string | null | First image URL, or null. |
| transaction_image_url | string | null | Alias of image_url. |
| image_count | integer | Number of images on the verification. |
Set include_images=false when you only need amounts and statuses and want a smaller response.
6. Retry a failed receipt
curl -X POST https://api.payproof.et/api/merchant/v1/verifications/123/retry/ \
-H "Authorization: Bearer mk_live_..."This works when the receipt failed or needs manual review. The same id goes back to pending, so the status call shows each step again. When it finishes, the webhook is sent once more with the new result. An optional webhook_url replaces the address for that retry. A verified receipt, or one that is still running, is not restarted.
7. Webhooks
When the verification reaches verified, failed, rejected, or manual review, PayProof sends one POST to the key's webhook URL. The body is the same result as the status call, plus type.
{
"type": "verification.completed",
"outcome": "success",
"message": "Verified.",
"verification": {
"id": 123,
"status": "VERIFIED",
"amount": "150.00",
"image_count": 1,
"image_url": "https://api.payproof.et/media/receipts/2026/12/01/abc_receipt.jpg",
"transaction_image_url": "https://api.payproof.et/media/receipts/2026/12/01/abc_receipt.jpg"
}
}The PayProof-Signature header is t=<unix>,v1=<hex hmac sha256>. Sign timestamp + "." + raw body with the key's signing secret. A non-2xx response is retried. The callback is sent once.
import crypto from "node:crypto";
function verifyPayProofSignature(rawBody, header, secret) {
const parts = Object.fromEntries(
header.split(",").map((part) => part.split("="))
);
const expected = crypto
.createHmac("sha256", secret)
.update(parts.t + "." + rawBody)
.digest("hex");
return crypto.timingSafeEqual(
Buffer.from(expected, "hex"),
Buffer.from(parts.v1, "hex")
);
}8. Errors
| HTTP | Error | What to do |
|---|---|---|
| 400 | missing_input | Send a photo, a reference, or a message. |
| 400 | bank_required | Send bank_name with a reference or message. |
| 400 | sender_account_required | BOA needs receiver_account on the first request. |
| 400 | invalid_page / invalid_page_size | Use a positive page and page_size ≤ 100. |
| 400 | invalid_sort_by / invalid_sort_dir | Use verified_at or transaction_date, and desc or asc. |
| 400 | invalid_date_from / invalid_date_to / invalid_date_range | Use YYYY-MM-DD and keep date_from ≤ date_to. |
| 400 | invalid_status / invalid_outcome / invalid_bank | Use one of the documented values. |
| 401 | invalid_api_key | The key is missing, wrong, or revoked. Create a new one. |
| 402 | insufficient_credits | The company has no verifications left. |
| 403 | forbidden | Only the company account can manage Merchant API keys. |
| 404 | not_found | The verification id does not belong to this company. |
| 409 | already_running | The verification is still processing. Wait, then poll again. |
| 500 | submit_failed / retry_failed | Temporary server failure. Retry the request. |
9. Connect from your backend
Keep the key in an environment variable on your server.
const BASE = "https://api.payproof.et";
const KEY = process.env.PAYPROOF_MERCHANT_KEY;
async function listTransactions() {
const params = new URLSearchParams({
page: "1",
page_size: "20",
sort_by: "verified_at",
sort_dir: "desc",
date_field: "transaction_date",
date_from: "2026-11-01",
date_to: "2026-11-30",
});
const res = await fetch(
`${BASE}/api/merchant/v1/verifications/?${params}`,
{ headers: { Authorization: `Bearer ${KEY}` } }
);
if (!res.ok) throw new Error(await res.text());
const data = await res.json();
for (const item of data.verifications) {
const v = item.verification;
console.log(v.id, v.status, v.amount, v.image_url);
}
return data;
}<?php
$base = "https://api.payproof.et";
$key = getenv("PAYPROOF_MERCHANT_KEY");
$query = http_build_query([
"page" => 1,
"page_size" => 20,
"sort_by" => "verified_at",
"sort_dir" => "desc",
"date_field" => "transaction_date",
"date_from" => "2026-11-01",
"date_to" => "2026-11-30",
]);
$ch = curl_init("$base/api/merchant/v1/verifications/?$query");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer $key"],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
if ($status !== 200) {
throw new RuntimeException($body);
}
$data = json_decode($body, true);
foreach ($data["verifications"] as $item) {
$v = $item["verification"];
echo $v["id"] . " " . $v["status"] . " " . ($v["image_url"] ?? "") . PHP_EOL;
}Connect checklist
- Create a named
mk_live_...key in the Telegram mini app. - Store it server-side as
PAYPROOF_MERCHANT_KEY. - Call
GET /api/merchant/v1/employees/and confirm HTTP 200. - Submit a receipt and poll
GET /verifications/:id/. - Read the list with pagination and a date range, then render
image_url. - Add the webhook and verify
PayProof-Signaturebefore trusting the body.