Skip to content

Onboarding

Update business settings

Change your webhook and QR code settings.

POST{baseUrl}/{stage}/external/businesses/{businessId}/settings

Purpose: Configure business-level settings including webhook notifications, QR code generation parameters.

Request

Headers

X-Business-Keyrequired
Content-Typerequired
application/json

Path Parameters

businessIDstring
Your business NRS ID

Body Parameters

All fields are optional. Only include fields you want to update.

webhookUrlstring
HTTPS URL to receive invoice notifications (B2B transmissions, status updates)
webhookAuthstring
Authentication token/header value for webhook requests
qrCodePublicKeystring
Public key for QR code validation on invoices
qrCodeCertificatestring
Certificate for QR code generation

Field Details

webhookUrl & webhookAuth

  • Used to receive real-time notifications when invoices are transmitted (B2B) or status changes occur
  • Webhook payloads will include IRN, invoice status, and party details
  • webhookAuth sent as Authorization header in webhook requests to your endpoint

qrCodePublicKey & qrCodeCertificate The Nigeria Revenue Service (NRS) issues cryptographic key pairs to each taxpayer for invoice QR code generation.

Key File Contents

The provided .txt file contains the following:

  • Public Key
  • Certificate

Retrieving Your Keys

Follow the steps outlined in the provided guide (see referenced screenshots) to extract:

  • Public Key
  • Certificate
Retrieving the QR code public key and certificate, step 1Retrieving the QR code public key and certificate, step 1
Retrieving the QR code public key and certificate, step 2Retrieving the QR code public key and certificate, step 2

API Configuration

Once retrieved, include these values as parameters in the business-settings endpoint.

Response

Success (200)

The full success response is in the Response panel.

responseCode
00 = success, 106 = validation failed
responseMessage
Success / Failed response

Errors

400 - Validation Failed

JSON
{
  "responseCode": "106",
  "responseMessage": "Validation failed: webhookUrl must be a valid HTTPS URL"
}

Common causes:

  • URLs not HTTPS
  • Invalid URL format
  • Certificate/key format invalid
  • Field exceeds max length

401 - Unauthorized

JSON
{
  "responseCode": "03",
  "responseMessage": "Invalid or expired business key"
}

→ Verify Authorization header format and business key validity

404 - Business Not Found

JSON
{
  "responseCode": "02",
  "responseMessage": "Business not found with ID: {businessID}"
}

→ Check businessID in URL matches your registered NRS ID

500 - Internal Server Error

JSON
{
  "responseCode": "99",
  "responseMessage": "An internal error occurred while updating settings",
  "requestId": "req_xyz123"
}

→ Retry after 2-3 minutes. Contact support with requestId if persistent.

Example Requests

Webhook Settings:

cURL
curl -X POST "{Dev_baseUrl}/{Dev_stage}/external/businesses/{Dev_businessID}/settings" \
  -H "X-Business-Key: BK_QUBYK4S2X97J" \
  -H "Content-Type: application/json" \
  -d '{
    "webhookUrl": "https://api.yourcompany.com/webhooks/invoices",
    "webhookAuth": "Bearer sk_live_xyz123abc"
  }'

All Settings:

cURL
curl -X POST "{Dev_baseUrl}/{Dev_stage}/external/businesses/{Dev_businessID}/settings" \
  -H "X-Business-Key: BK_QUBYK4S2X97J" \
  -H "Content-Type: application/json" \
  -d '{
    "webhookUrl": "https://api.yourcompany.com/webhooks/invoices",
    "webhookAuth": "Bearer sk_live_xyz123abc",
    "qrCodePublicKey": "-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----",
    "qrCodeCertificate": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"
  }'

Webhook Configuration

When configured, receive notifications for:

  • Invoice transmitted (B2B)
  • Status changes (ACCEPTED, REJECTED, PAID)
  • Validation errors

Webhook Payload Example:

JSON
{
  "event": "invoice.transmitted",
  "data": {
    "invoiceIRN": "IRN_7H3K9M2P4S6V8X1Z",
    "status": "TRANSMITTED"
  }
}

Requirements: Accept POST, return 200 within 5 seconds, verify webhookAuth header

Common Issues

"webhookUrl must be HTTPS" → Only HTTPS supported
"Invalid certificate" → Use PEM format with BEGIN/END markers
"Logo not displaying" → Verify URL is publicly accessible
Webhook not firing → Check endpoint returns 200 and auth is correct

Security Notes

  • Store webhookAuth securely, rotate regularly
  • Protect private keys for QR certificates
  • All URLs must use HTTPS
  • Validate webhook payloads before processing