1. E-Invoice Creation
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
        POST
      • Get Invoice QR Code
        GET
      • Update Invoice Payment Status
        POST
      • Get Sent Invoices
        GET
      • Get Sent Invoice Details
        GET
    • E-Invoice Reversal
      • Invoice Reversal
    • 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 Creation

Get Invoice QR Code

GET
{{baseUrl}}/{{stage}}/external/businesses/{{businessId}}/invoices/{{invoiceIrn}}/qr
Retrieve the QR code for a specific invoice, including encrypted invoice data and base64-encoded QR image.
GET {{baseUrl}}/{{stage}}/external/businesses/{{businessId}}/invoices/{{invoiceIrn}}/qr

Request#

Headers#

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

Path Parameters#

ParameterTypeRequiredDescription
businessIdstring (UUID)YesYour business FIRS ID
invoiceIrnstringYesInvoice Reference Number
Example: INV237-1070ECE8-20250826

Response#

Success (200)#

{
  "responseCode": "00",
  "responseMessage": "QR code retrieved successfully",
  "data": {
    "irn": "INV237-1070ECE8-20250826",
    "qrCodeBase64": "iVBORw0KGgoAAAANSUhEUgAAAQAAAAEA...",
    "encryptedDataBase64": "eyJpbnZvaWNlSWQiOiIxMjMi...",
    "timestamp": 1693046835000
  }
}
FieldTypeDescription
qrCodeBase64stringBase64-encoded PNG image of QR code
encryptedDataBase64stringEncrypted invoice data (for verification)
irnstringInvoice Reference Number (confirmation)
timestampnumberUnix timestamp of generation

Errors#

404 - Invoice Not Found
{
  "responseCode": "404",
  "responseMessage": "Invoice not found with IRN: INV999-INVALID"
}
→ Verify invoiceIrn exists and belongs to businessId
403 - QR Code Disabled
{
  "responseCode": "403",
  "responseMessage": "QR code generation disabled for this business"
}
→ Enable QR code feature in business settings or contact support
422 - Invoice Not Eligible
{
  "responseCode": "422",
  "responseMessage": "Invoice not eligible for QR code generation"
}
→ Invoice must be finalized and not cancelled

Example Request#


Using the QR Code#

Display in HTML#

Display in JavaScript#

Save to File (Node.js)#


QR Code Contents#

The QR code contains encrypted invoice data that can be scanned for verification:
Invoice Reference Number (IRN)
Invoice amount and currency
Supplier TIN
Issue date
Digital signature for authenticity
Decryption: Requires your business's QR code certificate (configured in business settings)

Prerequisites#

✅ Business must have QR code generation enabled in settings
✅ QR code public key and certificate configured
✅ Invoice must be finalized (not draft or cancelled)
Enable QR Codes: POST /businesses/{businessId}/settings with qrCodePublicKey and qrCodeCertificate

Common Issues#

QR code not generating
→ Check business settings have QR certificate configured
"Invoice not eligible"
→ Invoice must be in PENDING, PAID, or APPROVED status
QR code not displaying
→ Verify base64 string is complete and properly formatted

Security Notes#

⚠️ QR codes contain encrypted invoice data
⚠️ Always use HTTPS to retrieve QR codes
⚠️ Validate business ownership before generating QR codes
⚠️ QR codes are generated on-demand (not cached)

Request

Header Params

Responses

🟢200OK
text/plain
🟠401Unauthorized
🟠403Forbidden
🟠404Not Found
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --globoff '{{baseUrl}}/{{stage}}/external/businesses/{{businessId}}/invoices/{{invoiceIrn}}/qr' \
--header 'X-Business-Key: BK-26EDE24BAC50475FAACC5EA6339F0863-DEV-B2Z6QCEHI3X9' \
--header 'Accept: */*'
Response Response Example
{
  "data": {
    "encryptedDataBase64": "string",
    "irn": "string",
    "qrCodeBase64": "string",
    "timestamp": 1083
  },
  "responseCode": "string",
  "responseMessage": "string"
}
Modified at 2026-08-21 08:49:42
Previous
Create Invoice
Next
Update Invoice Payment Status
Built with