1. E-Invoice Reversal
Qorpy
  • Getting Started: Qorpy API and NRS E-Invoice
  • Frequently Asked Questions
  • Qorpy API Onboarding
    • Request Business Key
      POST
    • Regenerate Business Key
      POST
    • Business Settings - Update
      POST
    • Business Settings - Read
      GET
  • E-Invoicing Lifecycle
    • E-Invoice Creation
      • Create Invoice
      • Get Invoice QR Code
      • Update Invoice Payment Status
      • Get Sent Invoices
      • Get Sent Invoice Details
    • E-Invoice Reversal
      • Invoice Reversal
        POST
    • E-Invoice Receipt
      • Fetch Received Invoices
  • Resources
    • Get NRS Invoice Quantity Codes
      GET
    • Get NRS Currencies
      GET
    • Get NRS States
      GET
    • Get NRS LGAs
      GET
    • Get NRS Countries
      GET
    • Get NRS Invoice Types
      GET
    • Get NRS Payment Means
      GET
    • Get NRS Product Codes
      GET
    • Get NRS Service Codes
      GET
    • Get NRS Tax Categories
      GET
  1. E-Invoice Reversal

Invoice Reversal

POST
/{stage}/external/businesses/{businessId}/invoices/reversal
Reverse an existing invoice by providing its Invoice Reference Number (IRN). This operation creates a credit note on that invoice.

Quick Reference#

MethodEndpointContent-Type
POST{{baseUrl}}/{{stage}}/external/businesses/{{businessId}}/invoices/reversalapplication/json

Request Structure#

Path Parameters#

ParameterTypeRequiredDescription
businessIdstring✅The unique identifier of the business

Headers#

HeaderValueRequired
Content-Typeapplication/json or */*Yes
Acceptapplication/json or */*Yes
X-Business-KeybusinessKeyYes

📋 Request Body#

FieldTypeRequiredDescriptionValidation
irnstring✅Invoice Reference NumberMust be a valid IRN format
Example: INV236-1070ECE8-20250826

📤 Response Format#

Success Response (200)#

{
  "responseCode": "00",
  "responseMessage": "Success",
  "data": {
    "requestType": null,
    "invoiceId": 134,
    "invoiceBusinessId": "26ede24b-ac50-475f-aacc-5ea6339f0863",
    "invoiceEntityId": "107",
    "invoiceIssueDate": "2025-08-26",
    "invoiceIrn": "INV236-1070ECE8-20250826",
    "invoiceDueDate": "2025-08-26",
    "invoiceIssueTime": "12:57:15",
    "invoiceTypeCode": "389",
    "invoicePaymentStatus": "PAID",
    "invoiceNote": "August Electricity Bill - Mr Ridwan",
    "invoiceTaxPointDate": "2025-08-26",
    "invoiceDocumentCurrencyCode": "NGN",
    "invoiceTaxCurrencyCode": "NGN",
    "invoiceStatus": "PENDING",
    "invoiceCreatedAt": "2025-08-27T09:25:35.694193",
    "invoiceUpdatedAt": "2025-08-27T08:33:50.756293",
    
    "invoiceCustomerPartyTin": "68721523-8104",
    "invoiceCustomerPartyEmail": "supplier_business@email.com",
    "invoiceCustomerPartyTelephone": "+23480254099000",
    "invoiceCustomerPartyBusinessDescription": "this entity is into sales of Cement and building materials",
    "invoiceCustomerPartyName": "Dangote Group",
    "invoiceCustomerCityName": "Gwarikpa",
    "invoiceCustomerPostalZone": "023401",
    "invoiceCustomerCountry": "NG",
    "invoiceCustomerStreetName": "32, owonikoko street",
    "invoiceCustomerLga": "Aba",
    "invoiceCustomerState": "Abia",
    
    "invoiceSupplierPartyId": "b4009129-ece8-45fc-9584-976fcbe35f8d",
    "invoiceSupplierPartyTin": "68721523-8104",
    "invoiceSupplierPartyEmail": "redtech@gmail.com",
    "invoiceSupplierPartyTelephone": "+234447784433",
    "invoiceSupplierPartyBusinessDescription": "AEDC Electricity Supply",
    "invoiceSupplierPartyName": "alias-sit-fuga-ex",
    "invoiceSupplierLga": "Aba",
    "invoiceSupplierState": "Abia",
    "invoiceSupplierCityName": "Aba",
    "invoiceSupplierPostalZone": "101245",
    "invoiceSupplierCountry": "NG",
    "invoiceSupplierStreetName": "vi",
    
    "invoiceLineExtensionAmount": 30030,
    "invoiceTaxExclusiveAmount": 30030,
    "invoiceTaxInclusiveAmount": 30255.22,
    "invoicePayableAmount": 30255.22,
    
    "invoiceLine": [
      {
        "invoiceLineInvoiceId": 134,
        "invoiceLineProductCategory": "Electrical energy",
        "invoiceLineDiscountRate": 0.1,
        "invoiceLineDiscountAmount": 30,
        "invoiceLineFeeRate": 0.2,
        "invoiceLineFeeAmount": 60,
        "invoiceLineInvoicedQuantity": 200,
        "invoiceLineExtensionAmount": 30030,
        "invoiceLineHsnCode": "2716.00",
        "invoiceLineItemDescription": "Electricity Units",
        "invoiceLineItemSellersItemIdentification": "Electricity Units",
        "invoiceLineItemName": "Electricity Supply",
        "invoiceLinePriceBaseQuantity": 1,
        "invoiceLinePriceUnit": "NGN PER 1",
        "invoiceLinePriceAmount": 150
      }
    ],
    
    "invoiceTaxTotal": [
      {
        "invoiceTaxTotalInvoiceId": 134,
        "invoiceTaxTotalAmount": null,
        "invoiceTaxTotalSubTotal": [
          {
            "taxSubTotalTaxableAmount": 30030,
            "taxSubTotalTaxAmount": 225.22,
            "taxSubTotalCategoryId": "STANDARD_VAT",
            "taxSubTotalCategoryPercent": 0.75
          }
        ]
      }
    ]
  }
}

