NIC-Compliant e-Invoice API

WhiteBooks routes all e-Invoice API traffic through the official NIC IRP channel. Full schema compliance, real-time updates, certified IRN flow.

Get sandbox keys → View OpenAPI docs Talk to sales

What is the NIC-Compliant e-Invoice API?

NIC (National Informatics Centre) operates the official Invoice Registration Portal (IRP) that issues IRNs. WhiteBooks holds direct NIC API access and routes every e-Invoice request through the official channel — not screen-scraped or reverse-engineered.

This matters because the NIC schema is updated regularly (recent: e-Invoice mandate threshold drops, mandatory field additions). NIC notifies API-channel partners in advance of schema changes — so WhiteBooks consumers are insulated from upstream surprises and outages.

Quick spec

Code examples

curl Node.jsPythonJava
curl -X POST 'https://apisandbox.whitebooks.in/einvoice/api/v1/irn/generate' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{ /* payload */ }'
Node.js
const res = await fetch('https://apisandbox.whitebooks.in/einvoice/api/v1/irn/generate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + accessToken,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(payload),
});
const data = await res.json();
Python
import requests

resp = requests.post(
    'https://apisandbox.whitebooks.in/einvoice/api/v1/irn/generate',
    headers={'Authorization': f'Bearer {access_token}'},
    json=payload,
)
data = resp.json()
Java
HttpRequest req = HttpRequest.newBuilder()
    .uri(URI.create("https://apisandbox.whitebooks.in/einvoice/api/v1/irn/generate"))
    .header("Authorization", "Bearer " + accessToken)
    .header("Content-Type", "application/json")
    .post(BodyPublishers.ofString(payload))
    .build();
HttpResponse<String> resp = HttpClient.newHttpClient()
    .send(req, BodyHandlers.ofString());

Integrate in 3 steps

  1. Sign up at accounts.whitebooks.in — sandbox credentials issued instantly, no sales gate.
  2. Make your first call against the sandbox base URL using the code example above. Validate against your local model.
  3. Move to production once your tests pass — switch host to https://api.whitebooks.in/einvoice. Same payload, same response shape.

Frequently asked questions

How can I verify the NIC channel?

Every signed JSON returned carries NIC's RSA signature. Verify with NIC's published public key — proves the IRN went through the official channel.

Does WhiteBooks support all NIC schema versions?

Current schema (v1.1) plus older v1.03 with auto-conversion for legacy integrations.

How are NIC outages handled?

WhiteBooks queues requests and replays automatically when NIC is back. Webhook fires on resolution.

Is NIC compliance enough for full e-Invoice flow?

Yes — NIC IRP is the only authorized IRN issuer. After IRN generation, the invoice flows into GSTR-1 automatically via GSTN integration.

Explore the full e-Invoice API

This is one endpoint inside the WhiteBooks e-Invoice API suite. See the full documentation — every endpoint, every parameter, every error code.

Open the e-Invoice API page →

Related e-Invoice API endpoints

IRN Generation API → IRN Cancellation API → Bulk IRN Generation API (1,000/call) → Signed QR Code Retrieval API →