Developer API
Report invoices to FBR, PRA or SRB from any system with one HTTPS call.
Authentication
Each company creates a key in Settings → Integrations (API). Send it in every request:
X-API-Key: sk_…
Base URL: https://einvoice.stratos-hub.com/api/v1/
Endpoints
| Method | Path | Purpose |
|---|---|---|
| GET | ping | Check the key and see the company and FBR mode |
| POST | invoices | Create an invoice and report it (set "submit": false for a draft) |
| GET | invoices?external_ref=… | Status, totals and authority number |
| POST | invoices/<id> | Re-send a draft, rejected or waiting invoice |
| GET | invoices/<id>/qr.png | QR image to print on your invoice |
| GET / POST | customers | List, or create/update by code or NTN |
| GET / POST | products | List, or create/update by code |
| GET | lookup?n=NTN | Registration type and ATL status from FBR |
Create and report an invoice
POST https://einvoice.stratos-hub.com/api/v1/invoices
{
"external_ref": "ODOO/INV/2026/0042",
"date": "2026-09-24",
"report_to": "FBR",
"customer": {"name": "ABC Traders", "ntn_cnic": "1234567",
"registration_type": "Registered", "province": "Punjab", "address": "Lahore"},
"lines": [
{"product_code": "ITM-001", "quantity": 10, "unit_price": 1500},
{"description": "Installation", "hs_code": "9987.0000", "sale_type": "Services",
"rate": 16, "quantity": 1, "unit_price": 5000}
]
}
Reply
{
"id": 128, "number": "INV-2026-00128", "state": "posted",
"total": "36112.00",
"fbr": {"invoice_number": "4200001DI1790241871147", "datetime": "2026-09-24 12:01:41",
"qr_png_url": "https://einvoice.stratos-hub.com/api/v1/invoices/128/qr.png", "error": ""}
}
Good to know
- The same external_ref sent twice returns the first invoice — never reported twice.
- state: posted (accepted), rejected (see fbr.error), pending (authority unreachable — retried automatically).
- report_to: FBR (default), PRA or SRB — the company must have that authority switched on.
- Debit notes: "invoice_type": "Debit Note" with ref_fbr_invoice_number or ref_external_ref.