Response Fields#

Top-Level Response#

FieldTypeDescription
responseCodestringResponse status code ("00" = success)
responseMessagestringHuman-readable response message
dataobjectInvoice data object

Invoice Core Details#

FieldTypeDescription
invoiceIdnumberUnique invoice identifier
invoiceBusinessIdstringBusiness ID associated with invoice
invoiceEntityIdstringEntity ID for the invoice
invoiceIrnstringInvoice Reference Number
invoiceIssueDatestringDate invoice was issued (YYYY-MM-DD)
invoiceDueDatestringPayment due date (YYYY-MM-DD)
invoiceIssueTimestringTime invoice was issued (HH:MM:SS)
invoiceTypeCodestringInvoice type code
invoicePaymentStatusstringPayment status (e.g., "PAID", "UNPAID")
invoiceStatusstringCurrent invoice status (e.g., "PENDING", "REVERSED")
invoiceNotestringAdditional notes or description
invoiceDocumentCurrencyCodestringInvoice currency code
invoiceTaxCurrencyCodestringTax currency code
invoiceCreatedAtstringTimestamp when invoice was created
invoiceUpdatedAtstringTimestamp when invoice was last updated

Customer Information#

FieldTypeDescription
invoiceCustomerPartyTinstringCustomer Tax Identification Number
invoiceCustomerPartyEmailstringCustomer email address
invoiceCustomerPartyTelephonestringCustomer phone number
invoiceCustomerPartyNamestringCustomer name
invoiceCustomerPartyBusinessDescriptionstringCustomer business description
invoiceCustomerCityNamestringCustomer city
invoiceCustomerPostalZonestringCustomer postal code
invoiceCustomerCountrystringCustomer country code
invoiceCustomerStreetNamestringCustomer street address
invoiceCustomerLgastringCustomer Local Government Area
invoiceCustomerStatestringCustomer state

Supplier Information#

FieldTypeDescription
invoiceSupplierPartyIdstringSupplier party ID
invoiceSupplierPartyTinstringSupplier Tax Identification Number
invoiceSupplierPartyEmailstringSupplier email address
invoiceSupplierPartyTelephonestringSupplier phone number
invoiceSupplierPartyNamestringSupplier name
invoiceSupplierPartyBusinessDescriptionstringSupplier business description
invoiceSupplierCityNamestringSupplier city
invoiceSupplierPostalZonestringSupplier postal code
invoiceSupplierCountrystringSupplier country code
invoiceSupplierStreetNamestringSupplier street address
invoiceSupplierLgastringSupplier Local Government Area
invoiceSupplierStatestringSupplier state

Financial Summary#

FieldTypeDescription
invoiceLineExtensionAmountnumberLine extension total amount
invoiceTaxExclusiveAmountnumberTotal amount excluding tax
invoiceTaxInclusiveAmountnumberTotal amount including tax
invoicePayableAmountnumberTotal amount payable

Line Items#

