Skip to main content

Run Invoice Flow

Endpoint

POST /api/v1/nrs/generate-irn

Runs the composed eTranzact invoice flow in a single request. This endpoint orchestrates multiple internal services:

  • Generate IRN
  • Validate invoice
  • Optionally update invoice status
  • Optionally confirm invoice
  • Optionally transmit invoice

Each step also exists as an independent endpoint.


Request Body

{
"confirm_after_validate": true,
"generate_irn": {
"business_id": "9819d1a4-c898-401a-90d3-3dfe42891f8b",
"invoice_number": "INV-00049",
"issuance_date": "2026-03-27",
"service_id": "F6B4C898"
},
"transmit_after_confirm": false,
"update_invoice": {
"payment_status": "PAID"
},
"validate_invoice": {
"accounting_cost": "2000.00",
"accounting_customer_party": {
"business_description": "Retail",
"email": "customer@example.com",
"id": "CUS-001",
"party_name": "Demo Customer",
"postal_address": {
"city_name": "Lagos",
"country": "NG",
"lga": "NG-LA-EPE",
"postal_zone": "NG-LA",
"state": "NG-LA",
"street_name": "Victoria Island"
},
"telephone": "+23480254000000",
"tin": "00311855-0001"
},
"accounting_supplier_party": {
"business_description": "Software services",
"email": "billing@example.com",
"id": "SUP-001",
"party_name": "Avetium Consult",
"postal_address": {
"city_name": "Lagos",
"country": "NG",
"lga": "NG-LA-EPE",
"postal_zone": "NG-LA",
"state": "NG-LA",
"street_name": "8 Alausa Road"
},
"telephone": "2348090780097",
"tin": "00311855-0001"
},
"actual_delivery_date": "2026-03-28",
"document_currency_code": "NGN",
"due_date": "2026-03-28",
"invoice_kind": "B2B",
"invoice_type_code": "381",
"issue_date": "2026-03-27",
"issue_time": "15:32:01",
"note": "Thank you for the payment.",
"order_reference": "8215",
"payment_status": "PENDING",
"payment_terms_note": "Net 1 day",
"tax_currency_code": "NGN",
"tax_point_date": "2026-03-27"
}
}

Response

{
"ok": true,
"status_code": 200,
"generated_irn": "IRN-123456",
"generate_irn": {
"endpoint": "/generate-irn",
"ok": true
},
"validate_invoice": {
"endpoint": "/validate-invoice",
"ok": true
},
"update_invoice": {
"endpoint": "/update-invoice",
"ok": true
},
"confirm_invoice": {
"endpoint": "/confirm-invoice",
"ok": true
},
"transmit_invoice": {
"endpoint": "/transmit-invoice",
"ok": true
}
}

Proxy Failure

{
"ok": false,
"status_code": 500,
"error": "Local proxy failure"
}

Notes

  • generate_irn must be executed before validation if IRN is not pre-existing.
  • additional_document_reference, billing_reference, and similar fields will auto-resolve IRN placeholders.
  • The flow is idempotent only if invoice identifiers remain unchanged.