Zemen Bank
Detail page — URL token structure (24-char prefix + reference composite), PDF parsing quirks, and full return type.
Zemen's share.zemenbank.com serves a PDF directly (with a download attachment header). We grab the bytes, parse with pdf-parse, and extract structured fields.
URL format
| Part | Pattern | Example |
|---|---|---|
| host | literal | share.zemenbank.com |
<prefix> | 2 letters | rt (retail / ATM) · ft (funds transfer) · others observed in the wild |
<token> | 24 chars [A-Za-z0-9] | 00000000ABCDEFGHIJKLMNOP |
Token anatomy
The 24-char token is <8-char prefix><16-char reference>. The trailing 16 chars are the actual reference number that appears in the receipt body under "Reference No". The leading 8 chars look like a branch / timestamp code that's only used at the URL level.
The resolver accepts any 2-letter prefix, so when Zemen mints a new code (cr, dr, etc.) you don't need a redeploy on our side.
Return type
receipt.source === "zemen-pdf". Amounts are numbers; currency is always "ETB" on these receipts.
Sample (placeholder values)
Quirks
Datefield uses the Amharic colon — the top-of-document date label ends in፡(U+1361), not ASCII:. Our regex accepts both.- No whitespace between table cells — pdf-parse strips spacing such that
Service ChargeETB 1.00arrives as one token. Amount-row regex uses[ \t]*between the label andETB, not\s+. - Empty-value rows collapse onto the next label — when a field like "Payer TIN" is unset, pdf-parse emits the label followed immediately by a newline. Our label regex uses
[ \t]*for the trailing whitespace so we don't slurp the next label's value into the current field. - Some receipts return
HTTP 404 application/jsonwhen the reference is no longer available upstream (Zemen cycles them out of cache). We detect non-PDF bodies and surface a friendly"receipt not found upstream"error instead of a misleading"pdf-parse failed". - Real fetches are slow — Zemen's PDF backend takes 5–15 s per call even when healthy. v.odit.et's outbound queue serialises calls (one in flight at a time) for this host and cooldowns aggressively on
429.