e-Invoice API for SAP — S/4HANA, ECC

SAP-native e-Invoice generation. JCo / RFC + SAP BTP iFlow templates. Bulk IRN from SAP billing runs with full payload mapping.

Get sandbox keys → View OpenAPI docs Talk to sales

What is the e-Invoice API for SAP — S/4HANA, ECC?

The WhiteBooks e-Invoice connector for SAP supports S/4HANA, ECC 6.0+, and ABAP-based custom billing modules. It exposes IRN generation, cancellation, and signed JSON retrieval as native BAPI-callable RFCs in addition to standard REST endpoints.

For high-volume SAP billing runs (typical: 50,000+ invoices/day), the connector batches into 1,000-invoice bulk-IRN calls automatically — preserving SAP's document number sequencing and updating the SAP billing document with the IRN + signed QR for printing.

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 does it handle bulk billing runs?

The connector batches up to 1,000 invoices per WhiteBooks API call. Per-invoice IRN + QR is written back to the SAP billing document.

Is SAP Cloud (S/4HANA Cloud public) supported?

Yes — via SAP BTP iFlow + HTTPS destination to api.whitebooks.in.

How long is integration?

2-5 business days for S/4HANA with standard config. ECC with custom billing: 1-2 weeks.

Where's the sample iFlow?

github.com/whitebooks-in/sap-einvoice — includes ABAP RFC samples + BTP iFlow template.

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 →