CBE
Detail page — four URL shapes (two short-link variants and two direct endpoints), two response schemas (PDF and JSON), and how the resolver routes between them.
CBE has the busiest URL surface of any provider — four supported shapes that resolve to one of two upstream backends. Pass any of them; the resolver figures out the right call.
URL formats
1. Short-link, dashed id → PDF backend
| Part | Pattern | Example |
|---|---|---|
| host | literal | mbreciept.cbe.com.et |
<id> | FT[A-Z0-9]+-\d+ | FT00000000-12345678 |
Resolution: dash is stripped → call apps.cbe.com.et:100/?id=<stripped> which returns a PDF. We parse with pdf-parse.
2. Short-link, plain token → JSON backend
| Part | Pattern | Example |
|---|---|---|
<token> | 16+ [A-Za-z0-9], at least one lowercase | fHCxz62uM8157lCfet |
Resolution: passed through to mb.cbe.com.et/api/v1/transactions/public/transaction-detail/<token> which returns JSON.
3. Direct PDF
Pass-through. Returns a PDF.
4. Direct JSON
Pass-through. Returns JSON.
Return types
CBE has two response shapes, depending on which backend the URL resolves to. The source field discriminates: present ("mb-json") for the JSON backend, absent for the PDF backend (the legacy parser).
PDF — source is absent
JSON — source: "mb-json"
Same base fields as PDF, plus everything mb.cbe.com.et returns that the PDF doesn't expose.
Sample — PDF backend (placeholder values)
Sample — JSON backend (placeholder values)
Quirks
mb.cbe.com.etis gated — without the rightx-app-id,x-app-version,Referer,Origin, andUser-Agent, CBE returns500 Security Alert: Invalid or tampered legacy token!. v.odit.et sends the full browser-equivalent header set on every JSON request.- PDF body has positional-only fields — in the company-info block, labels are stacked first and values stacked second. Empty cells are omitted from values, which makes positional pairing fragile. We extract only the last three values (
vatReceiptNo/vatRegistrationNo/vatRegistrationDate) which are stable across receipts. - Two amount string formats —
mb.cbe.com.etsometimes prefixes amounts with the currency ("ETB0.50"), sometimes returns bare decimals ("260.00"). Our parser handles both. - PDF endpoint runs on port
100— non-standard, but is the official URL. Direct port 443 doesn't work.