E-invoicing
Get invoice QR code
Get the QR code for an invoice as a base64 image, together with its encrypted invoice data.
Retrieve the QR code for a specific invoice, including encrypted invoice data and base64-encoded QR image.
Request
Headers
application/json or */*application/json or */*Path Parameters
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
}
}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
curl -X GET "{baseUrl}/{stage}/external/businesses/26ede24b-ac50-475f-aacc-5ea6339f0863/invoices/INV237-1070ECE8-20250826/qrcode" \
-H "Authorization: Bearer BK_QUBYK4S2X97J"Using the QR Code
Display in HTML
<img src="data:image/png;base64,{qrCodeBase64}" alt="Invoice QR Code" />Display in JavaScript
const img = document.createElement('img');
img.src = `data:image/png;base64,${response.data.qrCodeBase64}`;
img.alt = 'Invoice QR Code';
document.body.appendChild(img);Save to File (Node.js)
const fs = require('fs');
const buffer = Buffer.from(response.data.qrCodeBase64, 'base64');
fs.writeFileSync('invoice-qr.png', buffer);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)