e-Invoice Webhooks API

HMAC-SHA-256 signed webhooks for IRN generation, cancellation, bulk completion, and NIC upstream events. Automatic retries + 7-day replay.

Get sandbox keys → View OpenAPI docs Talk to sales

What is the e-Invoice Webhooks API?

The e-Invoice Webhooks API delivers real-time event notifications to your system — `irn.generated`, `irn.cancelled`, `bulk.completed`, `upstream.outage`, `upstream.resolved`, `rate_limit.threshold_reached`. Each webhook is HMAC-SHA-256 signed with your tenant secret so you can verify authenticity.

Webhooks ship with automatic retries (exponential backoff, max 24 hours), a 7-day replay window from the dashboard for compliance audits, and detailed delivery logs. Most teams use webhooks to eliminate polling and update accounting systems the moment IRN is issued.

Quick spec

Code examples

curl Node.jsPythonJava
curl -X POST 'https://apisandbox.whitebooks.in/einvoice/api/v1/webhooks/subscribe' \
  -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/webhooks/subscribe', {
  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/webhooks/subscribe',
    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/webhooks/subscribe"))
    .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

What events are emitted?

irn.generated, irn.cancelled, bulk.completed, upstream.outage, upstream.resolved, rate_limit.threshold_reached. More on request.

How are webhooks secured?

HMAC-SHA-256 signature in X-WB-Signature header. Verify using your tenant webhook_secret.

What if my endpoint is down?

Auto-retry with exponential backoff up to 24h. Replay from dashboard within 7-day window.

Can I subscribe to multiple URLs?

Yes — up to 10 webhook endpoints per tenant.

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 →