SDKs for your favorite stack
Java, TypeScript/Node.js and Python. Generated from the OpenAPI 3.0 spec, fully typed, with automatic retries, typed errors, and webhook verification. Issue Verifactu invoices from the SDK you already use.
Test mode included · OpenAPI 3.0 downloadable
Built for production
Not a thin fetch wrapper. Every SDK ships with the toolkit your team expects from a professional API.
Types from OpenAPI 3.0
Models auto-generated from the OpenAPI contract. Full autocomplete, build-time errors, zero drift with the backend.
Automatic retries
Exponential backoff on 429 and 5xx. Client errors (400, 401, 404, 422) are never retried. Configurable.
Typed errors
BeeLAuthError, BeeLNotFoundError, BeeLValidationError, BeeLConflictError, BeeLRateLimitError. Catch by class instead of checking status codes.
Automatic Idempotency-Key
Every POST generates an Idempotency-Key. On retry, the server returns the original response instead of duplicating.
Webhook verification
WebhookVerifier included — HMAC-SHA256 with constant-time comparison. Reject spoofed payloads before processing.
PDF download
beel.downloadPdf(id) returns the buffer + suggested file name. No wrestling with Content-Disposition.
One command
Pick your favorite package manager. All three SDKs are published to the official registries.
Java and Python are coming soon. TypeScript/Node.js is already live on npm.
Zero to Verifactu in 10 lines
Same flow in every language: create draft, issue. BeeL. registers the invoice with the Spanish tax authority automatically.
Examples use beel_sk_test_ — copy-paste into your sandbox without risk.
Get started in 4 steps
Ten minutes from npm install to your first invoice registered with the tax authority.
- 1
Install the SDK
npm install @beel_es/sdk. TypeScript types included, zero heavy dependencies.
Node.js$ npm install @beel_es/sdk - 2
Set your test API key
Use a key with the beel_sk_test_ prefix. Nothing is sent to AEAT in sandbox mode — test the full flow with no consequences.
.envBEEL_API_KEY=beel_sk_test_a1b2c3d4e5f6g7h8 - 3
Create your first invoice
A call to invoices.create() returns the draft with id. A second call to invoices.issue() finalizes it, assigns a number, and triggers Verifactu.
Node.js - 4
Listen for events
Subscribe to the verifactu.status.updated webhook so you know when the tax authority accepts the invoice in real time. HMAC signature verified by the SDK.
Transparent pricing, no surprises
The SDKs are free. You pay only for invoices emitted in production. Sandbox is unlimited.
Prices billed annually. Save ≈ 20% vs paying monthly. By subscribing you accept the Terms and Conditions, including the API terms of use.
