NRS API Implementation Reference
This reference specifies the Nigeria Revenue Service (NRS) Access Point Provider (APP) invoice contract for Veridex. It covers reference resources, invoice validation, signing, status confirmation, and payment updates.
<NRS_BASE_URL>/api/v1/invoiceapplication/jsonHTTPS requiredVeridex NRS API Reference
This reference specifies the Nigeria Revenue Service (NRS) Access Point Provider (APP) invoice contract for Veridex. Validation and signing use a shared invoice schema. Subsequent requests identify the invoice by its invoice reference number (IRN). All examples use fictional data.
Aligned with the NRS Access Point Provider documentation, version 1.1.
Reference resources, validation, signing, status confirmation, and payment updates.
Request and response bodies use UTF-8 JSON over HTTPS.
Base URL, Authentication & Conventions
<NRS_BASE_URL> represents the NRS API host assigned to the environment. Append the endpoint paths in this reference to that base URL, and use the registrations and credentials issued for the selected environment.
Request headers
Include the following headers with each request.
Accept: application/json
Content-Type: application/json
x-api-key: <NRS_API_KEY>
x-api-secret: <NRS_API_SECRET>Store API credentials securely on the server.
Conventions
- • Use UTF-8 JSON,
YYYY-MM-DDdates, andHH:MM:SStimes. - • Currency values use ISO 4217 codes; country values use ISO 3166-1 alpha-2 codes.
- • Monetary values are JSON numbers.
- • Obtain classification, tax category, unit, state, and local government area (LGA) codes from the reference resource endpoints.
Identifiers
| Identifier | Meaning |
|---|---|
| business_id | UUID assigned to the supplier's business on NRS |
| invoice_reference | Invoice reference assigned by the business and supplied for IRN validation |
| irn | Invoice reference number generated using the business's registered NRS template |
Generate the IRN before submitting the invoice for validation or signing. Use the same IRN for subsequent signing, confirmation, and payment-update requests. Record the signing outcome separately from IRN generation.
Endpoints & Processing Sequence
Prepare the invoice and generate its IRN. Validate the IRN and invoice data before submitting the invoice for signing. Retrieve the invoice status through the confirmation endpoint and submit payment changes through the update endpoint.
/api/v1/invoice/irn/validateValidate IRN. Body: invoice_reference, business_id, irn.
/api/v1/invoice/validateValidate invoice data. Body: the full invoice schema.
/api/v1/invoice/signSign invoice. Body: the same full invoice body with validated values.
/api/v1/invoice/confirm/{IRN}Confirm invoice status. No body; IRN supplied in the path.
/api/v1/invoice/update/{IRN}Update invoice payment status. Body: payment status; amount for partial payments; optional reference.
Confirmation retrieves status information only. Invoice exchange and transmission require separate operations and are outside the scope of this reference.
Reference Resources
Retrieve reference data before preparing an invoice. These endpoints provide the codes used for invoice types, currencies, taxes, payment methods, item classifications, units, and addresses. All resource endpoints use GET and the authentication headers above, and accept no JSON request body.
| Endpoint | Resource | Invoice use | NRS reference |
|---|---|---|---|
| /api/v1/invoice/resources/invoice-types | Invoice types | Select invoice_type_code | Invoice types |
| /api/v1/invoice/resources/payment_means | Payment means | Select payment_means[].payment_means_code | Payment means |
| /api/v1/invoice/resources/tax-categories | Tax categories | Select tax_total[].tax_subtotal[].tax_category.id and the applicable percent | Tax categories |
| /api/v1/invoice/resources/currencies | Currencies | Select document_currency_code and tax_currency_code | Currencies |
| /api/v1/invoice/resources/invoice-quantity-codes | Invoice quantity codes | Select invoice_line[].price.price_unit | Quantity codes |
| /api/v1/invoice/resources/hs-codes | Product codes (HSN) | Select the goods classification for invoice_line[].hsn_code and its corresponding product_category | Product codes |
| /api/v1/invoice/resources/services-codes | Service codes | Select the applicable service classification when preparing a service invoice | Service codes |
| /api/v1/invoice/resources/lgas | Local government areas | Select postal_address.lga for each accounting party; match its state_code to the selected state | LGAs |
| /api/v1/invoice/resources/states | States | Select postal_address.state for each accounting party | States |
| /api/v1/invoice/resources/countries | Countries | Select the alpha-2 code for each party's postal_address.country | Countries |
| /api/v1/invoice/resources/vat-exemptions | VAT exemptions | Look up VAT exemption classifications and apply the relevant NRS invoice requirements | VAT exemptions |
Endpoint names are case-sensitive. In particular, the documented payment-means path uses payment_means, and the service-code path uses services-codes.
Resource request and response
The following request retrieves the LGA catalogue. The example response is shortened to two entries from the NRS reference.
GET <NRS_BASE_URL>/api/v1/invoice/resources/lgas
Accept: application/json
x-api-key: <NRS_API_KEY>
x-api-secret: <NRS_API_SECRET>{
"code": 200,
"data": [
{
"name": "Aba North",
"code": "NG-AB-ANO",
"state_code": "NG-AB"
},
{
"name": "Aba South",
"code": "NG-AB-ASO",
"state_code": "NG-AB"
}
]
}Use an entry's code as the LGA value and its state_code to associate it with the correct state. This response illustrates the LGA endpoint only; use each resource's documented response structure when reading other catalogues.
Using resource values
Preserve codes exactly as returned, including leading zeros, punctuation, and letter case. Store the code used by the invoice separately from its display description. Use the country alpha-2 code for postal_address.country; country records may also contain other identifiers.
Shared Invoice Schema
Submit the following structure as the root JSON object for invoice validation and signing. Include supplier and customer details, invoice lines, item and price objects, tax subtotals, and monetary totals at the specified nesting levels.
The business-to-business (B2B) example below contains one taxable goods line and uses fictional parties. Values enclosed in angle brackets are placeholders. Replace them with valid registration details, an IRN, and NRS resource codes before testing in the sandbox. State and LGA codes must match each party's address. Verify the tax category and rate against the applicable NRS resources.
{
"business_id": "<NRS_BUSINESS_UUID>",
"irn": "<IRN_MATCHING_REGISTERED_BUSINESS_TEMPLATE>",
"invoice_kind": "B2B",
"issue_date": "2026-08-04",
"invoice_type_code": "380",
"document_currency_code": "NGN",
"tax_currency_code": "NGN",
"accounting_supplier_party": {
"party_name": "Example Supplier Limited",
"tin": "<SUPPLIER_TIN>",
"email": "supplier@example.com",
"postal_address": {
"street_name": "1 Example Supplier Street",
"city_name": "Ikeja",
"postal_zone": "100001",
"country": "NG",
"state": "<NRS_STATE_CODE>",
"lga": "<NRS_LGA_CODE>"
}
},
"accounting_customer_party": {
"party_name": "Example Buyer Limited",
"tin": "<CUSTOMER_TIN>",
"email": "buyer@example.com",
"postal_address": {
"street_name": "2 Example Buyer Street",
"city_name": "Ikeja",
"postal_zone": "100001",
"country": "NG",
"state": "<NRS_STATE_CODE>",
"lga": "<NRS_LGA_CODE>"
}
},
"legal_monetary_total": {
"line_extension_amount": 250000,
"tax_exclusive_amount": 250000,
"tax_inclusive_amount": 268750,
"payable_amount": 268750
},
"invoice_line": [
{
"hsn_code": "844332",
"product_category": "Printing machinery",
"invoiced_quantity": 1,
"line_extension_amount": 250000,
"item": {
"name": "Industrial Printer",
"description": "Network-enabled thermal printer"
},
"price": {
"price_amount": 250000,
"base_quantity": 1,
"price_unit": "<NRS_PRICE_UNIT_CODE>"
}
}
],
"due_date": "2026-08-18",
"issue_time": "14:30:00",
"note": "Payment is due within 14 days.",
"tax_total": [
{
"tax_amount": 18750,
"tax_subtotal": [
{
"taxable_amount": 250000,
"tax_amount": 18750,
"tax_category": {
"id": "STANDARD_VAT",
"percent": 7.5
}
}
]
}
]
}Top-level fields
The example includes both accounting parties and the tax breakdown for the B2B transaction shown. Optional fields remain subject to the requirements of the transaction.
| Field | JSON type | Description and requirements |
|---|---|---|
| business_id | String (UUID) | Required. Supplier business registration identifier |
| irn | String | Required. Invoice identifier generated before validation and signing |
| issue_date | String (date) | Required. Invoice issue date |
| invoice_type_code | String | Required. Supported invoice type code |
| invoice_kind | String | Required in version 1.1. Transaction category; B2B in this example |
| document_currency_code | String | Required. Invoice currency code |
| tax_currency_code | String | Required. Tax currency code |
| accounting_supplier_party | Object | Required. Supplier details |
| accounting_customer_party | Object | Buyer details. Included in this B2B example; the general NRS schema lists the object as optional |
| invoice_line | Array of objects | Invoice lines; supply at least one |
| tax_total | Array of objects | Tax breakdown. Included in this taxable example; the general NRS schema lists the array as optional |
| legal_monetary_total | Object | Invoice monetary totals |
| due_date | String (date) | Optional payment due date |
| issue_time | String (time) | Optional invoice issue time |
| note | String | Optional invoice note |
| payment_status | String | Optional. Initial payment status; defaults to PENDING in the NRS reference |
| allowance_charge | Array of objects | Optional. Allowances or charges, each with a boolean charge_indicator and numeric amount |
| payment_means | Array of objects | Optional payment instructions with payment_means_code and payment_due_date |
For additional fields, including delivery periods, document references, and other parties, consult the NRS schema linked in the references below.
Supplier and customer party schema
Apply the following structure to both accounting_supplier_party and accounting_customer_party. Place tin and email directly on the party object, and address fields within postal_address.
| Field | JSON type | Description and requirements |
|---|---|---|
| party_name | String | Registered name of the party |
| tin | String | Tax identification number (TIN) |
| String | Contact email address | |
| telephone | String | Optional. Telephone number beginning with + followed by the country code |
| business_description | String | Optional business description |
| postal_address | Object | Postal address details applicable to the transaction |
| postal_address.street_name | String | Street address |
| postal_address.city_name | String | City |
| postal_address.postal_zone | String | Postal code |
| postal_address.country | String | ISO 3166-1 alpha-2 country code |
| postal_address.state | String | State code from NRS reference resources; introduced in version 1.1 |
| postal_address.lga | String | LGA code from NRS reference resources; introduced in version 1.1 |
Supply the party details required for the invoice kind. When a party object is included, validate its fields against the applicable NRS requirements.
Invoice line schema
The following fields belong to each object in the invoice_line array.
| Field | JSON type | Description and requirements |
|---|---|---|
| hsn_code | String | Goods classification in this example |
| product_category | String | Product category corresponding to the goods classification code |
| invoiced_quantity | Number | Quantity invoiced |
| line_extension_amount | Number | Net line amount |
| item | Object | Nested item information |
| item.name | String | Item name |
| item.description | String | Item description |
| item.sellers_item_identification | String | Optional seller item identifier; omitted when absent |
| price | Object | Nested pricing information |
| price.price_amount | Number | Price for the stated base quantity |
| price.base_quantity | Number | Quantity basis for the price |
| price.price_unit | String | Applicable price-unit code |
For service invoices, verify the classification fields and codes against the applicable NRS schema and reference resources.
Tax schema
| Field path | JSON type | Description and requirements |
|---|---|---|
| tax_total[] | Object | Tax total entry |
| tax_total[].tax_amount | Number | Total tax for the entry |
| tax_total[].tax_subtotal | Array of objects | Nested breakdown |
| tax_total[].tax_subtotal[].taxable_amount | Number | Taxable base |
| tax_total[].tax_subtotal[].tax_amount | Number | Tax computed for the subtotal |
| tax_total[].tax_subtotal[].tax_category | Object | Nested category information |
| tax_total[].tax_subtotal[].tax_category.id | String | Applicable NRS tax category code |
| tax_total[].tax_subtotal[].tax_category.percent | Number | Applicable category percentage |
For the example shown, sum the tax subtotals to obtain the tax total. Calculate each subtotal by multiplying the taxable amount by the applicable percentage and dividing by 100. Use the NRS category definitions to distinguish standard-rated, zero-rated, and exempt transactions.
Monetary totals
| Field under legal_monetary_total | JSON type | Purpose |
|---|---|---|
| line_extension_amount | Number | Sum of line net amounts |
| tax_exclusive_amount | Number | Invoice total before tax |
| tax_inclusive_amount | Number | Invoice total including tax |
| payable_amount | Number | Amount payable |
Reconcile invoice totals with the line amounts, taxes, and any applicable allowances, charges, prepayments, or rounding adjustments. The calculations above apply to the example shown.
Validate IRN
Ensure that the invoice reference and IRN correspond to the specified business registration. After IRN validation, validate the full invoice data.
POST <NRS_BASE_URL>/api/v1/invoice/irn/validate
{
"invoice_reference": "EXAMPLE-INV-001",
"business_id": "<NRS_BUSINESS_UUID>",
"irn": "<IRN_MATCHING_REGISTERED_BUSINESS_TEMPLATE>"
}Success response (NRS reference):
{"code": 200, "data": {"ok": true}}Validate Invoice Data
Submit the complete invoice object defined in the shared invoice schema as the request body, including the identifiers, accounting parties, invoice lines, tax breakdown, and monetary totals.
POST <NRS_BASE_URL>/api/v1/invoice/validateSuccess response (NRS reference):
{"code": 200, "data": {"ok": true}}Resolve any validation errors and resubmit the corrected invoice. Proceed to signing after NRS accepts the invoice data.
Sign Invoice
Submit the complete invoice object defined in the shared invoice schema, using the IRN and values accepted during validation. If the invoice changes before signing, validate the revised content first.
POST <NRS_BASE_URL>/api/v1/invoice/signSuccess response (NRS reference):
{"code": 201, "data": {"ok": true}}Retain the signing result against the existing IRN. The NRS success response shown above contains an acceptance flag and does not return a new IRN.
Confirm Invoice Status
Replace {IRN} with the invoice's IRN. This request has no body.
GET <NRS_BASE_URL>/api/v1/invoice/confirm/{IRN}Example response using the NRS response structure:
{
"code": 200,
"data": {
"issue_date": "2026-08-04",
"due_date": "2026-08-18",
"sync_date": "2026-08-04",
"payment_status": "PENDING",
"transmitted": true,
"delivered": true
}
}Use the transmitted and delivered fields to determine transmission and delivery status independently. A successful lookup confirms that status information was retrieved; either field may be false.
Update Invoice Payment Status
Replace {IRN} with the existing invoice IRN.
| Field | JSON type | Requirement |
|---|---|---|
| payment_status | String | Requested status: PENDING, PARTIAL, PAID, or REJECTED |
| amount | Number | Required when the requested status is PARTIAL |
| reference | String | Optional payment reference or note |
Full-payment request
PATCH <NRS_BASE_URL>/api/v1/invoice/update/{IRN}
{
"payment_status": "PAID",
"reference": "EXAMPLE-PAYMENT-001"
}Partial-payment request
{
"payment_status": "PARTIAL",
"amount": 100000,
"reference": "EXAMPLE-PARTIAL-001"
}The examples show alternative payment updates. Submit only transitions permitted by NRS for the invoice's current state.
Success response (NRS reference):
{"code": 200, "data": {"ok": true}}Record the payment status as synchronized after NRS accepts the update. If NRS rejects the request, retain the previously synchronized status.
Lifecycle States
These states describe Veridex's processing workflow. The NRS confirmation response provides separate transmission and delivery flags. Temporary processing states may appear while an operation is in progress. Submit only one lifecycle request at a time for a given invoice.
draft → validated → signed → transmittedNRS accepts the invoice data. The IRN was generated before validation and remains associated with the invoice.
Fiscal signing and the local signing workflow complete successfully. Veridex then attempts transmission automatically.
Transmission succeeds. Delivery status is determined separately from the NRS confirmation response.
The automatic transmission attempt may advance the invoice beyond signed before the signing request returns. If signing succeeds but transmission fails, the invoice remains eligible for a transmission retry; signing must not be repeated solely to retry transmission.
State reference
| State | Meaning | Next action |
|---|---|---|
| draft | Editable invoice | Complete the invoice and submit it for validation |
| pending_validation | Validation is in progress | Wait for the result before submitting another lifecycle request |
| validated | Invoice validation succeeded | Submit the validated invoice for signing |
| pending_signing | Signing is in progress | Wait for the result |
| signed | Fiscal signing and local signing completion succeeded | Proceed with transmission |
| pending_transmit | Transmission is in progress | Wait for the result |
| transmitted | Transmission succeeded; this is the final state in the current local transition map | Use NRS status information to distinguish transmission from delivery |
| validation_failed | Invoice validation failed | Correct the reported errors and validate again |
| sign_failed | The local signing workflow did not complete; NRS signing may already have succeeded if a subsequent QR-generation step failed | Reconcile the signing result before retrying |
| transmit_failed | Signing succeeded, but transmission failed | Retry transmission without signing again |
An IRN identifies an invoice; its presence does not establish that validation, signing, or transmission succeeded. The current Veridex confirmation workflow remains deferred. Do not treat the local transmitted state as proof of NRS delivery confirmation or payment settlement.
Errors & Retries
Check the HTTP status and JSON response body for every request. Use any reported field paths and error details to identify the cause of a failure. Error bodies may differ by operation and between the integration service and NRS; the examples below do not define a universal NRS error response.
HTTP status codes
| Status | Meaning | Handling |
|---|---|---|
| 400 Bad Request | The request could not be processed; inspect the error details | Correct the request or resolve the reported upstream error |
| 401 Unauthorized | Authentication is missing, invalid, or expired | Restore valid authentication before retrying |
| 403 Forbidden | The authenticated caller is not permitted to perform the operation | Check permissions and business access |
| 404 Not Found | The resource does not exist or is not accessible to the caller | Check the identifier and access scope |
| 409 Conflict | The requested operation conflicts with the invoice's current state | Retrieve the current state and select a permitted action |
| 422 Unprocessable Entity | Request validation or a business rule failed | Correct the reported fields or resolve the business-rule failure |
| 429 Too Many Requests | The request rate exceeds the permitted limit | Delay the retry; observe Retry-After when supplied |
| 503 Service Unavailable | A required service is temporarily unavailable | Apply backoff and reconcile any uncertain prior result |
Validation error
This schema-level illustration identifies a missing goods classification using the NRS invoice field path. Exact validation messages depend on the validating service.
{
"message": "The given data was invalid.",
"errors": {
"invoice_line.0.hsn_code": [
"HSN code is required for goods."
]
}
}Invalid lifecycle transition
Veridex's application error response when an invoice is submitted for signing before validation. This response does not include a retryable field.
{
"code": "INVOICE_STATE_ERROR",
"message": "Cannot transition from 'draft' to 'pending_signing'"
}NRS validation failure
Veridex reports upstream API failures using NRS_API_ERROR. The message and details depend on the NRS response; the field-level details below are illustrative.
{
"code": "NRS_API_ERROR",
"message": "NRS rejected the invoice payload.",
"details": {
"field": "invoice_line.0.hsn_code",
"reason": "The supplied classification code is invalid."
},
"retryable": false
}Temporary service failure
Veridex's application response when NRS cannot be reached.
{
"code": "NRS_CONNECTION_UNAVAILABLE",
"message": "NRS is temporarily unavailable.",
"retryable": true
}Security & Privacy
- • Use HTTPS for all API requests and validate the server certificate.
- • Store API keys, secrets, and session credentials securely. Restrict access to authorized services and personnel.
- • Keep credentials out of URLs, source code, public documentation, browser analytics, and application logs.
- • Include invoice identifiers in URLs only where required by the documented endpoint. Protect access logs that record those paths.
- • Treat taxpayer identifiers, contact details, invoice data, and downloaded artifacts as confidential business information.
- • Store downloaded artifacts securely and limit access to authorized users.
- • Remove sensitive values before recording request or response bodies in diagnostic logs. Do not send confidential payloads to client-side analytics.