FieldTypeDescription
invoiceLinearrayArray of invoice line items
invoiceLineInvoiceIdnumberAssociated invoice ID
invoiceLineProductCategorystringProduct category
invoiceLineDiscountRatenumberDiscount rate applied
invoiceLineDiscountAmountnumberDiscount amount
invoiceLineFeeRatenumberFee rate applied
invoiceLineFeeAmountnumberFee amount
invoiceLineInvoicedQuantitynumberQuantity invoiced
invoiceLineExtensionAmountnumberLine item total amount
invoiceLineHsnCodestringHSN classification code
invoiceLineItemDescriptionstringItem description
invoiceLineItemNamestringItem name
invoiceLinePriceBaseQuantitynumberBase quantity for pricing
invoiceLinePriceUnitstringPrice unit description
invoiceLinePriceAmountnumberPrice per unit

Tax Information#

FieldTypeDescription
invoiceTaxTotalarrayArray of tax totals
invoiceTaxTotalInvoiceIdnumberAssociated invoice ID
invoiceTaxTotalAmountnumberTotal tax amount
invoiceTaxTotalSubTotalarrayArray of tax subtotals by category
taxSubTotalTaxableAmountnumberTaxable amount
taxSubTotalTaxAmountnumberTax amount for this category
taxSubTotalCategoryIdstringTax category identifier
taxSubTotalCategoryPercentnumberTax percentage rate

📝 Example Request#

cURL Example#

JSON Request Body#

{
  "irn": "INV123456-10EC108B-25670494"
}

✅ Validation Rules#

Request Validation#

businessId: Must be a valid UUID format in the URL path
X-Business-Key: Required authentication header, must be valid
irn: Required field, must match an existing invoice IRN

Business Logic Validation#

The specified invoice must exist in the system
The invoice must belong to the specified business
The invoice must be in a reversible state
User must have appropriate permissions to reverse invoices

⚠️ Error Responses#

Common Error Codes#

Status CodeResponse CodeDescription
400-Bad Request - Invalid IRN format or missing required fields
401-Unauthorized - Invalid or missing X-Business-Key
404-Not Found - Invoice with specified IRN does not exist
403-Forbidden - Insufficient permissions to reverse invoice
409-Conflict - Invoice cannot be reversed (already reversed or in invalid state)

Error Response Format#

{
  "responseCode": "ERROR_CODE",
  "responseMessage": "Error description",
  "data": null
}

💡 Use Cases#

When to Use This Endpoint#

1.
Accounting Corrections: Reverse an invoice that was issued incorrectly
2.
Transaction Cancellations: Cancel a transaction that needs to be voided
3.
Credit Note Generation: Create a reversal for issuing credits to customers
4.
Compliance Requirements: Maintain audit trails for reversed transactions

Important Considerations#

A reversal will trigger the creation of a credit note or adjustment entry
Reversed invoices usually cannot be un-reversed; a new invoice must be created instead

📊 Workflow Example#

1. Create Invoice (POST /invoices)
   ↓
2. Invoice Issued (Status: TRANSMITTING/TRANSMITTED)
   ↓
3. Need to Reverse (Error/Cancellation)
   ↓
4. Call Reversal Endpoint (POST /invoices/reversal)
   ↓
5. Invoice Reversed (creates a credit note on that invoice)
   ↓
6. Create New Corrected Invoice (if needed)

Request

Path Params

Header Params

Body Params application/json

Examples

Responses

🟢200OK
application/json
Bodyapplication/json

