Nigeria ๐ณ๐ฌ
E-invoicing through the Nigeria Revenue Service (NRS) Merchant Buyer Solution (NRSMBS) โ formerly the FIRS Merchant Buyer Solution (FIRS MBS). This page is the API documentation for the Nigeria e-invoicing endpoints of the platform: every endpoint, the exact request and response payloads, how the IRN and QR code are produced, and how the platform maps onto the NRSMBS APIs.
Overviewโ
| Aspect | Details |
|---|---|
| Tax authority | Nigeria Revenue Service (NRS) โ formerly Federal Inland Revenue Service (FIRS) |
| National platform | NRS Merchant Buyer Solution (NRSMBS) โ einvoice.nrs.gov.ng |
| Model | Clearance (continuous transaction control): every invoice is validated and signed by NRSMBS before it is issued; NRS registers the IRN and the invoice carries a verifiable QR code |
| Service-provider roles | System Integrator (SI) โ integrates taxpayer systems (validate, sign, IRN, QR); Access Point Provider (APP) โ transmits and receives e-invoices between parties. The platform is operated in both roles. |
| Taxpayer identifier | TIN (Taxpayer Identification Number); each business also receives an 8-character NRS Service ID and a business_id (UUID) on onboarding |
| Invoice reference | IRN โ <invoice number>-<Service ID>-<YYYYMMDD>, e.g. INV0706-39EADBB3-20260706 (unique per business per day) |
| Document format | NRS invoice JSON (UBL-aligned field names) โ not Peppol UBL XML |
| Invoice kinds | invoice_kind = B2B, B2C or B2G (mandatory since December 2025) |
| VAT | 7.5 % standard rate โ tax category STANDARD_VAT; other categories per NRS code lists (exempt, zero-rated, withholding, stamp duty) |
| Line classification | Every invoice line needs an hsn_code (goods) or an isic_code (services) |
| QR code | Mandatory โ RSA-encrypted { irn: "<IRN>.<unix ts>", certificate } using the NRS public key of the supplier business; verifiable through NRS verify_stamp and the MBS360 mobile app |
| Environments | Sandbox base_url https://eivc-k6z6d.ondigitalocean.app ยท report/exchange https://api.firsmbs.com ยท production URLs as issued in the NRS service-provider portal |
| NRS API docs | einvoice.nrs.gov.ng/docs (authentication, invoice schema, QR code, changelog) |
All Nigeria endpoints are under {BASE_URL}/api/v1/nigeria/โฆ on your platform host โ for example
https://einvoicing.huiospay.com/peppol-api/api/v1/nigeria/validate on the HuiosPay-branded platform, or
https://app.goroute.ai/peppol-api/api/v1/nigeria/validate on GoRoute. The live OpenAPI contract is served
at {BASE_URL}/docs (Swagger UI) and {BASE_URL}/openapi.json.
How an e-invoice flowsโ
Taxpayer system โ1โโถ POST /api/v1/nigeria/validate {invoice, sign:true}
โ 2 POST base_url/api/v1/invoice/validate โโโถ NRSMBS (200 ok)
โ 3 POST base_url/api/v1/invoice/sign โโโถ NRSMBS (201 ok, IRN registered)
โ 4 build QR = RSA(NRS public key){ irn: IRN.<ts>, certificate }
โ 5 persist invoice ยท IRN ยท QR ยท NRS responses ยท render PDF/JSON
โโ6โโโ 201 { ok:true, signed:true, transaction_id โฆ } + POST /qr โ QR image
Platform (worker, APP role) โ7โโถ confirm / download (AES-256-CFB decrypt)
โ8โโถ transmit to counterparties โโ9โ NRS webhook TRANSMITTING โ TRANSMITTED โ ACKNOWLEDGED
โ10โถ acknowledge received invoices โ11โถ VAT post-payment report
Anyone โโถ scan QR (MBS360) โโถ NRS verify_stamp โโถ issuer + IRN
Steps 1โ6 happen synchronously in one API call plus the QR call. Steps 7โ11 are performed by the platform after signing (see Lifecycle after signing).
Prerequisitesโ
Before the first invoice can be signed, the following NRS artefacts are configured once per platform
organisation (via PUT /api/v1/nigeria/settings) and once per
taxpayer business (via POST /api/v1/nigeria/businesses and
PUT /api/v1/nigeria/businesses/{business_id}/keys):
| Artefact | Source | Used for |
|---|---|---|
x-api-key + x-api-secret | NRS service-provider portal โ Generate API key | Authenticating every NRSMBS call |
| Base URL | Sandbox (fixed) or production (portal โ Switch to production) | Environment |
business_id, Service ID, TIN | Returned by NRS when the taxpayer business is onboarded (entity + business) | business_id in every invoice; Service ID inside the IRN |
Cryptographic bundle โ public_key + certificate (crypto_keys.txt) | NRS portal โ Manage Cryptographic Keys โ per business | Generating the QR code; decrypting downloaded invoices |
| Webhook URL and egress IPs | Registered in the NRS portal (Developers โ Add Webhook URL, IP Access List) | Receiving transmission notifications; allow-listing outbound calls |
The certificate embedded in the QR identifies the issuer that NRS returns on verification. Always store
each business's own crypto_keys.txt with PUT /businesses/{business_id}/keys and pass that business_id
when generating the QR โ never the sample bundle printed in the NRS documentation (its issuer is "Test
Business") and never another business's bundle.
Authenticationโ
Every request carries your platform API key:
X-API-Key: pk_live_your_api_key_here
Content-Type: application/json
API keys are organisation-scoped; the organisation's NRS credentials, businesses and keys are resolved from the key. NRS credentials are never sent by integrators on a per-call basis.
Endpointsโ
| Method | Path | Purpose |
|---|---|---|
GET | /api/v1/nigeria/settings | Show the organisation's NRS configuration (masked) and the identity NRS resolved for it |
PUT | /api/v1/nigeria/settings | Set NRS api_key, api_secret, base_url, default service_id / business_id, org-level QR keys |
GET | /api/v1/nigeria/businesses | List onboarded taxpayer businesses (with has_keys) |
POST | /api/v1/nigeria/businesses | Onboard a taxpayer business with NRS (creates entity + business, returns business_id and Service ID) |
PUT | /api/v1/nigeria/businesses/{business_id}/keys | Store that business's NRS cryptographic bundle (public key + certificate) |
POST | /api/v1/nigeria/validate | Validate an invoice with NRSMBS; with "sign": true also sign it โ IRN registered |
POST | /api/v1/nigeria/qr | Generate the QR code for an IRN using the business's bundle; optionally verified with NRS verify_stamp |
POST | /api/v1/nigeria/decrypt | Download the signed invoice from NRSMBS and decrypt it (AES-256-CFB) |
Settings โ NRS credentials and environmentโ
PUT /api/v1/nigeria/settings
{
"api_key": "<x-api-key UUID from the NRS portal>",
"api_secret": "โขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโขโข",
"base_url": "https://eivc-k6z6d.ondigitalocean.app",
"service_id": "39EADBB3",
"business_id": "3617777c-dbb3-436d-8af8-1a3aca6730d2"
}
GET /api/v1/nigeria/settings โ the platform masks secrets and reports the identity NRS resolved for the credentials:
{
"configured": true,
"api_key_masked": "55ca...9ba4",
"has_api_secret": true,
"base_url": "https://eivc-k6z6d.ondigitalocean.app",
"service_id": "39EADBB3",
"business_id": "3617777c-dbb3-436d-8af8-1a3aca6730d2",
"has_public_key": true,
"has_certificate": true,
"business_name": "Example Supplier Ltd",
"tin": "12345678-0001",
"entity_id": "e7c765cc-39ea-4044-8caa-6fb6823d10fb",
"discovered": true
}