Patterns
REST API vs gRPC for e-invoicing
Why REST dominates e-invoicing and gRPC stays marginal
European e-invoicing standards (Factur-X, UBL, Peppol BIS 3.0) rely on XML/JSON exchanges over HTTP REST. No PDP or Peppol standard mandates or even supports gRPC: Protobuf serialisation makes payloads unreadable by tax audit tools (Wireshark, curl, Postman) and breaks ISCA auditability. gRPC remains relevant for high-frequency internal communications (microservices, bidirectional streaming), but PDP, PPF and Scell.io public APIs are strictly REST + JSON. Choosing gRPC to expose an external e-invoicing API is an anti-pattern: Peppol incompatibility, complex fiscal audit, no Access Point support.
Key facts
- Peppol BIS 3.0 and PDPs require XML over HTTP, no gRPC
- Fiscal auditability: readable JSON/XML payloads, opaque Protobuf
- Scell.io API: REST JSON at https://api.scell.io/api/v1
- gRPC relevant for internal services (worker → DB → cache)
- OpenAPI 3.1 remains the doc standard, no universal gRPC equivalent
Code example
# OpenAPI 3.1 — Scell.io REST endpoint
paths:
/api/v1/invoices:
post:
summary: Create invoice (Factur-X / UBL / CII)
security:
- apiKey: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/InvoiceCreate'
responses:
'201':
description: Created
content:
application/json:
schema: { $ref: '#/components/schemas/Invoice' }