🟢201Created
🟠401Unauthorized
🟠403Forbidden
🟠404Not Found
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --globoff '/{{stage}}/external/businesses/{{businessId}}/invoices/reversal' \
--header 'X-Business-Key: BK-26EDE24BAC50475FAACC5EA6339F0863-DEV-B2Z6QCEHI3X9' \
--header 'Accept: */*' \
--header 'Content-Type: application/json' \
--data '{
    "irn": ""
}'
Response Response Example
{
    "responseCode": "00",
    "responseMessage": "Success",
    "data": {
        "requestType": null,
        "invoiceId": 134,
        "invoiceBusinessId": "b4009129-ece8-45fc-9584-976fcbe35f8d",
        "invoiceEntityId": "107",
        "invoiceIssueDate": "2025-08-26",
        "invoiceIrn": "INV236-1070ECE8-20250826",
        "invoiceDueDate": "2025-08-26",
        "invoiceIssueTime": "12:57:15",
        "invoiceTypeCode": "389",
        "invoicePaymentStatus": "PAID",
        "invoiceNote": "August Electricity Bill - Mr Ridwan",
        "invoiceTaxPointDate": "2025-08-26",
        "invoiceDocumentCurrencyCode": "NGN",
        "invoiceTaxCurrencyCode": "NGN",
        "invoiceAccountingCost": null,
        "invoiceBuyerReference": null,
        "invoiceOrderReference": null,
        "invoiceActualDeliveryDate": null,
        "invoicePaymentTermsNote": null,
        "invoiceCustomerPartyId": null,
        "invoiceCustomerPartyTin": "68721523-8104",
        "invoiceCustomerPartyEmail": "supplier_business@email.com",
        "invoiceCustomerPartyTelephone": "+23480254099000",
        "invoiceCustomerPartyBusinessDescription": "this entity is into sales of Cement and building materials",
        "invoiceCustomerPartyName": "Dangote Group",
        "invoiceCustomerCityName": "Gwarikpa",
        "invoiceCustomerPostalZone": "023401",
        "invoiceCustomerCountry": "NG",
        "invoiceCustomerStreetName": "32, owonikoko street",
        "invoiceSupplierPartyId": "b4009129-ece8-45fc-9584-976fcbe35f8d",
        "invoiceSupplierPartyTin": "68721523-8104",
        "invoiceSupplierPartyEmail": "redtech@gmail.com",
        "invoiceSupplierPartyTelephone": "+234447784433",
        "invoiceSupplierPartyBusinessDescription": "AEDC Electricity Supply",
        "invoiceSupplierPartyName": "alias-sit-fuga-ex",
        "invoiceSupplierLga": "Aba",
        "invoiceSupplierState": "Abia",
        "invoiceCustomerLga": "Aba",
        "invoiceCustomerState": "Abia",
        "invoiceSupplierCityName": "Aba",
        "invoiceSupplierPostalZone": "101245",
        "invoiceSupplierCountry": "NG",
        "invoiceSupplierStreetName": "vi",
        "invoiceLineExtensionAmount": 30030,
        "invoiceTaxExclusiveAmount": 30030,
        "invoiceTaxInclusiveAmount": 30255.22,
        "invoicePayableAmount": 30255.22,
        "invoiceContractDocumentIrn": null,
        "invoiceContractDocumentIssueDate": null,
        "invoiceOriginatorDocumentIrn": null,
        "invoiceOriginatorDocumentIssueDate": null,
        "invoiceReceiptDocumentIrn": null,
        "invoiceReceiptDocumentIssueDate": null,
        "invoiceDispatchDocumentIrn": null,
        "invoiceDispatchDocumentIssueDate": null,
        "invoiceDeliveryPeriodStartDate": null,
        "invoiceDeliveryPeriodEndDate": null,
        "invoiceStatus": "PENDING",
        "invoiceCreatedAt": "2025-08-27T09:25:35.694193",
        "invoiceUpdatedAt": "2025-08-27T08:33:50.756293",
        "invoiceAdditionalDocumentReference": null,
        "invoiceAllowanceCharge": null,
        "invoiceBillingReference": null,
        "invoiceLine": [
            {
                "invoiceLineInvoiceId": 134,
                "invoiceLineProductCategory": "Electrical energy",
                "invoiceLineDiscountRate": 0.1,
                "invoiceLineDiscountAmount": 30,
                "invoiceLineFeeRate": 0.2,
                "invoiceLineFeeAmount": 60,
                "invoiceLineInvoicedQuantity": 200,
                "invoiceLineExtensionAmount": 30030,
                "invoiceLineHsnCode": "2716.00",
                "invoiceLineItemDescription": "Electricity Units",
                "invoiceLineItemSellersItemIdentification": "Electricity Units",
                "invoiceLineItemName": "Electricity Supply",
                "invoiceLinePriceBaseQuantity": 1,
                "invoiceLinePriceUnit": "NGN PER 1",
                "invoiceLinePriceAmount": 150
            }
        ],
        "invoicePaymentMeans": null,
        "invoiceTaxTotal": [
            {
                "invoiceTaxTotalInvoiceId": 134,
                "invoiceTaxTotalAmount": null,
                "invoiceTaxTotalSubTotal": [
                    {
                        "taxSubTotalTaxableAmount": 30030,
                        "taxSubTotalTaxAmount": 225.22,
                        "taxSubTotalCategoryId": "STANDARD_VAT",
                        "taxSubTotalCategoryPercent": 0.75
                    }
                ]
            }
        ]
    }
}
Modified at 2026-08-21 08:54:07
Previous
Get Sent Invoice Details
Next
Fetch Received Invoices
Built with