# BeeL. API Documentation Complete API documentation for the BeeL. invoicing platform. Public invoicing API for businesses in Spain with full VeriFactu support. This file is the whole documentation, several megabytes long. To answer a question, do not read it: search with https://docs.beel.es/api/search?q= and read only the page it returns (its `md_url`, e.g. https://docs.beel.es/llms.mdx/guides/idempotency). Rules: https://docs.beel.es/api/rules/ and https://docs.beel.es/api/rules?error_code=. Index: https://docs.beel.es/llms.txt. The same content, one area per file: - Get started: https://docs.beel.es/get-started/llms-full.txt - Multi-NIF: https://docs.beel.es/multi-nif/llms-full.txt - VeriFactu: https://docs.beel.es/verifactu/llms-full.txt - Rules: https://docs.beel.es/rules/llms-full.txt - Stripe: https://docs.beel.es/stripe/llms-full.txt - API reference: https://docs.beel.es/api-reference/llms-full.txt - Changelog: https://docs.beel.es/changelog/llms-full.txt - Errors: https://docs.beel.es/errors/llms-full.txt --- # AI agents How to build a BeeL. integration with an AI agent — the official SDK, the MCP server, the Claude Code plugin, the Markdown docs and llms.txt, the fiscal rules as data, and an AGENTS.md block to paste into your repository. An agent that writes invoicing code needs two things: the API, and the fiscal rules that depend on the data it sends and on the business that issues. BeeL. publishes both in forms an agent reads directly, so it does not have to scrape HTML or guess. ## Pick a way in | You want the agent to | Use | |---|---| | Act on your BeeL. account: issue, void, look up invoices | The [MCP server](/mcp), `https://mcp.beel.es/mcp` | | Write the integration code | The [Node.js / TypeScript SDK](/sdks/node) (`@beel_es/sdk` 2.2.0+, for projects with `package.json`), with the code in [From order to invoice](/guides/order-to-invoice), [Idempotency](/guides/idempotency) | | Review integration code in your repository, or have it scaffolded | The [Claude Code plugin](/claude-code), with its implement and audit skills | | Read the docs | [`/llms.txt`](/llms.txt), the index, and any page as Markdown: add `.md` to its URL | | Know what it must never do | The [fiscal rules](/rules): [every way to use them from your tools](/rules#use-the-rules-in-your-tools) | | Search the docs from a terminal | [`beel docs search`](/cli) in the CLI | ## Give your agent the rules Paste this into the `AGENTS.md` or `CLAUDE.md` of the repository where the integration lives. It tells the agent which SDK to install for the stack, with the REST basics as the fallback, and lists the rules marked critical. It is built from the [SDK catalogue](/sdks#sdks-json) and the rules, so it changes when they do; copy it again after a release. ```md ## BeeL. invoicing API - Docs index for agents: https://docs.beel.es/llms.txt — every page has a Markdown twin at `.md`. - Fiscal rules: https://docs.beel.es/rules (JSON: https://docs.beel.es/api/rules.json). Cite rule ids (e.g. LIF-001) when a rule decides a change. - Test keys (`beel_sk_test_…`) hit the sandbox; live keys (`beel_sk_live_…`) issue real invoices. Develop and run tests with a test key only. Never commit or log a key; read it from the environment (`BEEL_API_KEY`). ### SDK Use the official BeeL. SDK for your stack. If it is not installed in the project, installing it is step one: do not hand-write HTTP calls for the flows it covers, the SDK carries the typed request bodies and the safe retries. If your project configures the API URL, pass it as `baseUrl` instead of calling the API by hand; without it the client uses production. Read the key and the URL from your project's own environment variables, whatever their names. - TypeScript / JavaScript (`package.json`): `npm install @beel_es/sdk` (2.2.0 or later). Code for each case: https://docs.beel.es/guides/order-to-invoice.md, https://docs.beel.es/guides/idempotency.md - Python (`pyproject.toml`, `requirements.txt`, `setup.py`, `Pipfile`): beel-sdk is legacy. Version 1.0.0 calls the routes without the company in the path, which retire on the date in the deprecation policy. Until a new release, call the REST API. - Java (`pom.xml`, `build.gradle`, `build.gradle.kts`): es.beel:beel-sdk is legacy. Version 1.0.2 calls the routes without the company in the path, which retire on the date in the deprecation policy. Until a new release, call the REST API. - No recommended SDK for your stack: call the REST API as the API reference describes, or generate a typed client from the OpenAPI specification. Catalogue: https://docs.beel.es/api/sdks.json ### REST, for a stack without a recommended SDK - API base: `https://app.beel.es/api`; every path starts with `/v1`. Auth: `Authorization: Bearer $BEEL_API_KEY`. - Company-scoped routes are `/v1/companies/{company_id}/…`. - Send an `Idempotency-Key` on every create, issue, void or corrective, and reuse it only to retry that same request. ### Critical rules - Once an invoice is issued, neither the invoice nor its billing record is changed or removed. Any correction goes through a later document: a corrective invoice or a void. ([LIF-001](https://docs.beel.es/rules/LIF-001.md)) - Do not issue test invoices with a production key. An invoice issued in production is a real invoice, sent to AEAT and numbered in your series, even if it was meant as a test; one issued by mistake has to be voided. ([LIF-003](https://docs.beel.es/rules/LIF-003.md)) - Send an Idempotency-Key header on every call that creates, issues, corrects or voids an invoice, and repeat the same key when you retry. A retried request returns the stored response of the first one, a 5xx included, for 24 hours; a 4xx answer frees the key, so the corrected request can reuse it. ([LIF-004](https://docs.beel.es/rules/LIF-004.md)) - Void an invoice only when it was issued by mistake: the sale or service it describes never took place, it was a test, or it is an accidental duplicate. An invoice for an operation that did happen is not voided to fix its amounts, VAT or details; it is corrected with a corrective invoice. The one exception is a withholding that should not have been applied: the withholding is not a cause for a corrective (COR-024), so that invoice is voided and issued again without it. The API asks for the confirmation once the invoice was sent or paid (VOI-004) and refuses to void a corrected invoice (VOI-005). ([VOI-001](https://docs.beel.es/rules/VOI-001.md)) - Send the rectification_code that matches the cause: R1 for an error founded in law or art. 80 Uno, Dos and Seis LIVA, R2 for insolvency, R3 for bad debt, R4 for the rest. A simplified invoice is always corrected with R5, and R5 corrects nothing else. ([COR-002](https://docs.beel.es/rules/COR-002.md)) - Do not expect or send an invoice number: a draft has none, and BeeL. assigns the next number of the chosen series when the invoice is issued. Read invoice_number from the response of the issue call. ([NUM-001](https://docs.beel.es/rules/NUM-001.md)) - Treat every issued number as consumed for good. A voided invoice, or a test issued in production, keeps its number in the series; the invoice that replaces it gets a new one. BeeL. never gives two invoices of a company the same number: a series whose format could print the numbers of another series of the company is rejected with SERIES_FORMAT_OVERLAPS. If AEAT already holds a record with the same number and issue date that is not this invoice, for example one issued with the software you used before, the invoice is not registered: its verifactu.submission_status is REJECTED, and it has to be issued again with a different series or number. ([NUM-002](https://docs.beel.es/rules/NUM-002.md)) - Do not use a standard or simplified invoice with a negative total as a credit note. A refund or a reduction is a corrective invoice against the original. An invoice that totals zero is valid. ([CNT-019](https://docs.beel.es/rules/CNT-019.md)) - Do not issue a simplified invoice whose total, VAT included, is above 3,000 €. Above it, issue a standard invoice (F1) with the customer identified. ([SIM-001](https://docs.beel.es/rules/SIM-001.md)) - The API has no currency field: every amount you send is read as euros. Convert foreign-currency prices to euros before sending them; you may mention the original currency in the notes. ([TAX-013](https://docs.beel.es/rules/TAX-013.md)) - The API has no writable issue date: an invoice is dated the day it is issued, and a scheduled one the day it is scheduled for. To record when the sale happened, send operation_date. ([DAT-001](https://docs.beel.es/rules/DAT-001.md)) - Do not render or send a document of an invoice under VeriFactu before its QR data exists. Wait for the invoice.pdf.generated webhook, or read the invoice until verifactu.qr_url is present. The API applies the same rule to its own PDF: it is painted once, with the QR, and never modified afterwards — voiding or correcting the invoice does not change it. Asking for the PDF of an invoice whose record ended without QR data answers INVOICE_NOT_REGISTERED_NO_PDF; an email requested before the PDF exists is accepted with 202 and sent when the PDF is stored, or recorded as failed if the record ends without QR data. ([QRC-002](https://docs.beel.es/rules/QRC-002.md)) - Track each issued invoice's verifactu.submission_status (NOT_SUBMITTED, PENDING, ACCEPTED, ACCEPTED_WITH_ERRORS, REJECTED, VOIDED) through the verifactu.status.updated webhook and a periodic reconciliation. A transient AEAT error keeps the invoice PENDING while BeeL. retries it. A REJECTED invoice is not registered: read its error_message, and its error_code when AEAT gave one, and fix it. An ACCEPTED_WITH_ERRORS invoice is registered but flagged: handle it as REC-009 says. GET /v1/companies/{company_id}/invoices/{invoice_id}/verifactu-records lists each record of the invoice, its cancellation included, with its own status. ([REC-008](https://docs.beel.es/rules/REC-008.md)) ``` Each rule it names has a page with its legal basis, who checks it, the error the API answers and a right and a wrong example. To give an agent the rest of the catalogue — as JSON, one rule at a time, through the MCP tools or the Claude Code skill — see [Use the rules in your tools](/rules#use-the-rules-in-your-tools). ## What the docs serve to agents - **`/llms.txt`** — the index: instructions for agents, one line per page and per rule, and child indexes for the [error codes](/errors/llms.txt), the [API reference](/api-reference/llms.txt) and the [changelog](/changelog/llms.txt). - **`//llms-full.txt`** — every page of one area in full, for example [`/verifactu/llms-full.txt`](/verifactu/llms-full.txt); [`/llms-full.txt`](/llms-full.txt) has them all. - **`.md`** — any page as Markdown. HTML pages announce it with a `Link: <…md>; rel="alternate"; type="text/markdown"` header, and the Markdown response carries `x-markdown-tokens` with its approximate size. - **[`/api/sdks.json`](/api/sdks.json)** — which official SDK to use for each stack: how to detect the stack, the package and its install command, the minimum version, and the guides with code for it. Its shape is on [SDKs](/sdks#sdks-json). - **`/rules/.md`**, **`/api/rules.json`** and **`/rules/llms-full.txt`** — the fiscal rules; what each one holds is in [Use the rules in your tools](/rules#use-the-rules-in-your-tools). - **[`/.well-known/skills/index.json`](/.well-known/skills/index.json)** — where to find the agent skill that teaches the rules. - **[`/api/openapi`](/api/openapi)** — the contract. Every one of them is generated from the same sources as the pages, on each build. ## Gotchas Give an agent a **test key** (`beel_sk_test_…`). With a live key, an invoice it issues is real: it is numbered in your series, registered with AEAT, and can only be voided or corrected — see [LIF-003 · Test in the sandbox, never with real invoices](/rules/lifecycle#lif-003). - Agents retry. Every write must carry an `Idempotency-Key`, the same one on each retry of that request — see [LIF-004 · Retry writes with the same Idempotency-Key](/rules/lifecycle#lif-004). The SDK does both for you, and for invoices tied to an order the [recipe](/guides/order-to-invoice#issue-once) makes a second run safe; code that calls the API directly has to do it itself. - An agent cannot tell a test invoice from a real one, or a void from a correction, without the rules. Point it at [Void or correct](/rules/void#void-or-correct) before it touches an issued invoice. ## Related - [SDKs](/sdks) — which one to install for your stack - [MCP server](/mcp) — connect an assistant to your account, with OAuth - [Claude Code](/claude-code) — the plugin and its skills - [Fiscal rules](/rules) — every rule, with its id, source and error codes, and how to use them from your tools - [CLI](/cli) — `beel docs` searches these docs locally --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Claude Code Use the BeeL. plugin for Claude Code to implement, audit, and maintain BeeL. API integrations with AI assistance. The BeeL. plugin for Claude Code is a toolkit for working with the BeeL. API: an always-current integration guide plus dedicated skills to implement an integration, audit it for compliance, build webhook receivers, work with several NIFs, apply the fiscal rules, and detect drift against the live API. It also connects the hosted [MCP server](/mcp), so Claude can act on your BeeL. account from the same session. The plugin keeps only stable invariants locally (auth, idempotency, response envelope, invoice lifecycle). Everything else — endpoints, schemas, events — Claude fetches from these docs at the moment of use, so the plugin never goes stale. ## Before you start - [Claude Code](https://claude.ai/claude-code) installed - A BeeL. API key — get one at [**Settings > API Keys**](https://app.beel.es/ajustes/api-keys) ## Installation Open Claude Code in your project and run: ```text /plugin marketplace add beel-es/claude-plugins /plugin install beel-api@beel ``` That's it. The plugin installs automatically and updates whenever a new version is published. ## Skills Claude Code activates the right skill automatically based on what you ask — no manual invocation needed. You can also invoke them explicitly: | Skill | What it does | |-------|--------------| | `/beel-api:beel-api` | Integration guide: golden rules, auth, doc lookup, plus recipes (typed client / official SDK, webhook handler, invoice flow, fiscal context, debugging, CLI) | | `/beel-api:implement` | Guided integration: detects your stack, sets up the official SDK or a typed client, and implements the flows you need against the live spec | | `/beel-api:audit` | Audits your integration code against the BeeL. rules — idempotency, key security, error handling, rate limits, webhook verification, invoice lifecycle — and reports findings with severity and ready-to-apply fixes | | `/beel-api:webhooks` | Builds a correct webhook receiver: signature verification, raw-body handling, deduplication, retry-aware processing | | `/beel-api:multi-nif` | Integrates the multi-NIF model: one account holding several companies, addressing a company per request, members and grants, and managed accounts | | `/beel-api:rules` | The fiscal rules an integration must respect — VeriFactu, numbering, corrective and simplified invoices, dates, taxes, QR — cited by id, looked up by id, domain or error code, and ready to add to your repository's `AGENTS.md` or `CLAUDE.md`. See [Use the rules in your tools](/rules#use-the-rules-in-your-tools) | | `/beel-api:upgrade` | Checks your integration against the live OpenAPI spec and SDK releases: breaking changes, deprecated patterns, new features worth adopting | ## Example prompts ```text Add BeeL invoice creation to my existing Express checkout webhook ``` ```text Audit my BeeL integration — is it production-safe? ``` ```text Implement a webhook receiver for invoice.issued events ``` ```text Is my BeeL integration up to date with the current API? ``` ```text List all ISSUED invoices from the last 30 days and export them to Excel ``` ## Verifying against the sandbox The skills use the [BeeL. CLI](/cli) to run real API calls when verifying a flow — sandbox by default, production only with an explicit `--live`: ```bash npx @beel_es/cli invoices create --data @invoice.json npx @beel_es/cli invoices get ``` With a `beel_sk_test_` key in `BEEL_API_KEY`, Claude can create test invoices, trigger webhook events, and confirm your integration works end to end — without writing throwaway scripts. ## Machine-readable docs Claude fetches these URLs directly during a session to get the latest spec or docs: | URL | Contents | |-----|----------| | [`/llms.txt`](https://docs.beel.es/llms.txt) | Index of all documentation pages | | [`/llms-full.txt`](https://docs.beel.es/llms-full.txt) | All docs in a single file | | [`/api/openapi`](https://docs.beel.es/api/openapi) | Full OpenAPI spec (YAML) | ## Related - [CLI](/cli) — the command line the skills use to verify a flow against the sandbox - [AI agents](/ai-agents) — the rules block for `AGENTS.md` / `CLAUDE.md` and the other entry points for agents - [Rules](/rules#use-the-rules-in-your-tools) — the catalogue the `rules` skill cites, and the other ways to use it - [Idempotency](/guides/idempotency) — why every write that creates something carries a key --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # CLI Agent-first command-line interface for the BeeL. API — run any endpoint from the terminal, sandbox by default. The BeeL. CLI lets you operate the API from the terminal: create and issue invoices, manage customers and products, validate NIFs, export data — without writing code. It is **agent-first** by design: compact JSON output for data commands, semantic exit codes, and sandbox by default, so both humans and AI assistants can use it safely. Commands are derived from the API spec **bundled with the installed CLI version**, so each release exposes the API surface as of that version — new endpoints become new commands when you update the CLI. For an endpoint the installed version doesn't know yet, use the [generic escape hatch](#generic-escape-hatch). ## Installation ```bash npm install -g @beel_es/cli beel --help ``` ```bash npx @beel_es/cli --help ``` Handy for CI pipelines and AI agents — always runs the latest published version. Requires **Node.js 20 or higher**. The commands on this page are those of version **0.3.0**; check yours with `beel --version`. Coming from 0.2.x? See [Upgrading from 0.2.x](#upgrading-from-02x). ## Authentication Two ways to sign in — **OAuth** (a browser sign-in, best for people) or an **API key** (best for CI and autonomous agents). ```bash beel login # opens the browser; sign in on the BeeL. consent screen (sandbox) beel login --live # same, for production ``` Pick the account, scopes and environment on the consent screen — no keys to copy around. Tokens are stored (and auto-refreshed) in `~/.config/beel/config.json` (chmod 600) and are never printed. Revoke anytime with `beel logout` (`--live` for production). ```bash # Option A: env var (recommended for CI/agents) export BEEL_API_KEY=beel_sk_test_... # Option B: store a key in the config file (chmod 600) beel login --api-key beel_sk_test_... beel login --api-key beel_sk_live_... # both can coexist ``` Get your keys at [**Settings > API Keys**](https://app.beel.es/ajustes/api-keys) — each environment has its own, separate key, filed by prefix (`beel_sk_test_*` → sandbox, `beel_sk_live_*` → production). When more than one credential is present, precedence is **`BEEL_API_KEY` → OAuth session (refreshed if expired) → stored API key**. **Sandbox is the default.** Every command uses the test environment unless you pass `--live`. A live key in `BEEL_API_KEY` without `--live` is an error, not a silent upgrade — production access is always explicit. ```bash beel config # shows config path, base URL and the active session / keys (masked) beel logout # remove stored credentials for the environment (--live for production) ``` ## Common recipes Commands follow the `beel ` pattern, for example `beel invoices list` or `beel customers create`. A command acts on one company (NIF), which the CLI works out for you, so you don't pass its ID each time (see [Which company a command acts on](#which-company-a-command-acts-on)). These are everyday examples; the full, always-up-to-date list comes from `beel commands` (see below). ```bash # Invoices beel invoices list --status PAID --limit 5 # filter + paginate beel invoices get beel invoices create --data @invoice.json # create a draft beel invoices issue --wait-for-pdf # emit + wait for the PDF beel invoices set-status --status PAID --payment-date 2026-09-01 beel invoices create-corrective --data @rectificativa.json beel invoices get-pdf # returns the PDF download URL beel invoices create-export --format SUMMARY --output invoices.xlsx # Customers & products beel customers list --search "ACME" beel customers create --data @customer.json beel customers patch --data '{"email":null}' # PATCH: fields you leave out don't change beel products list --q "consultoría" beel products delete # Series, VeriFactu & NIF beel series list beel series set-default beel verifactu-configuration get # VeriFactu status of the NIF beel nif validate --nif B12345678 # checks the AEAT census # Payment connections: events are addressed by the connection's ID beel payment-connections list # each connection's id beel payment-connections list-events --needs-action beel payment-connections retry-event # Account level beel webhooks list beel me get # who the credential belongs to # Another company of the same account beel --company invoices list ``` ### Which company a command acts on Most commands work on a company (NIF): `beel invoices list` calls `GET /v1/companies/{company_id}/invoices`. The CLI fills in `{company_id}` in this order: 1. The `--company ` flag. 2. The `BEEL_COMPANY_ID` environment variable. 3. Your account's only company. The CLI reads your account from `GET /v1/me/identity`, then lists its companies. If your account has **more than one company**, the CLI does not pick one. It exits with code `2` and lists the candidates (ID, NIF and name) so you can choose. `beel companies list` shows them too. Step 3 costs one or two extra requests per command, and your API key or OAuth session needs the `companies:list` scope. Without that scope those requests answer `403` (exit code `3`). In scripts, CI and agents, set `BEEL_COMPANY_ID` and skip the lookup: ```bash export BEEL_COMPANY_ID= beel invoices list ``` Account-level commands (`webhooks`, `members`, `invitations`, `request-logs`, `companies list`…) work the same way with `--account ` and `BEEL_ACCOUNT_ID`. By default they use the account your credential belongs to, and finding it needs no scope. ## Discovering commands The CLI is **agent-first**: every command is derived from the API spec, so an assistant can discover the whole surface in one call instead of scraping help text. ```bash beel commands # full command index as JSON — { command, signature, description, method, path } beel commands --markdown # the same grouped by resource as markdown tables ``` `beel commands` reflects the spec bundled with the installed CLI version — not the live API — so update the CLI to pick up newly added endpoints (or use the [escape hatch](#generic-escape-hatch) meanwhile). There's no hand-maintained list to fall out of date. For details of a single command — flags, enums, defaults and body fields, all from the spec — use `--help` at any level: ```bash beel --help beel invoices --help beel invoices create --help ``` For commands with a request body, `--help` also lists the **top-level body fields** (name, type, whether they're required, and any enums), so you know what to send without leaving the terminal: ```text $ beel invoices create --help ... Options: --type Invoice type to create. (body field, required) --notes (body field) --series-id Invoicing series ID (if not specified, uses default) (body field) ... --data JSON body (required): inline, @file.json, or - for stdin; field flags override its keys Body fields, * = required. Fields with a --flag above can be passed that way; the rest go in --data: * lines object[] * recipient object Invoice recipient. … * type string (STANDARD|CORRECTIVE|SIMPLIFIED|PROFORMA) Invoice type to create. … notes string … Full schema (nested fields, formats): beel docs search invoices ``` ## Arguments, flags and `--data` - **IDs in the path are positional arguments**, in the order of the path: `beel invoices get `, `beel members set-grant `. The company and the account are not among them: they come from `--company` and `--account` (see [above](#which-company-a-command-acts-on)). - **Query parameters are flags** named after the API parameter: `--status`, `--sort-by`, `--needs-action`. - **Top-level body fields that are a string, number or boolean have their own flag**, named after the API field: `--status PAID`, `--default-price 12.5`, `--active false`. Enum values are checked before the request is sent: a value outside the list exits with code `2` and names the allowed ones. - **`--data` takes the whole body** as inline JSON, `@file.json`, or `-` for stdin. Objects, arrays and `null` only go this way. When you pass both, the flags override the keys of `--data`: `--data @base.json --status PAID`. - A command whose body is required needs `--data` or at least one field flag. - Binary responses (PDF, ZIP, Excel) require `--output `. - `POST` requests get an automatic `Idempotency-Key`. ## Searching the docs The CLI can search this documentation locally — useful for AI agents that want the relevant section without fetching whole pages. It downloads the machine-readable docs once (cached 15 minutes) and filters on your machine; search terms never leave your computer. No API key needed. ```bash beel docs list # all documentation pages (JSON) beel docs search idempotency key # prints only the matching sections beel docs get glossary # prints a full page as markdown ``` ## Generic escape hatch Any endpoint, even ones this CLI version doesn't know yet: ```bash beel request GET /v1/companies/{company_id}/invoices --query status=PAID --query limit=5 beel request POST /v1/companies/{company_id}/customers --data @customer.json ``` `{company_id}` and `{account_id}` in the path are filled in the same way as for regular commands. `beel request` also reaches the deprecated routes until they retire on 9 December 2026. ## Output contract Built for scripting and AI agents: - **stdout**: for API/data commands, the response JSON, compact on one line — pipe straight into `jq`. Add `--pretty` to indent it. Two helpers print human-readable markdown instead: `docs` (`list`/`search`/`get`) and `commands --markdown` (plain `commands` is JSON). - **stderr**: errors as one JSON object on one line: `{"error": {"code", "message", "status", "details", "request_id"}}` | Exit code | Meaning | |-----------|---------| | `0` | Success | | `1` | Unexpected error | | `2` | Usage or config error | | `3` | Auth (401/403) | | `4` | Not found | | `5` | Validation (400/409/422) | | `6` | Rate limit (429) | | `7` | Server error (5xx) | `BEEL_COMPANY_ID` and `BEEL_ACCOUNT_ID` choose the company and account (see [above](#which-company-a-command-acts-on)); `BEEL_BASE_URL` overrides the API host; `BEEL_CONFIG_DIR` overrides the config location. ## Upgrading from 0.2.x 0.3.0 builds its commands only from the routes that name the company or the account. The flat routes that 0.2.x called are deprecated and **retire on 9 December 2026**. Scripts written for 0.2.x need new command names: - **Company commands move to their resource.** `beel companies list-invoices ` is now `beel invoices list --company `, or just `beel invoices list` if the CLI can work out the company. - **Action names drop what the resource already says.** `companies get-by-id` is `companies get`, `webhooks list-subscriptions` is `webhooks list`, `emails get-delivery` is `emails get`, `me get-my-identity` is `me get`, and `invoices convert-proforma-to-invoice` is `invoices convert-proforma`. Actions that replace a value with `PUT` are called `set`: `owner set`, `members set-grant`. - **Status changes use one command.** `invoices mark-paid`, `mark-sent` and `revert-to-issued` become `invoices set-status --status PAID` (or `SENT`, `ISSUED`). `recurring-invoices pause` and `resume` become `recurring-invoices set-status`. - **`update` becomes `patch`** on invoices, customers, products, recurring invoices and series. Fields you leave out keep their value; to clear a field that can be cleared, send it as `null` (each command's `--help` says which). - **Payment events take a connection ID** instead of the provider name: `beel payment-connections list-events `. - **Output is compact JSON.** 0.2.x indented it; pass `--pretty` for the old layout. Body fields can now also be passed as flags (see [Arguments, flags and `--data`](#arguments-flags-and---data)). If you type a 0.2.x name, the CLI exits with code `2` and its error message gives the new name: ```text unknown command 'list-invoices'. 'companies list-invoices' was renamed in 0.3.0: use 'beel invoices list --company '. All renamed commands: https://docs.beel.es/cli#upgrading-from-02x ``` Commands whose name, arguments and body didn't change are not listed. | 0.2.x | 0.3.0 | Notes | | --- | --- | --- | | `accounts cancel-representation ` | `representation cancel --company ` | | | `accounts change-managed-access-level ` | `access-level change --account ` | | | `accounts create-claim-token ` | `claim-tokens create --account ` | | | `accounts create-company ` | `companies create --account ` | | | `accounts create-invitation ` | `invitations create --account ` | | | `accounts create-webhook-subscription ` | `webhooks create --account ` | | | `accounts delete-invitation ` | `invitations delete --account ` | | | `accounts delete-member ` | `members delete --account ` | | | `accounts delete-member-grant ` | `members delete-grant --account ` | | | `accounts delete-webhook-subscription ` | `webhooks delete --account ` | | | `accounts download-representation ` | `representation download-document --company ` | | | `accounts end-management ` | `management end --account ` | | | `accounts generate-representation ` | `representation generate --company ` | | | `accounts get-email-delivery ` | `emails get --account ` | | | `accounts get-email-delivery-indicators ` | `email-indicators list --account ` | | | `accounts get-invitation ` | `invitations get --account ` | | | `accounts get-member ` | `members get --account ` | | | `accounts get-representation-status ` | `representation get --company ` | | | `accounts get-request-log ` | `request-logs get --account ` | | | `accounts get-usage ` | `usage get --account ` | | | `accounts get-webhook-subscription ` | `webhooks get --account ` | | | `accounts list-companies ` | `companies list --account ` | | | `accounts list-company-stats ` | `companies list-stats --account ` | | | `accounts list-email-deliveries ` | `emails list --account ` | | | `accounts list-invitations ` | `invitations list --account ` | | | `accounts list-member-grants ` | `members list-grants --account ` | | | `accounts list-members ` | `members list --account ` | | | `accounts list-request-logs ` | `request-logs list --account ` | | | `accounts list-webhook-deliveries ` | `webhooks list-deliveries --account ` | | | `accounts list-webhook-subscriptions ` | `webhooks list --account ` | | | `accounts patch-member ` | `members patch --account ` | | | `accounts patch-webhook-subscription ` | `webhooks patch --account ` | | | `accounts put-member-grant ` | `members set-grant --account ` | | | `accounts put-owner ` | `owner set --account ` | | | `accounts retry-webhook-delivery ` | `webhooks retry-delivery --account ` | | | `accounts rotate-webhook-secret ` | `webhooks rotate-secret --account ` | | | `accounts submit-representation ` | `representation submit --company ` | | | `accounts test-webhook-subscription ` | `webhooks test --account ` | | | `companies activate-by-id ` | `activations activate --company ` | | | `companies cancel-representation ` | `representation cancel --company ` | | | `companies convert-proforma-to-invoice ` | `invoices convert-proforma --company ` | | | `companies create-corrective-invoice ` | `invoices create-corrective --company ` | | | `companies create-customer ` | `customers create --company ` | | | `companies create-customer-import ` | `customers create-import --company ` | | | `companies create-customers-bulk ` | `customers create-bulk --company ` | | | `companies create-invoice ` | `invoices create --company ` | | | `companies create-invoice-batch ` | `invoices create-batch --company ` | | | `companies create-invoice-delivery ` | `invoices create-delivery --company ` | | | `companies create-invoice-derivation ` | `invoices create-derivation --company ` | | | `companies create-invoice-export ` | `invoices create-export --company ` | | | `companies create-invoice-pdf-archive ` | `invoices create-pdf-archive --company ` | | | `companies create-product ` | `products create --company ` | | | `companies create-products-bulk ` | `products create-bulk --company ` | | | `companies create-recurring-invoice ` | `recurring-invoices create --company ` | | | `companies create-recurring-invoice-derivation ` | `recurring-invoices create-derivation --company ` | | | `companies create-series ` | `series create --company ` | | | `companies deactivate-by-id ` | `activations deactivate --company ` | | | `companies delete-by-id ` | `companies delete ` | | | `companies delete-customer ` | `customers delete --company ` | | | `companies delete-customers-bulk ` | `customers delete-bulk --company ` | | | `companies delete-invoice ` | `invoices delete --company ` | | | `companies delete-invoice-schedule ` | `invoices delete-schedule --company ` | | | `companies delete-logo-by-id ` | `logo delete --company ` | | | `companies delete-product ` | `products delete --company ` | | | `companies delete-products-bulk ` | `products delete-bulk --company ` | | | `companies delete-recurring-invoice ` | `recurring-invoices delete --company ` | | | `companies delete-series ` | `series delete --company ` | | | `companies disconnect-payment-connection ` | `payment-connections disconnect --company ` | arguments change: `` → `` | | `companies download-representation-document ` | `representation download-document --company ` | | | `companies ensure-default-series ` | `series ensure-default --company ` | | | `companies generate-payment-event-draft ` | `payment-connections generate-event-draft --company ` | arguments change: ` ` → ` ` | | `companies generate-recurring-invoice-now ` | `recurring-invoices generate-now --company ` | | | `companies generate-representation ` | `representation generate --company ` | | | `companies get-by-id ` | `companies get ` | | | `companies get-customer ` | `customers get --company ` | | | `companies get-default-series ` | `series get-default --company ` | | | `companies get-fiscal-summary ` | `fiscal-summary get --company ` | | | `companies get-invoice ` | `invoices get --company ` | | | `companies get-invoice-customization ` | `invoice-customization get --company ` | | | `companies get-invoice-pdf ` | `invoices get-pdf --company ` | | | `companies get-invoice-preview ` | `invoices get-preview --company ` | | | `companies get-invoice-schedule ` | `invoices get-schedule --company ` | | | `companies get-issuing-readiness ` | `issuing-readiness get --company ` | | | `companies get-payment-event ` | `payment-connections get-event --company ` | arguments change: ` ` → ` ` | | `companies get-product ` | `products get --company ` | | | `companies get-recurring-invoice ` | `recurring-invoices get --company ` | | | `companies get-recurring-invoice-history ` | `recurring-invoices get-history --company ` | | | `companies get-recurring-invoice-next-occurrence ` | `recurring-invoices get-next-occurrence --company ` | | | `companies get-representation ` | `representation get --company ` | | | `companies get-series ` | `series get --company ` | | | `companies get-tax-configuration ` | `tax-configuration get --company ` | | | `companies get-veri-factu-configuration ` | `verifactu-configuration get --company ` | | | `companies initiate-payment-connection ` | `payment-connections initiate --company ` | | | `companies issue-invoice ` | `invoices issue --company ` | | | `companies list-customers ` | `customers list --company ` | | | `companies list-invoices ` | `invoices list --company ` | | | `companies list-payment-connections ` | `payment-connections list --company ` | | | `companies list-payment-events ` | `payment-connections list-events --company ` | arguments change: `` → `` | | `companies list-products ` | `products list --company ` | | | `companies list-recurring-invoices ` | `recurring-invoices list --company ` | | | `companies list-series ` | `series list --company ` | | | `companies patch-by-id ` | `companies patch ` | | | `companies patch-customer ` | `customers patch --company ` | | | `companies patch-invoice ` | `invoices patch --company ` | | | `companies patch-product ` | `products patch --company ` | | | `companies patch-recurring-invoice ` | `recurring-invoices patch --company ` | | | `companies patch-series ` | `series patch --company ` | | | `companies preview-customer-import ` | `customers preview-import --company ` | | | `companies preview-invoice-pdf ` | `invoices preview-pdf --company ` | | | `companies retry-payment-event ` | `payment-connections retry-event --company ` | arguments change: ` ` → ` ` | | `companies send-invoice ` | `invoices send --company ` | | | `companies set-default-series ` | `series set-default --company ` | | | `companies set-invoice-schedule ` | `invoices set-schedule --company ` | | | `companies set-invoice-status ` | `invoices set-status --company ` | | | `companies set-recurring-invoice-status ` | `recurring-invoices set-status --company ` | | | `companies skip-recurring-invoice ` | `recurring-invoices skip --company ` | | | `companies submit-representation ` | `representation submit --company ` | | | `companies update-invoice-customization ` | `invoice-customization update --company ` | | | `companies update-tax-configuration ` | `tax-configuration update --company ` | | | `companies update-veri-factu-configuration ` | `verifactu-configuration update --company ` | | | `companies upload-logo-by-id ` | `logo upload --company ` | | | `companies void-invoice ` | `invoices void --company ` | now requires a body (`--data` or field flags) | | `configuration create-default-series` | `series ensure-default` | `POST` → `PUT` | | `configuration create-series` | `series create` | | | `configuration delete-series ` | `series delete ` | | | `configuration get-default-series-status` | `series get-default` | | | `configuration get-invoice-customization-options` | `invoice-customization-options list` | | | `configuration get-tax` | `tax-configuration get` | | | `configuration get-tax-types` | `tax-types list` | | | `configuration get-veri-factu` | `verifactu-configuration get` | | | `configuration list-series` | `series list` | | | `configuration patch-series ` | `series patch ` | | | `configuration set-default-series ` | `series set-default ` | `POST` → `PUT` | | `configuration update-language` | `me update` | `PUT` → `PATCH` | | `configuration update-series ` | `series patch ` | `PUT` → `PATCH` | | `configuration update-tax` | `tax-configuration update` | | | `configuration update-veri-factu` | `verifactu-configuration update` | | | `customers deactivate-bulk` | `customers delete-bulk` | | | `customers download-template-csv` | `templates download-customer-import` | `POST` → `GET` | | `customers import-csv-preview` | `customers preview-import` | | | `customers import-holded-contacts` | `customers create-import` | | | `customers update ` | `customers patch ` | `PUT` → `PATCH`; PATCH leaves absent fields untouched instead of clearing them — send every field | | `developers get-request-log ` | `request-logs get ` | | | `developers list-request-logs` | `request-logs list` | | | `emails get-delivery ` | `emails get ` | | | `emails get-delivery-indicators` | `email-indicators list` | | | `emails list-deliveries` | `emails list` | | | `invoices change-status-bulk` | `invoices create-batch` | | | `invoices convert-proforma-to ` | `invoices convert-proforma ` | | | `invoices create-recurring-from ` | `recurring-invoices create-derivation` | arguments change: `` → (none) | | `invoices download-pdf-bulk` | `invoices create-pdf-archive` | | | `invoices duplicate ` | `invoices create-derivation` | arguments change: `` → (none); now requires a body (`--data` or field flags) | | `invoices export-excel` | `invoices create-export` | | | `invoices generate-pdf ` | `invoices get-pdf ` | | | `invoices issue-bulk` | `invoices create-batch` | | | `invoices mark-paid ` | `invoices set-status ` | `POST` → `PUT`; now requires a body (`--data` or field flags) | | `invoices mark-sent ` | `invoices set-status ` | `POST` → `PUT`; now requires a body (`--data` or field flags) | | `invoices preview-draft-pdf ` | `invoices preview-pdf ` | | | `invoices reschedule ` | `invoices set-schedule ` | `PATCH` → `PUT` | | `invoices revert-to-issued ` | `invoices set-status ` | `POST` → `PUT`; now requires a body (`--data` or field flags) | | `invoices schedule ` | `invoices set-schedule ` | `POST` → `PUT` | | `invoices send-bulk-email` | `invoices create-delivery` | | | `invoices send-email ` | `invoices send ` | | | `invoices unschedule ` | `invoices delete-schedule ` | `POST` → `DELETE` | | `invoices update ` | `invoices patch ` | `PUT` → `PATCH` | | `me get-my-identity` | `me get` | | | `products search` | `products list` | | | `products update ` | `products patch ` | `PUT` → `PATCH`; PATCH leaves absent fields untouched instead of resetting them to the creation defaults — send every field | | `recurring-invoices pause ` | `recurring-invoices set-status ` | `POST` → `PUT`; now requires a body (`--data` or field flags) | | `recurring-invoices preview ` | `recurring-invoices get-next-occurrence ` | | | `recurring-invoices resume ` | `recurring-invoices set-status ` | `POST` → `PUT`; now requires a body (`--data` or field flags) | | `recurring-invoices skip-next-generation ` | `recurring-invoices skip ` | | | `recurring-invoices update ` | `recurring-invoices patch ` | `PUT` → `PATCH`; PATCH leaves absent fields untouched instead of clearing them — send every field | | `webhooks create-subscription` | `webhooks create` | | | `webhooks delete-subscription ` | `webhooks delete ` | | | `webhooks get-subscription ` | `webhooks get ` | | | `webhooks list-subscriptions` | `webhooks list` | | | `webhooks test-subscription ` | `webhooks test ` | | | `webhooks update-subscription ` | `webhooks patch ` | | ## Related - [Claude Code](/claude-code) — the plugin whose skills run the CLI to verify a flow - [Authentication](/auth) — the API key the CLI reads from `BEEL_API_KEY` - [MCP server](/mcp) — the same operations for an assistant, without a terminal --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # FAQ The questions integrators ask most — compliance, architecture, VeriFactu, webhooks, integration, sandbox and pricing — each answered in a few lines and linked to the section that explains it in full. ## Compliance ### If I integrate the API, who is the billing system (SIF) and who is its producer? *Si integro la API, ¿quién es el SIF y quién es su productor?* BeeL.'s declaración responsable states that BeeL. is the billing system (SIF) and that Honey Solutions, S.L. is its producer. Numbering, record, chained hash, QR and submission to AEAT all happen inside BeeL. Full answer: [/verifactu/compliance-and-responsibilities#who-is-who](/verifactu/compliance-and-responsibilities#who-is-who) ### Who issues and signs the declaración responsable, and where can I get a copy? *¿Quién emite y firma la declaración responsable del SIF?* Honey Solutions, S.L., as producer of BeeL., signs the declaración responsable provided for in article 13 of the RD 1007/2023. It is public, with every version, at beel.es/declaraciones-responsables. Full answer: [/verifactu/compliance-and-responsibilities#declaracion-responsable](/verifactu/compliance-and-responsibilities#declaracion-responsable) ### Does software built on the API need its own declaración responsable? *¿El software que integra la API necesita su propia declaración responsable?* It depends on what the software does, and BeeL. cannot settle it for you. Under AEAT's published criteria, a component that prints invoices or generates the QR may need its own declaración responsable; check your architecture with your tax advisor. Full answer: [/verifactu/compliance-and-responsibilities#software-built-on-the-api](/verifactu/compliance-and-responsibilities#software-built-on-the-api) ### Does the business that issues the invoices sign a declaración responsable? *¿La empresa emisora firma la declaración responsable de BeeL.?* BeeL.'s declaración responsable is signed by its producer, Honey Solutions, S.L., not by the businesses that issue invoices through it. The obligations of whoever issues an invoice, under the RD 1619/2012 and article 29.2.j of the Ley General Tributaria, remain the issuer's. Full answer: [/verifactu/compliance-and-responsibilities#the-issuing-business](/verifactu/compliance-and-responsibilities#the-issuing-business) ### Is BeeL. certified or homologated by AEAT? *¿BeeL. está certificado u homologado por la AEAT?* No. AEAT does not certify, homologate or approve billing software, and requires no prior registration: under article 13 of the RD 1007/2023 the producer certifies its own system through a declaración responsable, which for BeeL. is signed by Honey Solutions, S.L. Full answer: [/verifactu/compliance-and-responsibilities#declaracion-responsable](/verifactu/compliance-and-responsibilities#declaracion-responsable) ### Does BeeL. work in VERI*FACTU mode or as a "no VERI*FACTU" system? *¿Modalidad VERI*FACTU o sistema no VERI*FACTU?* BeeL. submits records only in the VERI*FACTU modality, when each invoice is issued, and does not offer the "no VERI*FACTU" modality. Invoices a NIF issues while VeriFactu is not enabled for it generate no record and are not submitted. Full answer: [/verifactu/compliance-and-responsibilities#verifactu-modality-only](/verifactu/compliance-and-responsibilities#verifactu-modality-only) ### Do I or my customers need a digital certificate? *¿Hay que aportar o custodiar un certificado digital?* No certificate is handed to BeeL. or kept for the submissions: BeeL. submits on the taxpayer's behalf under a signed representation. The NIF's holder signs that representation PDF electronically, once, with their own certificate. Full answer: [/verifactu/compliance-and-responsibilities#representation-not-a-certificate](/verifactu/compliance-and-responsibilities#representation-not-a-certificate) ### What does BeeL. keep for each invoice, and how do I read it? *¿Qué registros conserva BeeL. de cada factura?* Each invoice keeps its billing record, its hash and AEAT's answer. Read them in the invoice's `verifactu` block and in the list of its VeriFactu records. Full answer: [/verifactu/compliance-and-responsibilities#what-beel-keeps-for-each-invoice](/verifactu/compliance-and-responsibilities#what-beel-keeps-for-each-invoice) ## Architecture and issuing ### Who generates the billing record, its hash and the chain? *¿Quién genera el registro de alta, la huella y el encadenamiento?* BeeL., for every invoice it issues: it builds the record, computes its SHA-256 hash, chains it to the previous record of the same issuing NIF and submits it. You never compute or store a chain. Full answer: [/guides/erp-integration#who-generates-the-record-the-hash-and-the-chain](/guides/erp-integration#who-generates-the-record-the-hash-and-the-chain) ### Can my POS generate the hash and the chain, and BeeL. only sign and submit? *¿Puede mi TPV generar la huella y el encadenamiento en local?* No. No request accepts a hash, a previous record or a chain position: BeeL. only registers invoices it numbers and hashes itself. Full answer: [/guides/erp-integration#who-generates-the-record-the-hash-and-the-chain](/guides/erp-integration#who-generates-the-record-the-hash-and-the-chain) ### If the API is unreachable for a couple of hours, can my POS keep issuing? *¿Qué pasa si vuestra API no responde? ¿Hay remisión diferida?* Not invoices: the number is assigned by BeeL. when you issue, and there is no offline mode. Queue the sale, issue it once the API answers with an `Idempotency-Key`, and send the day of the sale as `operation_date`. Full answer: [/guides/erp-integration#beels-api-does-not-answer](/guides/erp-integration#beels-api-does-not-answer) ### What happens to my invoices when AEAT is down? *¿Qué pasa si la AEAT no está disponible?* You keep issuing. BeeL. retries the submission on its own and, if it goes out on a later day than the invoice's issue date, flags it as a late submission. Full answer: [/guides/erp-integration#aeat-does-not-answer](/guides/erp-integration#aeat-does-not-answer) ### Can invoices carry my customer's identity, with BeeL. invisible to them and to their customers? *¿Marca blanca, sin que aparezca BeeL. ante la clínica ni el paciente?* BeeL.'s own PDF and invoice email carry a BeeL. footer unless the account has the branding removal add-on, and the email can go out from your own domain with a custom sending domain; both are Enterprise add-ons. Rendering the invoice document yourself is possible with the data the API returns, but under AEAT's published criteria software that prints invoices or generates the QR may need its own declaración responsable: check that with your tax advisor first. Full answer: [/guides/branding-and-pdf#white-label-invoices-without-beel-in-sight](/guides/branding-and-pdf#white-label-invoices-without-beel-in-sight) ### Does the API give me the QR or its URL, to print it on my own PDF? *¿La respuesta incluye la URL de cotejo para generar el QR?* Yes: `verifactu.qr_url` is the AEAT validation link and `verifactu.qr_base64` the PNG, both from `PENDING`, a few seconds after issuing. Printing them on a document your software renders is an architecture to check with your tax advisor first. Full answer: [/verifactu/qr-and-pdf#rendering-your-own-pdf](/verifactu/qr-and-pdf#rendering-your-own-pdf) ### Can one integration issue for many businesses, each with its own NIF, series and numbering? *¿Multi-NIF: varios emisores bajo una misma integración?* Yes. Each business is a company with its own series, numbering and chain. With managed accounts you provision and pay for them, and operate them from your backend. Full answer: [/multi-nif/managed-accounts#marketplaces-one-managed-account-per-partner](/multi-nif/managed-accounts#marketplaces-one-managed-account-per-partner) ### Does it work with Stripe Connect Express? *¿Es compatible con Stripe Connect Express?* Not partner by partner: BeeL.'s Stripe integration connects accounts that authorise BeeL. directly, one per NIF. With Express, issue from your backend through the API on each partner's `company_id`. Full answer: [/stripe/edge-cases-and-limits#what-about-stripe-connect-express-vs-standard](/stripe/edge-cases-and-limits#what-about-stripe-connect-express-vs-standard) ## VeriFactu ### Does the API generate cancellation records and corrective invoices (R1–R5)? *¿Genera registros de anulación y rectificativas R1 a R5?* Yes. Voiding an invoice sends a cancellation record of its own, and each corrective, R1 to R5, gets its own registration; R5 is the one for simplified invoices. Full answer: [/verifactu/cancel-and-fix#the-30-second-decision](/verifactu/cancel-and-fix#the-30-second-decision) ### How do I tell a cancellation requested from a cancellation accepted by AEAT? *¿Cómo distingo anulación pedida de anulación aceptada por la AEAT?* List the invoice's VeriFactu records: the `VOID` record has its own `submission_status`, `PENDING` until AEAT answers and `VOIDED` once it accepts. If you voided while the registration was still `PENDING`, the cancellation goes out after the registration is accepted. Full answer: [/verifactu/cancel-and-fix#did-aeat-accept-the-cancellation](/verifactu/cancel-and-fix#did-aeat-accept-the-cancellation) ### Can an ACCEPTED invoice be rejected by AEAT later? *Rechazo tardío: ¿una factura aceptada puede pasar a rechazada?* No. BeeL. stops asking AEAT once a record is `ACCEPTED`, and nothing moves it to `REJECTED` afterwards, so no later webhook reports a rejection. Only a void you send changes it, to `VOIDED`. Full answer: [/verifactu/submission-states#is-accepted-final](/verifactu/submission-states#is-accepted-final) ### Can a REJECTED invoice change later? *¿Una factura rechazada puede cambiar de estado?* No. A temporary AEAT server error keeps the invoice `PENDING` while BeeL. retries it, so a `REJECTED` invoice does not move on its own: read its `error_code` and fix it. Full answer: [/verifactu/handling-rejections#a-temporary-aeat-error-stays-pending](/verifactu/handling-rejections#a-temporary-aeat-error-stays-pending) ### Can a NIF issue outside VeriFactu? *¿Un NIF puede quedar fuera de VeriFactu (enabled=false)?* In production, until its VeriFactu is enabled or if you turn it off: its invoices are then issued with `verifactu.enabled: false` and not submitted. In sandbox VeriFactu is always on. Full answer: [/verifactu/auto-submit#what-decides-it](/verifactu/auto-submit#what-decides-it) ### What does each new issuer have to sign, and can onboarding be done entirely by API? *¿Qué firma cada clínica para que remitáis en su nombre? ¿Se hace por API?* Only the VeriFactu representation, signed electronically by the NIF's holder, once. Creating the NIF, switching it on, generating and uploading the representation and enabling VeriFactu are all API calls. Full answer: [/multi-nif/companies#signing-the-verifactu-representation](/multi-nif/companies#signing-the-verifactu-representation) ## Webhooks ### How often, and for how long, are failed webhooks retried? *¿Cuál es la política de reintentos de los webhooks?* 7 attempts in total, the first included, on a fixed schedule that spreads them over about 3 days; in sandbox only the first 3 attempts, over a few minutes. An outage of your endpoint longer than that exhausts them. Full answer: [/webhooks/retries#how-long-the-retries-last](/webhooks/retries#how-long-the-retries-last) ### My endpoint was down: how do I recover the events I missed, and until when can I? *¿Cómo recupero los webhooks perdidos tras una caída?* BeeL. keeps retrying on its own for about 3 days. For a longer outage, retry the failed deliveries from the delivery log, or re-read the resources that changed. A manual retry has no age limit while the subscription exists. Full answer: [/webhooks/retries#how-long-the-retries-last](/webhooks/retries#how-long-the-retries-last) ### Is each automatic webhook retry signed with a fresh timestamp? *¿Los reintentos automáticos llevan una firma nueva?* Yes. Every attempt, automatic or manual, carries a new `t` and a new `v1`, so the replay window never rejects a legitimate retry. Full answer: [/webhooks/signatures#every-attempt-is-signed-afresh](/webhooks/signatures#every-attempt-is-signed-afresh) ### Is every VeriFactu status change delivered as a webhook? *¿Se notifica por webhook cada cambio de estado de VeriFactu?* Every change of the public status is: `verifactu.status.updated` also covers a submission refused before it reached AEAT and one BeeL. stopped waiting for. A temporary AEAT error keeps the invoice `PENDING` and sends nothing. Reconcile periodically anyway, in case your endpoint misses deliveries. Full answer: [/verifactu/handling-rejections#reconcile-do-not-only-listen](/verifactu/handling-rejections#reconcile-do-not-only-listen) ## Integration ### What are the API rate limits, and what happens when I exceed them? *¿Cuál es el límite de peticiones de la API?* 300 requests a minute per API key on most endpoints. Going over returns `429` `RATE_LIMIT_EXCEEDED` with a `Retry-After` header. Full answer: [/guides/rate-limits](/guides/rate-limits) ### How should I pace a job that polls invoice states? *¿Cada cuánto consultar estados sin superar el límite?* List with filters instead of reading invoices one by one, sweep only the states that can still change, and stay well under your per-key budget. Webhooks are the fast path; the job is the safety net. Full answer: [/guides/rate-limits#pacing-a-polling-or-reconciliation-job](/guides/rate-limits#pacing-a-polling-or-reconciliation-job) ### If my system retries a request, can it issue a duplicate invoice? *¿Un reintento puede duplicar una factura?* Not if you send an `Idempotency-Key`: for 24 hours the same key returns the original response instead of issuing again. Full answer: [/guides/idempotency](/guides/idempotency) ### Is there a status page? *¿Hay una página de estado del servicio?* Yes: status.beel.es reports uptime, incidents and scheduled maintenance. Full answer: [/guides/rate-limits#api-status](/guides/rate-limits#api-status) ## Sandbox and pricing ### Is there a sandbox, and does it cost anything or expire? *¿Hay sandbox? ¿Tiene coste o límite de tiempo?* Yes: a `beel_sk_test_` key on the same URL as production. It is free, needs no card and does not expire. Full answer: [/verifactu/testing-in-sandbox#access-cost-and-time-limits](/verifactu/testing-in-sandbox#access-cost-and-time-limits) ### Can I build the whole integration in sandbox before going live? *¿Se puede integrar por completo en sandbox antes de producción?* Yes: same endpoints and responses, with submissions going to AEAT's test environment. Only signing a NIF's representation and production billing need Live. Full answer: [/verifactu/testing-in-sandbox#can-i-build-the-whole-integration-in-sandbox](/verifactu/testing-in-sandbox#can-i-build-the-whole-integration-in-sandbox) ### What does the API cost for one NIF, and how many invoices does it include? *¿Precio exacto para un NIF y facturas incluidas?* 180 € a year billed annually (one charge), or 19 € a month billed monthly, excluding VAT. It includes 250 invoices in production a month; each one past that costs 0.01 €. Full answer: [/pricing#api-plan](/pricing#api-plan) ### How much for several NIFs, for example 20 to 100 issuers? *¿Precio para varios NIF o para una plataforma con muchos emisores?* Beyond one NIF the price is agreed with BeeL., per NIF. Contact sales at beel.es/ventas or hola@beel.es with the number of NIFs and the invoices per NIF. Until that price is agreed, adding a second NIF on the API plan answers `403 CONTACT_SALES_REQUIRED`. Full answer: [/pricing#custom-pricing](/pricing#custom-pricing) ### Are prices with VAT, and is there a minimum commitment? *¿El precio incluye IVA? ¿Hay permanencia?* Prices exclude VAT. There is no setup fee and no minimum commitment: plans renew automatically and can be cancelled at any time. Full answer: [/pricing#api-plan](/pricing#api-plan) ### Do sandbox invoices or drafts count towards the included invoices? *¿Cuentan las facturas de sandbox o los borradores?* No. Only invoices issued in production count; drafts, sandbox invoices and deleted invoices do not. Full answer: [/pricing#what-counts-as-an-invoice](/pricing#what-counts-as-an-invoice) > **Rules that apply here:** [REC-006 · No certificate is needed to sign records](/rules/records#rec-006) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # BeeL. API Invoicing API for businesses in Spain, with VERI*FACTU submission to AEAT. BeeL. is an invoicing platform for businesses in Spain. The API lets you programmatically manage the full invoice lifecycle — from creation to payment — with each billing record submitted to AEAT under VERI\*FACTU once it is enabled for the issuing NIF. ## First steps If you're new to BeeL, start here. Get an API key, pick an environment, make your first authenticated request. Use `Idempotency-Key` to retry safely without duplicates. Ten calls from a sandbox key to an issued, sent and paid invoice. Browse every endpoint, schema, and enum value. MCP, the Claude Code plugin, Markdown docs and an AGENTS.md block with the rules an agent must never break. Every MUST and MUST NOT of Spanish invoicing and of the API, each with an id, its source and the error that reports it. Also as data, for your AI assistant, the MCP server or a CI check. ## Highlights Each invoice's billing record generated, chained and submitted to AEAT. Invoices issued automatically from Stripe payments. Fiscal Mirror — no recalculation. R1–R5 corrective invoices with PARTIAL/TOTAL flow and worked examples. Intra-EU B2B, B2C with OSS, exports, services to non-EU — every scenario with payloads. Real-time notifications: `invoice.issued`, `verifactu.status.updated`, and more. Spanish ↔ English fiscal terms with the matching API field for each one. ## At a glance | | | |---|---| | **Base URL** | `https://app.beel.es/api` — every path starts with `/v1` | | **Auth** | `Authorization: Bearer beel_sk_*` | | **Format** | JSON (REST) | | **Environments** | Sandbox (`beel_sk_test_*`) + Production (`beel_sk_live_*`) — same URL, the key prefix routes | | **Rate limits** | 300 requests a minute per key, answered with `429` and `Retry-After` — see [Rate limits](/guides/rate-limits) | | **Sandbox** | Free, no card, no expiry — see [Testing in sandbox](/verifactu/testing-in-sandbox#access-cost-and-time-limits) | | **Compliance** | BeeL.'s producer, Honey Solutions, S.L., signs its *declaración responsable* (its statement of compliance) — see [Compliance and responsibilities](/verifactu/compliance-and-responsibilities) | | **Questions** | The ones integrators ask most, answered in a line each — see the [FAQ](/faq) | [DAT-011 · Adapted billing systems are mandatory from 1 January 2027 or 1 July 2027](/rules/dates#dat-011). BeeL. works in the VERI\*FACTU modality, submitting each record to AEAT — see [Compliance and responsibilities](/verifactu/compliance-and-responsibilities#verifactu-modality-only). **API plan required** for full API access, webhooks, and idempotency support. The **sandbox is free and unlimited**, so you can build the whole integration before you pay — see [Pricing](/pricing). ## Quickstart in 60 seconds Check that your key works. `GET /v1/me/identity` needs no scope, so any valid key answers `200` with the account it belongs to, and an invalid one answers `401`: ```bash curl https://app.beel.es/api/v1/me/identity \ -H "Authorization: Bearer $BEEL_API_KEY" ``` ```ts const response = await fetch('https://app.beel.es/api/v1/me/identity', { headers: { Authorization: `Bearer ${process.env.BEEL_API_KEY}` }, }); const { data } = await response.json(); // data.account_id, data.credential.environment ``` ```python import os, requests response = requests.get( 'https://app.beel.es/api/v1/me/identity', headers={'Authorization': f"Bearer {os.environ['BEEL_API_KEY']}"}, ) data = response.json()['data'] # data['account_id'], data['credential']['environment'] ``` ```java HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://app.beel.es/api/v1/me/identity")) .header("Authorization", "Bearer " + System.getenv("BEEL_API_KEY")) .GET() .build(); HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString()); ``` ## Your first invoice, end to end Ten calls take you from a sandbox key to an invoice that is issued, delivered, paid and announced to your backend. Every request below runs as-is against the sandbox once you replace the `{placeholders}`. The key needs the `companies:list`, `companies:read`, `series:write`, `invoices:write`, `invoices:read` and `webhooks:write` scopes — see [Scopes](/auth/scopes). ### Create a sandbox key In the dashboard, open **Settings → API Keys** and create a key for the **sandbox** environment. It starts with `beel_sk_test_`, submits only to AEAT's test environment — nothing is registered for real, see [Testing VeriFactu in sandbox](/verifactu/testing-in-sandbox) — and can only email your own address. See [API Keys](/auth/api-keys). ```bash export BEEL_API_KEY=beel_sk_test_your_key_here ``` ### Find your `company_id` Every invoice lives under a company (a NIF). Ask who the key belongs to, then list that account's companies: ```bash curl https://app.beel.es/api/v1/me/identity \ -H "Authorization: Bearer $BEEL_API_KEY" # → data.account_id curl "https://app.beel.es/api/v1/accounts/{account_id}/companies" \ -H "Authorization: Bearer $BEEL_API_KEY" # → data.companies[].id is the company_id used from here on ``` ### Check that the company can issue ```bash curl https://app.beel.es/api/v1/companies/{company_id}/issuing-readiness \ -H "Authorization: Bearer $BEEL_API_KEY" ``` `data.ready` is `true` only when `data.blockers` is empty. Each blocker says what is missing — see [Is a NIF ready to invoice?](/multi-nif#is-a-nif-ready-to-invoice). A missing default series (`SERIES_DEFAULT_NOT_FOUND`) is solved by the next step. ### Ensure the default series ```bash curl -X PUT https://app.beel.es/api/v1/companies/{company_id}/series/defaults \ -H "Authorization: Bearer $BEEL_API_KEY" ``` It leaves one default series for standard, simplified and corrective invoices, creating the missing ones and keeping the ones you already have. Repeating it changes nothing. How numbers are built is in [Series and numbering](/guides/series-and-numbering). ### Create a draft ```bash curl -X POST https://app.beel.es/api/v1/companies/{company_id}/invoices \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Idempotency-Key: order-1042-create" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "Comercial Martínez SL", "nif": "B12345674", "email": "you@yourcompany.com", "address": { "street": "Avenida de la Constitución", "number": "45", "postal_code": "41001", "city": "Sevilla", "province": "Sevilla", "country": "España" } }, "lines": [ { "description": "Web development — March", "quantity": 10, "unit": "hours", "unit_price": 50, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" }, "irpf_rate": 0 } ], "payment_info": { "method": "BANK_TRANSFER", "iban": "ES9121000418450200051332", "payment_term_days": 30 }, "external_ref": "order-1042" }' # → 201, data.id is the invoice_id, data.status is DRAFT, data.invoice_number is empty ``` Put your customer's real legal name and NIF in `recipient`: the recipient is checked again when you issue. A draft has no number yet and can still be edited or deleted. The `Idempotency-Key` makes a retry after a timeout return the same draft instead of a second one — see [Idempotency](/guides/idempotency). `irpf_rate: 0` is explicit on purpose: an omitted rate inherits the default IRPF of your tax settings (see [Amounts and rounding](/guides/amounts-and-rounding)). ### Issue it ```bash curl -X POST https://app.beel.es/api/v1/companies/{company_id}/invoices/{invoice_id}/issue \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Idempotency-Key: order-1042-issue" # → 200, data.status is ISSUED and data.invoice_number is set ``` Issuing assigns the definitive number, sets `issue_date` to today and makes the invoice immutable. From here it is corrected or voided, never edited — see [Invoice lifecycle](/guides/invoice-lifecycle). ### Download the PDF ```bash curl https://app.beel.es/api/v1/companies/{company_id}/invoices/{invoice_id}/pdf \ -H "Authorization: Bearer $BEEL_API_KEY" # → 200, data.download_url (valid for 5 minutes) and data.file_name ``` The PDF is produced right after issuing; this call waits for it (up to ten seconds) instead of making you poll. A `202` with `Retry-After` means it was still in progress: ask again. ### Send it by email ```bash curl -X POST https://app.beel.es/api/v1/companies/{company_id}/invoices/{invoice_id}/send \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Idempotency-Key: order-1042-send" \ -H "Content-Type: application/json" \ -d '{ "recipients": ["you@yourcompany.com"] }' # → 200, data.email_id, data.sent_to ``` In the sandbox the only allowed recipient is the account holder's own address; anything else answers `403` [`ENVIO_NO_PERMITIDO`](/errors/ENVIO_NO_PERMITIDO). The PDF is attached by default, which is why this step comes after the previous one. Once the email goes out, an `ISSUED` invoice moves to `SENT`. ### Mark it paid ```bash curl -X PUT https://app.beel.es/api/v1/companies/{company_id}/invoices/{invoice_id}/status \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "status": "PAID", "payment_date": "2026-09-24", "payment_method": { "method": "BANK_TRANSFER", "iban": "ES9121000418450200051332" } }' # → 200, data.status is PAID ``` A payment is all or nothing, and it cannot be undone. `payment_date` defaults to today. ### Receive the `invoice.issued` webhook Register your endpoint once — in practice **before** you issue, so the event of step 6 reaches it: ```bash curl -X POST "https://app.beel.es/api/v1/accounts/{account_id}/webhooks" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://yourapp.com/webhooks/beel", "events": ["invoice.issued", "invoice.email.sent"] }' # → 201, data.secret — store it now, it is never shown again ``` Every issue then `POST`s a signed event to that URL (envelope trimmed to the fields used here): ```json { "id": "3f7a1b2c-4d5e-6f7a-8b9c-0d1e2f3a4b5c", "type": "invoice.issued", "created_at": "2026-09-24T10:15:02Z", "company_id": "9f1c2d3e-4a5b-6c7d-8e9f-0a1b2c3d4e5f", "data": { "invoice_id": "550e8400-e29b-41d4-a716-446655440000", "invoice_number": "F-2026-0001" } } ``` Verify the `BeeL-Signature` header before trusting the body, and deduplicate on `id` — see [Signatures](/webhooks/signatures) and [Deduplication](/webhooks/deduplication). ## Need help? Write to **[it@beel.es](mailto:it@beel.es)** — we typically respond within a few hours on business days. API plan users get priority support. - **FAQ:** [/faq](/faq) — short answers, each linked to its full explanation - **Status:** [status.beel.es](https://status.beel.es) — API uptime and incidents - **Changelog:** [/changelog](/changelog) — every breaking + non-breaking change --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Pricing What the BeeL. API costs per NIF (tax ID), what each plan includes and what it doesn't, the Stripe plan's volume tiers, how billing works, and how to get a custom price for several NIFs. Start in sandbox for free, pay per NIF when you go live, and talk to us when you invoice for more than one. All prices exclude VAT. **API** — **19 €**/month per NIF. Billed monthly, or 180 € a year billed annually in one charge · Excl. VAT. For a product that issues invoices under one NIF (tax ID) through the REST API. - ✓ **250 production invoices** a month included - ✓ **0.01 €** per extra invoice after that - ✓ Full REST API, [webhooks](/webhooks) and [idempotency](/guides/idempotency) - ✓ [VeriFactu](/verifactu) submission, [PDF](/verifactu/qr-and-pdf) and [email](/guides/sending-email) - ✓ No setup fee, no minimum commitment, cancel any time [Start free in sandbox](https://app.beel.es/signup). Sandbox is free, has no time limit and needs no card. You pay when a NIF goes live. **Enterprise** — **Custom** price per NIF. Quoted for your NIFs and volume. For platforms and groups that invoice for several NIFs, or at high volume. - ✓ **More than one NIF**, priced per NIF - ✓ Every company from one API key — see [Multi-NIF](/multi-nif) - ✓ **More than 5,000 invoices a month** on the Stripe plan - ✓ A higher included-invoice allowance per NIF - ✓ Everything in the API plan [Talk to sales](https://beel.es/ventas). Or write to hola@beel.es with your number of NIFs and invoices per NIF. ## API plan One NIF, billed monthly or annually: 19 € a month, or 180 € a year in one charge. Invoices past the included ones are billed monthly on both. The plan covers the whole integration: nothing below is an add-on. **Included:** - ✓ **Full REST API** — invoices, customers, products, series and tax configuration - ✓ **VeriFactu** — every billing record submitted to AEAT ([how](/verifactu)) - ✓ **PDF with the VeriFactu QR** ([QR and PDF](/verifactu/qr-and-pdf)) - ✓ **Email delivery** of invoices to your customers ([sending email](/guides/sending-email)) - ✓ **Webhooks** and **idempotent retries** ([webhooks](/webhooks), [idempotency](/guides/idempotency)) - ✓ **Corrective invoices**, series and recurring invoices - ✓ **Sandbox** — free, no card, no time limit ([testing in sandbox](/verifactu/testing-in-sandbox)) - ✓ **Tooling** — [Node.js SDK](/sdks/node), [CLI](/cli) and [MCP server](/mcp) **Billed on top, or not included:** - \+ **Invoices past the 250 included** — 0.01 € each, billed monthly (on annual billing too) - \+ **VAT** — added to every price on this page - ✗ **More than one NIF** — custom pricing, [talk to sales](https://beel.es/ventas) - ✗ **A 100 % uptime guarantee** — our [Terms of Service](https://beel.es/terminos) (section 13, API terms of use) commit to at least 99.5 % a month The sandbox is the same API on the same URL with a test key. Build the whole integration there, and pay only when you switch a NIF on in production — see [Testing in sandbox](/verifactu/testing-in-sandbox). ## Stripe plan If you connect Stripe or invoice from the dashboard instead of integrating the API, you pay by **invoice volume** instead of per NIF. Each tier can be billed monthly or yearly; the yearly price is charged once a year. | Tier | Included invoices/month | Monthly billing | Annual billing | Extra invoices | |---|---|---|---|---| | Starter | 250 | 19.90 €/month | 190.80 €/year (15.90 €/month) | 0.08 € each | | Growth | 1,000 | 32.90 €/month | 298.80 €/year (24.90 €/month) | 0.05 € each | | Pro | 2,500 | 64.90 €/month | 598.80 €/year (49.90 €/month) | 0.04 € each | | Scale | 5,000 | 109.90 €/month | 958.80 €/year (79.90 €/month) | 0.03 € each | More than 5,000 invoices a month, at a custom price. [Talk to sales](https://beel.es/ventas). - Going over never stops invoicing: invoices past your tier are issued normally and billed at your tier's per-invoice price. - Overage is always billed monthly. On yearly billing it arrives as a separate monthly charge, apart from the yearly renewal. - You get an email when you reach 80 % and 100 % of the invoices in your tier. - Webhooks and idempotency come with the API plan: see [Webhooks](/webhooks) and [Idempotency](/guides/idempotency). ## How billing works ### What counts as an invoice **Counts towards your invoices:** - \+ **Issued in production** — standard, corrective, simplified and recurring **Never counts:** - ✓ **Drafts** — free until issued - ✓ **Sandbox invoices** — always free - ✓ **Deleted invoices** Included invoices are counted per **monthly billing period**, which starts on the day of the month your subscription started, not on the 1st. On the API plan each NIF has its own allowance: allowances are not pooled across NIFs. ### Your monthly bill 1. **The base price** — the API plan's price per NIF live in production, or your Stripe-plan tier. Both can be monthly, or yearly in one charge. 2. **Overage** — only the invoices past the included ones, at 0.01 € each on the API plan or at your tier's price on the Stripe plan. Billed monthly. 3. **VAT** — added on top of both. ### Examples | Case | That month | |---|---| | API plan, 1 NIF, 180 invoices | **19 €** that month, within the 250 included invoices | | API plan, 1 NIF, 400 invoices | 19 € + (400 − 250) × 0.01 € = 19 € + 1.50 € = **20.50 €** that month | | Stripe plan, Growth tier on monthly billing, 1,150 invoices | 32.90 € (1,000 invoices included) + 150 extra × 0.05 € = 7.50 € of overage → **40.40 €** that month | ## Limits and availability API requests are rate-limited per API key; the limits and response headers are in [Rate limits](/guides/rate-limits). Our [Terms of Service](https://beel.es/terminos) (section 13, *API terms of use*) do not guarantee 100 % availability, but commit to a minimum of 99.5 % a month. Live status, incidents and maintenance are at [status.beel.es](https://status.beel.es). ## Custom pricing More than one NIF on the API plan, more than 5,000 invoices a month on the Stripe plan, or a higher included-invoice allowance: we agree a price per NIF with you, for your volume. On the API plan the API enforces it: until a price is agreed, adding a second NIF, or switching a NIF on in Live when the account has several, answers `403` [`CONTACT_SALES_REQUIRED`](/errors/CONTACT_SALES_REQUIRED) with the sales link in `error.details.salesUrl` — see [More than one NIF on the API plan](/multi-nif/companies#more-than-one-nif-on-the-api-plan). **Need more than one NIF, or a custom volume?** [Talk to sales](https://beel.es/ventas) or write to [hola@beel.es](mailto:hola@beel.es). ## Pricing questions Short answers, each linked to the section that explains it: - [Is there a sandbox, and does it cost anything or expire?](/faq#sandbox-access-and-cost) - [Can I build the whole integration in sandbox before going live?](/faq#full-integration-in-sandbox) - [What does the API cost for one NIF, and how many invoices does it include?](/faq#price-for-one-nif) - [How much for several NIFs, for example 20 to 100 issuers?](/faq#price-for-several-nifs) - [Are prices with VAT, and is there a minimum commitment?](/faq#vat-and-commitment) - [Do sandbox invoices or drafts count towards the included invoices?](/faq#what-counts-as-an-invoice) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Overview The BeeL. developer ecosystem — REST API, SDKs, CLI, n8n node, MCP server, Claude Code plugin and machine-readable docs, all deriving from one OpenAPI contract. Every way to work with BeeL. speaks to the **same REST API** and derives from the **same OpenAPI contract**, so the surfaces use the same names, fields and rules. Each tool is built from the contract as it stood at its release: update it to pick up what the API added since. Pick the one that fits how you build. The contract everything derives from. HTTPS + JSON. Generate a typed client from the OpenAPI spec for any language. Fully-typed client with retries, idempotency and webhook verification built in. The fastest path in a JS/TS backend. `npm install @beel_es/sdk` Drive the API from the terminal and scripts — invoices, NIFs, docs search, sandbox verification. Commands derived from the OpenAPI spec. `npx @beel_es/cli` Issue invoices from automation workflows without writing requests: 75 operations in dropdowns, plus a trigger for BeeL. events. Verified by n8n. `n8n-nodes-beel` Hosted Model Context Protocol server: gives an AI agent live invoicing tools plus docs search over OAuth — no API key to paste. `claude mcp add --transport http beel https://mcp.beel.es/mcp` The `beel-api` plugin bundles integration skills — implement, webhooks, multi-NIF, audit, upgrade — and connects the hosted MCP. `/plugin install beel-api@beel` Published as `llms.txt` and `llms-full.txt`, the standard machine-readable index. Point any agent at them to ground answers in the current contract. ## Which one should I use? - **Building a backend integration** → the [Node / TypeScript SDK](/sdks/node), or generate a typed client from the [OpenAPI spec](/api/openapi) for any other language. - **Scripts, CI or quick checks** → the [CLI](/cli). - **An AI agent that acts on BeeL** → the [MCP server](/mcp) — OAuth in the browser, no API key to paste. - **Coding with Claude Code** → the [`beel-api` plugin](/claude-code): integration skills plus the MCP, in one install. - **Automating without code** → the [n8n node](/n8n), when the invoice starts from a form, a CRM or a schedule rather than a Stripe charge. These docs are also published as [`llms.txt`](/llms.txt) and [`llms-full.txt`](/llms-full.txt) — the machine-readable index. Point any agent at them to ground its answers in the current contract; the hosted MCP already does. --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Active-company header renamed The header that selects the active company is now `Beel-Active-Company`, was `X-Active-Profile`. Jun 9, 2026 · Improved The request header that selects which company a request operates on has been renamed from `X-Active-Profile` to `Beel-Active-Company`. ## What else changed - Send `Beel-Active-Company: ` to scope a request to a specific company. - The previous `X-Active-Profile` header keeps working during a deprecation grace period, so you can migrate at your own pace. - While you still send the old header, responses include a `Deprecation: true` header and a `Link: …; rel="deprecation"` pointing to this entry. Switch to `Beel-Active-Company` to clear it. ## Where to go next - [Companies](/companies/listCompanies) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Addresses can be missing, and accept more characters `issuer.address` is optional and is no longer filled with invented values, and one character set governs every address field. Sep 3, 2026 · Breaking Three changes to how addresses travel, all of them visible from outside. The one that can break you: `issuer.address` leaves `required`. It is omitted when the company has not declared its address yet. It always arrived before — but it arrived **made up**: a newly registered company got `street: "Sin especificar"`, `postal_code: "00000"`, values nobody had ever entered, passing the contract as if they were data. ## What else changed - **`issuer.address` may now be absent.** It affects `issuer` on invoice responses, previews included. If you read `issuer.address.street` directly, check that `address` exists first. If you print the issuer's address on a document, the gap is now visible instead of covered with false text — the fix is for the company to complete its fiscal address, which the issuing gate already requires, not for the API to invent one. - **`RecipientData.address` was already optional** and does not change. `Customer.address` is still required. - **`number` was already announced separately** and is unchanged here — see [The street number is no longer required in an address](/changelog/street-number-is-optional). - **One character set for every address field.** `street`, `city`, `province` and `country` each accepted a slightly different set, so the same address was valid or not depending on which field it landed in — `C/Xic de l'Anyé` was rejected as a street and accepted as a city. There is now a single set, the union of everything any field already accepted: typographic apostrophes, parentheses and `&` work everywhere. - **Nothing was renamed and no stored row was touched.** An address that exists arrives exactly as before, and one that does not name a country is still read as Spanish — that is a declared convention, not invented data. ## Endpoints - `GET /v1/companies/{company_id}/invoices/{invoice_id}` — issuer.address is omitted when the company has not declared one - `POST /v1/companies/{company_id}/customers` — every address field shares one character set ## Where to go next - [Retrieve an invoice](/invoices/getCompanyInvoice) - [Create a customer](/customers/createCompanyCustomer) - [The street number is no longer required](/changelog/street-number-is-optional) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # BeeL. API v1.0 — public launch The BeeL. API is publicly available: invoicing, customers, products, tax configuration and VeriFactu, with a 7-day trial. Mar 18, 2026 · Release The BeeL. API is now publicly available. Full REST API for invoicing, customer management, products, tax configuration, and VeriFactu compliance — all with a 7-day free trial. ## What else changed - Complete invoice lifecycle: create, issue, send, pay, void, and correct - Customer and product catalog management with bulk operations - VeriFactu compliance with automatic AEAT submission - Webhook notifications for invoice and VeriFactu events - Idempotency support for safe retries on all creation endpoints - Sandbox environment with unlimited invoices for testing - OpenAPI 3.0 specification for client generation in any language ## Where to go next - [Get Started](/auth) - [API Pricing](/pricing) - [OpenAPI Spec](/api/openapi) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # More than one NIF on the API plan: a 403 that routes to sales On the API plan with no agreed price, a second NIF, or going Live with several, answers `403 CONTACT_SALES_REQUIRED` with a link to sales. Sep 30, 2026 · Breaking The API plan covers one NIF self-service; more than one is priced per NIF with sales. Until that price is agreed, the API says so with a new code, `403 CONTACT_SALES_REQUIRED`. Its `error.details` carries `reason` — which rule applied — and `salesUrl`, where the account holder talks to sales. Nothing is created or switched on, and no checkout is opened. Once sales sets up the price, the same request goes through. It does not apply to accounts with an agreed price, to managed accounts or the agencies that provision them, or to the Stripe plan and older plans. ## What breaks - **Adding a second NIF** (`POST /v1/accounts/{account_id}/companies`, in `TEST` or `PROD`) to an account with exactly one active company used to answer `201`; it now answers `403 CONTACT_SALES_REQUIRED` with `reason: SECOND_NIF`. - **Switching a NIF on in Live** (`POST /v1/companies/{company_id}/activations`, or creating it in `PROD`) when the account has two or more active companies used to answer `201` or a `402` with a checkout; it now answers `403 CONTACT_SALES_REQUIRED` with `reason: LIVE_WITH_MULTIPLE_NIFS`, before any `402`. - **`LiveActivationVerdict` gains `CONTACT_SALES`.** A client that validates the enum strictly must accept the new value. ## Does this affect you? - If your account is on the API plan and you create companies or switch them on in Live through the API, handle `CONTACT_SALES_REQUIRED` by showing `error.details.salesUrl` instead of treating it as a failure. - If you validate `LiveActivationVerdict` against a closed list, add `CONTACT_SALES`. ## What else changed - **`402 PAYMENT_REQUIRED` means unpaid:** payment retries are exhausted. A failed charge that is still being retried no longer blocks Live. ## Endpoints - `POST /v1/accounts/{account_id}/companies` — 403 CONTACT_SALES_REQUIRED (SECOND_NIF, LIVE_WITH_MULTIPLE_NIFS) - `POST /v1/companies/{company_id}/activations` — 403 CONTACT_SALES_REQUIRED (LIVE_WITH_MULTIPLE_NIFS) ## Where to go next - [More than one NIF on the API plan](/multi-nif/companies#more-than-one-nif-on-the-api-plan) - [Pricing](/pricing#custom-pricing) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # One shape for lists and deletes Lists answer `data.`, deletes answer `204` unless the body informs, and every create returns `Location`. `DELETE products/bulk` takes `?ids=` instead of a body. Aug 17, 2026 · Breaking Every list now answers `data.` (+ `data.pagination` where the server paginates), deletes answer `204` unless the body genuinely informs, `DELETE products/bulk` takes `?ids=` instead of a body, and every single-resource `201` carries a `Location` header to its canonical GET. ## Endpoints - `DELETE /v1/companies/{company_id}/customers/{customer_id}` — Now answers 204 with no body - `DELETE /v1/companies/{company_id}/representation` — Now answers 204 with no body - `DELETE /v1/companies/{company_id}/products/bulk` — IDs move from the request body to ?ids= (max 100) - `PUT /v1/configuration/series/{series_id}` — Deprecated; use PATCH /v1/companies/{company_id}/series/{series_id} --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # The census is checked before the invoice is numbered Issuing with VeriFactu on checks the recipient against the AEAT census first: an uncensused recipient answers `422`, and no number is spent. Aug 23, 2026 · Breaking When you issue an invoice with VeriFactu on, the recipient's NIF is now checked against the AEAT census **before** the invoice consumes quota and a series number. Until now that check was skipped in sandbox, and skipped in every environment when the recipient came from a stored customer. No invoice that used to reach the AEAT stops reaching it. What changes is that a recipient the AEAT does not know is refused up front instead of being numbered and then failing out of sight. ## What else changed - **The one case that changes.** VeriFactu on, recipient not in the census: you used to get `201`, a spent series number and a registration that died later without telling you. You now get `422` before anything is numbered. - **With VeriFactu off nothing changes at all** — the census is not consulted. An invoice that is not declared does not need a censused recipient. - **Sandbox is not exempt**, and never really was: a sandbox issue is submitted to VeriFactu, which validates against the real census. If your test suite issues with VeriFactu on against a made-up NIF and asserts `201`, that assertion becomes `422`. - **A census that cannot answer does not block issuing.** Not being able to ask is not a `no` from the AEAT. - **Check a NIF up front** with `POST /v1/nif/validate`, which returns the real census status with a test key too. ## Endpoints - `POST /v1/companies/{company_id}/invoices/{invoice_id}/issue` — With VeriFactu on, an uncensused recipient is rejected with 422 before quota and numbering - `POST /v1/nif/validate` — Returns the real census status for a NIF, test keys included ## Where to go next - [Issue an invoice](/invoices/issueCompanyInvoice) - [Validate a NIF](/nif-validation/validateNif) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # chaining_hash leaves the documentation `verifactu.chaining_hash` was declared but never sent, so it is being withdrawn. No response changes: the server behaves exactly as before. Sep 17, 2026 · Improved The `verifactu` block of an invoice declared a `chaining_hash`, described as the chaining hash with the previous invoice. It has never travelled in a single response: the contract declared it and the server never sent it. It is gone from the guides and from the examples. This is a correction of the document, not a change to the API. If you read it, you were reading `undefined` before and you will read `undefined` after. ## What else changed - **Nothing stops being sent, because nothing was being sent.** Any client that treated it as optional — which is the only way it could have worked — is unaffected. - **If you generate a client from the machine-readable contract, regenerate it.** The schema still declares the field until the next contract sync, so a generated model may carry a `chainingHash` that is always empty. It is safe to drop. - **The chain itself is not affected.** VeriFactu chaining is maintained on the submission record; what is going away is a field that promised to show you a link in it and never did. `invoice_hash` is unchanged and keeps fingerprinting the invoice. - **`skip_reason` is in a similar position**, though it stays: it is still published, but only invoices issued before VeriFactu became a fact of the taxpayer carry a value. Nothing writes it now, so on invoices issued today it is always `null`. ## Endpoints - `GET /v1/companies/{company_id}/invoices/{invoice_id}` — The verifactu block no longer declares chaining_hash ## Where to go next - [Submission states](/verifactu/submission-states) - [VeriFactu is a fact of the taxpayer](/changelog#verifactu-is-an-account-fact) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Clearer rejections, and updates that do not re-ask the census A customer update only asks the AEAT census when the fiscal pair changes, the invitation `404` stops saying "pending", and readiness names an incomplete identity. Sep 6, 2026 · Improved Three small changes to what the API tells you, grouped because none of them is worth a page of its own. ## What else changed - **Updating a customer only consults the AEAT census when the fiscal pair changes.** A `PUT` or `PATCH` that leaves the NIF and the legal name as they are no longer asks — so a notes-only update on a customer whose NIF has since been de-registered stops failing. Deduplication and format checks are unchanged. - **The invitation `404` no longer says "pending".** `GET /v1/accounts/{account_id}/invitations/{invitation_id}` reads an invitation in any state, so its `404` now answers `INVITATION_NOT_FOUND` with a generic message. Revoking, whose update really is limited to pending invitations, keeps the wording under its own new code `PENDING_INVITATION_NOT_FOUND`. - **Issuing readiness names an incomplete fiscal identity.** `PROFILE_INCOMPLETE` joins the readiness chain, listing the requirements that are missing, so "why can I not issue" is answered without guessing. A missing NIF is still reported by its own blocker. ## Endpoints - `PUT|PATCH /v1/companies/{company_id}/customers/{customer_id}` — The census is consulted only when the NIF or the legal name changes - `GET /v1/accounts/{account_id}/invitations/{invitation_id}` — 404 answers INVITATION_NOT_FOUND - `GET /v1/companies/{company_id}/issuing-readiness` — Can report PROFILE_INCOMPLETE ## Where to go next - [Update a customer](/customers/patchCompanyCustomer) - [Retrieve an invitation](/invitations/getAccountInvitation) - [Issuing readiness](/companies/getCompanyIssuingReadiness) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # CLI 0.3.0: commands follow the routes under the NIF CLI 0.3.0 calls only the routes that name the company, so most commands change name: `beel companies list-invoices ` is now `beel invoices list`. Sep 24, 2026 · Breaking Version 0.3.0 of the CLI builds its commands from the routes under `/v1/companies/{company_id}` and `/v1/accounts/{account_id}` only. The flat routes that 0.2.x called stop answering on 2026-12-09, so the old commands had to go. 179 of the 217 commands in 0.2.2 change name, arguments or body. `npx @beel_es/cli` always runs the latest version, so a script that calls it without a version runs 0.3.0 from its next run. Update the command names, or pin `npx @beel_es/cli@0.2.2` while you do; 0.2.2 keeps working until the flat routes retire. If you type a 0.2.x name, 0.3.0 exits with code `2` and its error message gives the new name. ## What else changed - **The company comes from `--company`, `BEEL_COMPANY_ID` or your account.** With one company the CLI finds it by itself, which needs the `companies:list` scope and one or two extra requests. With several, it exits with code `2` and lists them. Account-level commands take `--account` / `BEEL_ACCOUNT_ID`. - **Status changes are one command:** `invoices mark-paid` becomes `invoices set-status --status PAID`. `update` becomes `patch`, which leaves the fields you leave out untouched. - **Shorter action names:** `companies get-by-id` is `companies get`, `webhooks list-subscriptions` is `webhooks list`, `me get-my-identity` is `me get`. - **Body fields as flags:** string, number and boolean fields take a flag named after the API field, checked against its enum. `--data` still takes the full body. - **Compact JSON output:** one line on stdout; `--pretty` indents it. - **Payment-event commands take a connection ID** from `beel payment-connections list`, not the provider name. ## Where to go next - [Upgrading from 0.2.x (every renamed command)](/cli#upgrading-from-02x) - [Arguments, flags and --data](/cli#arguments-flags-and---data) - [Which company a command acts on](/cli#which-company-a-command-acts-on) - [The deprecated flat routes now retire on 9 December](/changelog#flat-routes-retire-9-december) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # BeeL. CLI Official CLI on npm as `@beel_es/cli`. Run any endpoint from the terminal, sandbox by default, nothing to install. Jun 13, 2026 · New The official BeeL. CLI is now published on npm as @beel_es/cli. Run any API endpoint straight from the terminal — sandbox by default — with nothing to install thanks to npx. Commands are derived at runtime from the OpenAPI spec bundled with the installed version, so the CLI always matches the API surface of that release. ## What else changed - **Zero-install with `npx @beel_es/cli`** — or `npm install -g @beel_es/cli` for a global `beel` command. Runs against sandbox by default. - **Every endpoint is a command** — `beel commands` lists them and `--help` at any level shows flags, enums, defaults and body fields, all derived from the spec, so there's no hand-maintained list to drift. - **Agent-first** — authenticate with an env var (ideal for agents/CI) or a `~/.config/beel/config.json` (chmod 600), with a structured output contract that's easy to parse. - **Generic escape hatch** — call any endpoint the installed version doesn't know yet; update the CLI to pick up newly added endpoints as new commands. - **Search the docs from the terminal** without leaving your shell. ## Where to go next - [CLI docs](/cli) - [npm package](https://www.npmjs.com/package/@beel_es/cli) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Four collections paginate, and branding goes wrapped Four collections now paginate — without `limit` you get the first 20 — and the three branding responses come wrapped in `{success, data, meta}`. Aug 25, 2026 · Breaking Two changes that close the last inconsistencies in how the canonical surface answers: three responses that came back bare are now wrapped like every other one, and four collections that grew without a bound now paginate. Both are visible from outside, so both are written down here even though neither had documented consumers. ## What else changed - **Three branding responses are now wrapped.** `GET` and `PUT /v1/companies/{company_id}/invoice-customization` and `PUT /v1/companies/{company_id}/logo` were the last operations answering the resource bare. Move your read one level down: `body.logo_url` becomes `body.data.logo_url`. The logo `DELETE` still answers `204` — there is no body to wrap. - **Four collections now paginate**, with the API's normal `page`/`limit` and its normal defaults: without them you get the first 20 items, not all of them. They are `GET /v1/accounts/{account_id}/members`, `.../members/{member_id}/grants`, `GET /v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}/history` and `GET /v1/accounts/{account_id}/companies/stats`. The array still travels under the same key — `pagination` is simply added beside it. - **`stats` pages like its parent list.** Asking `GET /v1/accounts/{account_id}/companies/stats` and `GET /v1/accounts/{account_id}/companies` with the same `page`/`limit` returns the two responses aligned company by company. - **The deprecated flat aliases are untouched, byte for byte.** In particular `GET /v1/recurring-invoices/{recurring_invoice_id}/history` does **not** paginate: it is frozen as it shipped until its retirement date. Reshaping a route that is going away only breaks the people still on it. - **Every collection now declares how it is walked.** A list either carries `pagination`, or is marked a closed catalogue, or declares a cursor style — so the absence of `pagination` is no longer something you have to guess about. These are spec annotations: not one byte of any response changes because of them. ## Endpoints - `GET|PUT /v1/companies/{company_id}/invoice-customization` — Now wrapped in {success, data, meta} - `PUT /v1/companies/{company_id}/logo` — Now wrapped in {success, data, meta} - `GET /v1/accounts/{account_id}/members` — Paginated — first 20 by default - `GET /v1/accounts/{account_id}/members/{member_id}/grants` — Paginated — first 20 by default - `GET /v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}/history` — Paginated — first 20 by default; the flat alias is not - `GET /v1/accounts/{account_id}/companies/stats` — Paginated, aligned with the companies list ## Where to go next - [Invoice customization](/companies/getCompanyInvoiceCustomization) - [List members](/members/listAccountMembers) - [Company stats](/companies/listCompanyStats) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Each company chooses its sender and default email content New `GET`/`PUT /v1/companies/{company_id}/email-configuration`: the address a company's invoice emails use, plus default subject, message, cc and extra recipients. Oct 23, 2026 · New A company inherits the account's default sending domain, can pick another one, or can stay on BeeL.'s address. The response includes `sender.effective`, the address the next invoice email will actually use, and a `reason` when it is not your domain. The same call sets the default subject, message, `cc` and `additional_recipients` of the company's invoice emails. `GET /v1/email-template-variables` lists the placeholders those texts accept, such as `{invoiceNumber}`. Templates saved with the older Spanish placeholders now read back with the English names; the Spanish ones are still filled in. ## Endpoints - `GET /v1/companies/{company_id}/email-configuration` — Sender chosen, address in effect and defaults - `PUT /v1/companies/{company_id}/email-configuration` — Replace the sender, and optionally the defaults - `GET /v1/email-template-variables` — Placeholders for subject and message ## Where to go next - [Which address an email actually uses](/guides/custom-sending-domain#effective-sender) - [Template variables](/emails/listEmailTemplateVariables) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Company stats count voided invoices by how they were voided `invoice_count` and `last_invoice_at` now leave out invoices voided as issued by mistake, and keep an invoice voided by a total corrective. Oct 16, 2026 · Improved The documents counted by `invoice_count` in the company stats change for voided invoices. Drafts, scheduled invoices and proformas still never count, and a corrective still counts as a document of its own. ## What else changed - **Do not count:** an invoice voided with the void endpoint (issued by mistake), a simplified invoice replaced by a standard one, and any corrective of an invoice voided that way. - **Count:** an invoice voided by a total corrective keeps counting, together with that corrective, so the pair counts as two. - **Still not a cursor.** Voiding an invoice lowers the count and rectifying one for its full amount raises it by one. `last_invoice_at` follows the same set and can move backwards. ## Endpoints - `GET /v1/accounts/{account_id}/companies/stats` — New rule for `invoice_count` and `last_invoice_at` ## Where to go next - [Get invoice stats per company](/companies/listCompanyStats) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Lost updates answer 409 Two overlapping updates: the second now answers `409 CONCURRENT_MODIFICATION` instead of silently discarding the first. Aug 21, 2026 · Improved When two updates to the same resource overlap, the one that arrives second answers `409 CONCURRENT_MODIFICATION` instead of silently discarding the other's change or surfacing an internal error. Re-read the resource and retry. ## What else changed - **What you may see that you did not before.** A `PATCH` on a customer, a product or a series can now answer `409` with code `CONCURRENT_MODIFICATION`. It means another write to the same resource landed between your read and your write. Nothing was applied. - **What to do with it.** Re-read the resource, re-apply your change on top of the fresh state, and send it again. The retry is safe: the rejected request had no effect. - **Why it is an improvement even though it is a new failure.** Before, one of the two updates won and the other disappeared without telling anyone — the field you set was simply not there afterwards. Where the collision hit a uniqueness rule instead, it surfaced as a generic database error rather than something you could act on. - **Promoting a default series** is the same story: two simultaneous promotions for the same document type now leave exactly one default, and the loser gets the `409` rather than an internal error. ## Endpoints - `PATCH /v1/companies/{company_id}/customers/{customer_id}` — May answer 409 CONCURRENT_MODIFICATION - `PATCH /v1/companies/{company_id}/products/{product_id}` — May answer 409 CONCURRENT_MODIFICATION - `PATCH /v1/companies/{company_id}/series/{series_id}` — May answer 409 CONCURRENT_MODIFICATION --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Connections and customer replies to invoices Connect beel_email to keep a copy of what customers answer to your invoice emails, or register replies from other channels, and receive them by webhook with their attachments. Nov 9, 2026 · New A connection links a company to a service BeeL. works through. With a beel_email connection, the Reply-To of each invoice email also lists an address of BeeL., which keeps a copy of the customer's answer. You can also register replies you receive on WhatsApp, Slack or your own channels. Replies are masked in webhooks and lists, deleted on request and emptied after 12 months. BeeL. does not store the files of the attachments: each one has a `url` that returns a temporary download link while the file is available, for a few days after the reply arrives (`file_expires_at`). To keep a file, download it when `invoice.reply.received` arrives. Nothing changes for existing integrations. ## What else changed - **Nine new operations** under `/v1/companies/{company_id}/connections` and `/v1/companies/{company_id}/invoice-replies`, with the privileged scopes `connections:read`, `connections:write`, `invoice-replies:read` and `invoice-replies:write`. - **Four new webhooks:** `connection.connected`, `connection.disconnected`, `invoice.reply.received` and `invoice.reply.deleted`, sent only to the account that owns the company. - **Attachments to download:** each attachment carries `id`, `url` and `file_expires_at`; its `url` returns a `download_url` valid for about an hour, or `null` when the file is no longer available. - **New error codes** starting with `CONNECTION_` and `INVOICE_REPLY_`, plus `COMPANY_CONNECTION_NOT_FOUND`. ## Endpoints - `POST /v1/companies/{company_id}/connections` — Connect a service - `GET /v1/companies/{company_id}/connections` — List the connections of a company - `GET /v1/companies/{company_id}/connections/{connection_id}` — Get a connection - `DELETE /v1/companies/{company_id}/connections/{connection_id}` — Disconnect a service - `GET /v1/companies/{company_id}/invoice-replies` — List the replies about invoices - `POST /v1/companies/{company_id}/invoice-replies` — Register a reply received on your own channel - `GET /v1/companies/{company_id}/invoice-replies/{reply_id}` — Get a reply with its full text - `DELETE /v1/companies/{company_id}/invoice-replies/{reply_id}` — Delete a reply - `GET /v1/companies/{company_id}/invoice-replies/{reply_id}/attachments/{attachment_id}` — Get an attachment with a temporary download link ## Where to go next - [Connections](/guides/connections) - [Read customer replies](/guides/customer-replies) - [Download attachments](/guides/customer-replies#attachments) - [Delete and retention](/guides/reply-data-protection) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Where the contract and the API disagreed, they now agree A check of the published contract against the live API found a dozen differences. A few were fixed in the API, and the rest in the contract. Sep 21, 2026 · Fixed We replayed the published contract against the live API and wrote down every place where they disagreed. Where the API was wrong, the API changed. The first four highlights are those, and they are the only ones where a response differs from before. Where the document was wrong, the document changed and the server behaves as it always did. ## What else changed - **`logo_url` on a company is an absolute URL.** `GET /v1/companies/{company_id}` returned a storage path for a logo uploaded through the logo endpoint. It now returns the same fetchable URL as the invoice-customization resource and an invoice's `issuer.logo_url`. - **A number field that receives text answers `400 INVALID_JSON_FORMAT` with `details` filled in**: `field`, `invalid_value` and `expected_format` (`number` or `integer`). It used to come back with `details: {}`. - **A deprecated route that rejects an unknown query parameter still sends `Deprecation` and `Sunset`** on that `400`, like on any other answer from it. - **A property that breaks two rules at once gets one stable message** with both reasons, instead of one of the two, picked differently on identical calls. - **Contract corrections, server unchanged:** `GET /v1/accounts/{account_id}/companies` is always paginated and always carries `pagination`. A value outside an enum in a **body** answers `422 VALIDATION_ERROR` with `allowed_values`, not `400`. `POST …/customers` can answer `422 NIF_NOT_IN_CENSUS`. A body property the operation does not declare is ignored without a warning. - **`404` and `409` name what failed.** The contract now lists the codes the API already returned, such as `INVOICE_NOT_FOUND`, `CLIENT_NOT_FOUND`, `CLIENT_DUPLICATE` and `ENDPOINT_NOT_FOUND`, in place of a generic `NOT_FOUND` or `CONFLICT` that it never sent. ## Where to go next - [Handling errors](/guides/handling-errors) - [INVALID_JSON_FORMAT](/errors/INVALID_JSON_FORMAT) - [List the companies of an account](/companies/listCompanies) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Contract drops what was never sent Several documented responses and one header were never actually sent. They are out of the contract; the server did not change. Aug 21, 2026 · Fixed Several responses and one header were documented but never produced. They are gone from the contract, so a generated client no longer waits for them. Nothing about the server changes: it never sent them. ## What else changed - `X-Bulk-Failures` is no longer documented on `POST /v1/invoices/bulk/pdf` or `POST /v1/companies/{company_id}/invoices/pdf-archive`. It never travelled: partial failures are reported in the response body, as they always were. If you read that header, you have been reading `null` all along. - Response codes that no operation could return are withdrawn — the `409` of `POST /v1/invoices/{invoice_id}/corrective`, the `400` of `convert-to-invoice`, and the error detail shapes documented for `import-csv-preview` that the server does not build. Every code an operation *can* answer stays declared, `429` and `500` included. - `POST /v1/webhooks/{webhook_id}/test` stops documenting a parameter it does not read. - Nothing here changes behaviour: no status code, body or header that you receive today is affected. What changes is that a client generated from the spec no longer has dead branches for responses that never arrive. ## Endpoints - `POST /v1/invoices/bulk/pdf` — X-Bulk-Failures header withdrawn from the contract; failures are in the body - `POST /v1/companies/{company_id}/invoices/pdf-archive` — X-Bulk-Failures header withdrawn from the contract; failures are in the body - `POST /v1/invoices/{invoice_id}/corrective` — 409 withdrawn: the operation does not answer it - `POST /v1/webhooks/{webhook_id}/test` — Undocumented parameter withdrawn --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Three response fields were never guaranteed `amount`, `currency` and `sending_history.sent_at` leave `required`. No response changes — the contract was promising something the server never did. Sep 8, 2026 · Improved Two contract corrections, same shape: fields declared mandatory that the server already omitted. Nothing stops being sent; what changes is what the document promises about it. If you generated a client from the spec and treated them as mandatory, you were validating against a promise we were not keeping — and you would break on the first row that did not carry them. ## What else changed - **`amount` and `currency` on a payment event** leave `required` and become nullable. They were already omitted on events that move no money — the catalogue notifications that arrive over the same channel. An event with no amount is not a payment of zero: it is an event that moved no money. - **`sending_history.sent_at` becomes optional** — optional, not nullable: the field is omitted, never sent as `null`. A sending history records decisions, not only deliveries: an email stopped by policy is listed as `REJECTED`, and one just accepted travels as `QUEUED` while dispatch is asynchronous. Neither has an instant of sending, because no sending happened. It is never backfilled with a clock value. - **What to do.** Regenerate your client and treat the three as optional. If your integration did not already break, it was tolerating them anyway. ## Endpoints - `GET /v1/companies/{company_id}/payment-connections/{connection_id}/events` — amount and currency are optional and nullable - `GET /v1/companies/{company_id}/invoices/{invoice_id}` — sending_history entries may omit sent_at ## Where to go next - [List payment events](/payment-events/listCompanyPaymentEvents) - [Sending email](/guides/sending-email) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Corrective invoices and voids follow the rules of the law A corrective can no longer rectify more than was invoiced, has a deadline, and can fix the recipient's data; a sent or paid invoice is voided only if issued in error. Sep 27, 2026 · Breaking A corrective invoice and a void are two different fiscal acts, and the API now tells them apart the way the law does. A corrective corrects an operation that took place: it cannot take any rate below what was invoiced, it has a four-year deadline, and each reason code has its conditions. A void is only for an invoice issued by mistake. Corrective invoices and voids already issued do not change. ## What breaks - **A `TOTAL` corrective takes no `lines`.** It rectifies everything still invoiced on the original, its live correctives included. Sending `lines` answers `422 RECTIFICATIVA_TOTAL_CON_LINEAS`; until now they were accepted, and without them the original lines were copied negated. A `TOTAL` on an invoice that earlier correctives already brought to zero answers `422 CORRECTIVE_NOTHING_LEFT_TO_RECTIFY`. - **A `PARTIAL` corrective cannot rectify more than was invoiced.** Counting earlier correctives, no rate may end below zero: `422 CORRECTIVE_EXCEEDS_INVOICED_AMOUNT`, with `tax_group` and `max_reduction` in `error.details`. A `PARTIAL` that only changes the withholding answers `422 CORRECTIVE_WITHHOLDING_ONLY`: a withholding is not a reason to correct, so void the invoice and issue a new one. - **Four years to correct.** Counted from the original's operation date or, for a cause of article 80 of the VAT Act, from the new optional `circumstance_date`. Past it: `422 CORRECTIVE_OUT_OF_TIME`, with `deadline` and `counted_from` in `error.details`. `circumstance_date` is rejected with `R4` (`422 CORRECTIVE_CIRCUMSTANCE_DATE_NOT_APPLICABLE`) and outside the original's operation date and today (`422 CORRECTIVE_CIRCUMSTANCE_DATE_OUT_OF_RANGE`). - **`R2` and `R3` have conditions.** Both need a recipient established in Spain, the Canary Islands, Ceuta or Melilla (an `R2` also in another EU member state): `422 CORRECTIVE_RECIPIENT_NOT_ESTABLISHED`. An `R3` needs six months since the original's operation date (`422 CORRECTIVE_BAD_DEBT_TOO_EARLY`, with `earliest_date`) and, on a base of 50 € or less, the new `recipient_is_business: true` (`422 CORRECTIVE_BAD_DEBT_BASE_TOO_LOW`). - **An original rejected by the AEAT is fixed first.** When VeriFactu rejected the original's record and it was not resubmitted, a corrective answers `422 CORRECTIVE_ORIGINAL_RECORD_REJECTED`. - **Voiding a sent or paid invoice needs `issued_in_error: true`**, confirming the operation never took place, was a test or a duplicate; without it: `422 VOID_REQUIRES_ISSUED_IN_ERROR`. An invoice with live correctives cannot be voided (`422 INVOICE_HAS_LIVE_CORRECTIVES`), nor can a `TOTAL` corrective (`422 TOTAL_CORRECTIVE_NOT_VOIDABLE`). ## Does this affect you? - If you send `lines` on a `TOTAL` corrective, remove them. - If you void invoices that were already sent or paid, send `issued_in_error: true` when that is the case, and use a corrective otherwise. - If you correct a withholding with a `PARTIAL` corrective, void and reissue instead. - If you issue `R3` correctives, check the six months and send `recipient_is_business` on small operations. - If you branch on `error.code` for corrective or void requests, add the new codes. ## What else changed - **Correct the recipient's data.** When the invoice recorded its recipient with a wrong name, tax ID or address, send the corrected `recipient` with `PARTIAL`, `R4` and no `lines`: the amounts do not change. Another person is not a data correction (`422 CORRECTIVE_RECIPIENT_IS_ANOTHER_PERSON`); the same data as recorded answers `422 CORRECTIVE_RECIPIENT_UNCHANGED`. `recipient` on any other corrective still answers `422 CORRECTIVE_RECIPIENT_NOT_ACCEPTED`. - **The corrective series is created for you.** Without `series_id` and without a default corrective series, one is created on first use (code `R`, or the next free one) instead of answering `422 SERIES_DEFAULT_NOT_FOUND`. - **A corrective whose `total_to_pay` is 0 is issued as `PAID`**, with `payment_date` equal to `issue_date`. - **`CORRECTIVE_RECENT_DUPLICATE` covers two minutes, not 24 hours.** It catches a double submission; a second identical corrective a few minutes later is no longer refused as a duplicate. - **A simplified invoice is always corrected with `R5`.** To give its customer a full invoice with their details, use the [exchange of simplified invoices](/changelog/simplified-invoice-exchange), not a corrective. ## Endpoints - `POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective` — New optional circumstance_date and recipient_is_business; recipient accepted for an R4 data correction; new 422 codes - `POST /v1/companies/{company_id}/invoices/{invoice_id}/void` — New issued_in_error; 422 VOID_REQUIRES_ISSUED_IN_ERROR / INVOICE_HAS_LIVE_CORRECTIVES / TOTAL_CORRECTIVE_NOT_VOIDABLE ## Where to go next - [Corrective invoices](/verifactu/corrective-invoices) - [Create a corrective invoice](/invoices/createCompanyCorrectiveInvoice) - [Void an invoice](/invoices/voidCompanyInvoice) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Send invoice emails from your own domain Register a domain on the account, publish its DNS records and verify it: invoice emails then go out from your address instead of BeeL.'s. Oct 23, 2026 · New Custom sending domains are an Enterprise add-on: talk to sales to add it. Domains belong to the account and are the same in Test and Live; writes need a live API key. Verification is asynchronous, a domain never verified is removed after 72 hours, and sending never stops because of a domain: if it is not verified, the email goes out from BeeL.'s address. ## What else changed - **Six new operations** under `/v1/accounts/{account_id}/email-domains`, with the `email-domains:read` and `email-domains:write` scopes. - **Three new webhooks:** `email_domain.verified`, `email_domain.failed` and `email_domain.removed`, sent only to the Live endpoints of the account that owns the domain. - **Six new error codes**, all starting with `EMAIL_DOMAIN_`. ## Endpoints - `GET /v1/accounts/{account_id}/email-domains` — List the domains and the account's limit - `POST /v1/accounts/{account_id}/email-domains` — Register a domain and get its DNS records - `GET /v1/accounts/{account_id}/email-domains/{email_domain_id}` — Read one domain - `POST /v1/accounts/{account_id}/email-domains/{email_domain_id}/verify` — Ask for a new DNS check - `PUT /v1/accounts/{account_id}/email-domains/{email_domain_id}/default` — Make it the account's default - `DELETE /v1/accounts/{account_id}/email-domains/{email_domain_id}` — Remove it ## Where to go next - [Custom sending domain](/guides/custom-sending-domain) - [Register a sending domain](/emails/createAccountEmailDomain) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # A customer used by a live recurring template cannot be deleted Deleting a customer that an active or paused recurring template invoices is now rejected, on the single `DELETE` and row by row in the bulk delete. Sep 17, 2026 · Breaking Deleting a customer that a recurring template still invoiced used to succeed, and it left the template with no one to invoice. It could not produce another invoice. The delete is now refused while an `ACTIVE` or `PAUSED` template uses the customer. Finish the template, or change its customer, and the delete goes through as before. ## What breaks - **The single `DELETE` answers `400 REFERENCED_BY_RECURRING_INVOICE`** where it used to answer `204`. It is the same code that deleting a series in use by a template already returns. The customer is left untouched. - **In the bulk delete, that row fails on its own** with `status: HAS_RECURRING_INVOICE` and `error.code: CLIENT_HAS_RECURRING_INVOICE`. The rest of the batch is deleted normally, just as with `HAS_INVOICES`. If you `switch` over `status` or `error.code`, add the new value. - **`statistics` gains `has_recurring_invoice`, and it is required.** The five counters `deleted`, `not_found`, `has_invoices`, `has_recurring_invoice` and `errors` add up to `total_processed`. Any sum you do over four of them is now short. ## Does this affect you? - Look for code that deletes customers and treats any non-`204` as a failure to retry. This rejection is a business rule: retrying never works. - If you validate the bulk-delete response against a generated model, regenerate it: a strict enum fails on the new `status` value. ## Endpoints - `DELETE /v1/companies/{company_id}/customers/{customer_id}` — 400 REFERENCED_BY_RECURRING_INVOICE while a live template uses the customer - `DELETE /v1/companies/{company_id}/customers/bulk` — New row status HAS_RECURRING_INVOICE and counter has_recurring_invoice ## Where to go next - [Delete a customer](/customers/deleteCompanyCustomer) - [Delete customers in bulk](/customers/deleteCompanyCustomersBulk) - [REFERENCED_BY_RECURRING_INVOICE](/errors/REFERENCED_BY_RECURRING_INVOICE) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Exports add a Suplidos sheet for disbursements When an exported invoice has `SUPLIDO` lines, the Excel export adds a `Suplidos` sheet with one row per source invoice. Oct 16, 2026 · New The sheet goes at the end of the workbook, after the sheets of the formats you asked for. Columns: «Número factura», «Fecha expedición», «Cliente», «NIF cliente», «Factura origen», «NIF emisor origen» and «Importe factura origen». The amount is the `total_to_pay` of the source invoice, or the line total for a manual disbursement with no linked invoice. ## What else changed - **It is not a format.** It is added whatever `formats` you send, and you cannot request it or opt out of it. Code that reads sheets by position is unaffected; code that expects a fixed number of sheets may need a change. - **A source invoice you cannot see** shows only its number, when known, with the issuer NIF and amount empty. ## Endpoints - `POST /v1/companies/{company_id}/invoices/exports` — Adds the `Suplidos` sheet when there are disbursement lines ## Where to go next - [Export invoices](/invoices/createCompanyInvoiceExport) - [Suplidos](/verifactu/suplidos) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Export lines take regime 02 on their own A VAT line exempt under art. 21 or 22 that arrives with `regime_key: "01"` is stored with `"02"`, instead of being refused by AEAT after issue. Sep 21, 2026 · Fixed An export — Canarias, Ceuta, Melilla or outside the EU — is a line with `exemption_reason` `EXENTA_ART_21` or `EXENTA_ART_22`. AEAT only accepts it under regime `02`, but `01` is the default, so an export sent the obvious way was issued, numbered, and then refused by AEAT. The line is now stored with regime `02` whenever it arrives with `01`. This applies to invoices, recurring templates and every write path, including issuing. ## What else changed - **Expect `regime_key: "02"` back** on those lines, even if you sent `"01"` or left it to the default. - **`EXENTA_ART_22` is now accepted with regime `02`**, alongside `EXENTA_ART_21`. - **From 17 to 21 September these lines were rejected** with `EXEMPTION_INCOMPATIBLE_WITH_REGIME` instead of corrected. If you got that code in those days, send the invoice again unchanged. The code stays in the catalogue, but a VAT export line no longer reaches it. ## Where to go next - [Regime keys](/verifactu/regime-keys) - [International customers](/verifactu/international-customers) - [EXEMPTION_INCOMPATIBLE_WITH_REGIME](/errors/EXEMPTION_INCOMPATIBLE_WITH_REGIME) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # external_reference is now external_ref The invoice field first announced as external_reference is now called external_ref — the old name still works when you write, but responses no longer return it. Aug 13, 2026 · Breaking The invoice field first announced as `external_reference` is now called `external_ref`. Responses already emit the new name; the old one is still accepted when you write, as a deprecated alias. ## What breaks - **Reads are the urgent half.** The response field is `external_ref`. Code reading `invoice.external_reference` off a response gets `undefined` — silently, with no error. This is the trap: writes keep working through the alias, so an integration can look healthy while the value it reads back is empty. - **Writes still work.** Sending `external_reference` in the body of a create-invoice call is still honoured, including the `409 INVOICE_DUPLICATE_EXTERNAL_REFERENCE` uniqueness check. It is a deprecated alias, not the field name. - **The query filter is deprecated, not removed.** `GET /v1/invoices?external_reference=…` still filters. On the company-scoped route (`GET /v1/companies/{company_id}/invoices`), `external_ref` is the only name accepted. ## Does this affect you? - Grep your integration for `external_reference`. Any hit is either a deprecated alias to rename, or — if it reads from a response — a bug already returning `undefined`. - Replay one recent create-invoice call and read `external_ref` back off the response. If it carries your order id, your writes are fine and only the reads need renaming. - If you filter invoices by your order id, check which route you call. The company-scoped route never accepted the old name. ## The retirement calendar No removal date is announced. The alias stays until one is, and it will appear here — with a `Sunset` header on the affected calls — before anything stops working. - **Today** — Both names accepted on writes; responses emit `external_ref` only. Migrate at your own pace — nothing is scheduled to break. - **When a date is set** — It is announced here first, and the affected calls start carrying a `Sunset` header you can read from your own traffic. - **After that date** — The `external_reference` alias is withdrawn and the field is ignored on writes. Your writes keep working until the alias is withdrawn. Your reads are already returning nothing if they look for `external_reference` on a response. ## Where to go next - [Idempotency guide](/guides/idempotency) - [Create an invoice](/invoices/createInvoice) ## Why you may have missed this The field was first announced as [`external_reference`](/changelog/invoice-external-reference), with that name in every example, and renamed shortly after. That entry stays published as the record of the original feature — so if you integrated from it, the name you copied is the old one. This note is the correction. The earlier entry is not being edited: what it said was true when it shipped. ## What to change ```diff const invoice = await beel.invoices.create({ // … - external_reference: order.id, + external_ref: order.id, }); - console.log(invoice.external_reference); // undefined + console.log(invoice.external_ref); ``` The read is the urgent half. The write keeps working through the alias; the read returns `undefined`, with no error to tell you. ## See also - [Idempotency guide](/guides/idempotency) — how `external_ref` differs from the `Idempotency-Key`, and why you want both. - [external_reference on invoices](/changelog/invoice-external-reference) — the original announcement, and the feature this renames. --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Three filters returned the wrong rows A literal `%` in a filter value dropped the filter. `series_code` matched any series containing the code. Sorting customers ignored the documented field names. **Only `series_code` changes a response you may rely on today.** Aug 22, 2026 · Breaking Three cases where a filter or an ordering you sent came back `200` having done something other than what you asked. A literal `%` in a value dropped the filter entirely; `series_code` matched any series *containing* the code you sent; and sorting customers only understood undocumented field names. All three now either work as documented or tell you they cannot. Only `series_code` changes a response you may be relying on today. The other two turn a wrong `200` into a `400` that names the problem. ## What else changed - **A literal `%` in a filter value dropped that filter.** `?search=100%OFF` or `?status=DRAFT%` came back `200` with the collection unfiltered — not an error, just every row. This is what any client that builds its query string without percent-encoding the values produces, so it did not take a strange request to hit it: asking for your drafts returned every invoice on the account. A value whose percent-encoding is malformed is now named and rejected. Encode the value and it works as before — a literal `%` is `%25`. - **That rejection joins the date already announced.** It travels on exactly the mechanism from [the strict query parameters change](/changelog#strict-query-parameters-and-rate-limits): the canonical routes reject it today, the flat aliases answer `200` with a `BeeL-Warning` header naming the parameter until **2026-09-03**, then reject too. No new date to track, and the header tells you which of your requests are affected before then. - **`series_code` now means one series, not any series containing it.** It was matching as a substring, so `?series_code=R` also returned everything filed under `STR` — and there was no way at all to ask for a single series. It now matches the series code exactly, still ignoring case. **This is the one change that can quietly return fewer rows than yesterday**: if you were relying on the substring behaviour to sweep several series at once, use `search`, which is documented as a partial match across the invoice number, the recipient and the series code. - **Sorting customers now takes the field names we document.** `sort_by=city`, `province`, `active` and `legal_name` were accepted with `200` and then ignored, falling back to the default order — including `legal_name`, the example in our own reference. They now sort. The full vocabulary is `legal_name`, `nif`, `email`, `phone`, `city`, `province`, `active`, `created_at`; anything else is answered with `400` listing those. If you were sending the Spanish field names that happened to work, they are the ones that stop being accepted — the names above are the same ones the filters on that operation already use. - **Paging through customers no longer repeats or skips anyone.** The order had no tie-breaker, so customers sharing a legal name — the field sorted by default — could appear on two pages or on none. Ordering is now total, and a full walk of the collection returns each customer exactly once. ## Endpoints - `GET /v1/companies/{company_id}/invoices` — `series_code` matches one series exactly; a malformed `%` in any filter value is named and rejected - `GET /v1/companies/{company_id}/customers` — `sort_by` takes the documented field names and pages without repeating rows ## Where to go next - [List invoices](/invoices/listCompanyInvoices) - [List customers](/customers/listCompanyCustomers) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # The deprecated flat routes now retire on 9 December The retirement date of the deprecated flat routes moves from 10 September to **2026-12-09**. Nothing stopped answering, and you have the whole window again. Sep 10, 2026 · Improved The flat routes deprecated when resources moved under the NIF carried a `Sunset` of 10 September 2026. That day came, the routes kept answering, and the date is now where it should have been: **2026-12-09**. It moved in every place at once — the `Sunset` header on the responses, the `deprecated` notices in the reference, and the migration guide — so there is one date to track, not two. ## What else changed - **Nothing broke and nothing was removed.** Every deprecated route answered on 10 September and answers today. - **A published date moves later, never sooner.** That is the commitment in the [deprecation policy](/guides/deprecation-policy): if we get a retirement date wrong, it is pushed out, never brought forward. - **The 91 deprecated operations carry the new date** in their `Sunset` header, each with its successor route where it has one. The fastest audit is still your own logs: grep a day of responses for `Deprecation: true`. - **The migration itself has not changed** — the route table in [Resources under the NIF](/changelog#resources-under-the-nif) is the same. Only the deadline moved. ## Where to go next - [Deprecation policy](/guides/deprecation-policy) - [Resources under the NIF](/changelog#resources-under-the-nif) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Rate limits now count per IP The published global ceiling drops to 1000 req/60 s to match what was already enforced. Strict and Global count **per IP**, not per credential. Aug 22, 2026 · Breaking The documented global ceiling goes from 2000 to 1000 requests per 60 seconds. This is not a reduction — the API was already enforcing 1000 — so nothing changes for a running integration. ## What else changed - Global: 1000 req / 60 s — the published figure now matches what an edge backstop was already enforcing - **Strict and Global count per originating IP**, not per credential: several keys on one host share those budgets - Standard still counts per credential — per API key, or per client for OAuth2 and dashboard sessions - `/v1/accounts/imports` joins the Standard tier (300 req / 60 s) ## Where to go next - [Rate limits](/guides/rate-limits) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # An import row without an address is a bad row A customer import row with an incomplete address is now reported as a bad row instead of being created with placeholder values. Sep 6, 2026 · Breaking A row whose address was incomplete used to be imported anyway, with the missing parts filled in — `"Sin especificar"`, `"00000"`, `"N/A"` — so you ended up with customers carrying an address nobody had declared. The row is now reported, in its own position, with its own errors, and no customer is created for it. The rest of the file imports as before: a bad row is bounded to itself. ## What else changed - **Fewer customers are created than before** for the same file, and the difference is exactly the rows that were being filled in. The preview reports them the same way the real import does, so you can see the count before committing. - **What to do.** Complete the address columns for the reported rows and re-import them, or accept them as rejected. There is nothing to migrate: existing customers are untouched. ## Endpoints - `POST /v1/companies/{company_id}/customers/imports` — A row with an incomplete address is reported, not filled in - `POST /v1/companies/{company_id}/customers/importss/preview` — The preview reports the same rows the import will reject ## Where to go next - [Import customers](/customers/createCompanyCustomerImport) - [Preview an import](/customers/previewCompanyCustomerImport) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Changelog Every change to the BeeL. API, newest first — what moved, when the old way stops working, and how to tell whether it affects you. Most changes are one entry here. A few are big enough to need the old-to-new route table, the retirement calendar and a way to check your own integration against it — those keep their entry in this list and link to the full note. Every deprecated route also tells you the same thing in its own responses — `Deprecation: true`, a `Sunset` date and `Link: ; rel="successor-version"` — so you never have to trust a page over your own traffic. ## [Connections and customer replies to invoices](/changelog/connections-and-invoice-replies) Nov 9, 2026 · New Connect beel_email to keep a copy of what customers answer to your invoice emails, or register replies from other channels, and receive them by webhook with their attachments. [Read the migration note](/changelog/connections-and-invoice-replies) ## Recurring invoices: `series_id` is optional Oct 26, 2026 · Improved Creating a recurring invoice without `series_id` no longer answers `VALIDATION_ERROR`: the template uses the company's default series for `invoice_type`. A `STANDARD` template with no default standard series is rejected with `SERIES_DEFAULT_NOT_FOUND`. - [Recurring invoices](/guides/recurring-invoices) - [Create a recurring invoice](/recurring-invoices/createCompanyRecurringInvoice) ## [Each company chooses its sender and default email content](/changelog/company-email-configuration) Oct 23, 2026 · New New `GET`/`PUT /v1/companies/{company_id}/email-configuration`: the address a company's invoice emails use, plus default subject, message, cc and extra recipients. [Read the migration note](/changelog/company-email-configuration) ## [Send invoice emails from your own domain](/changelog/custom-sending-domain) Oct 23, 2026 · New Register a domain on the account, publish its DNS records and verify it: invoice emails then go out from your address instead of BeeL.'s. [Read the migration note](/changelog/custom-sending-domain) ## Invoices and emails without the BeeL. mark Oct 23, 2026 · New With the branding removal add-on, available on Enterprise plans, PDFs generated from then on drop the "Generated with BeeL." footer and invoice emails drop the BeeL. mark. - [White-label](/guides/branding-and-pdf#white-label-invoices-without-beel-in-sight) ## [Issuing or scheduling a standard invoice checks the recipient's name and address](/changelog/standard-invoice-needs-recipient-name-and-address) Oct 23, 2026 · Improved A standard invoice whose recipient lacks a tax ID, name or address is rejected with `422` when you issue or schedule it, saved customer included. [Read the migration note](/changelog/standard-invoice-needs-recipient-name-and-address) ## [Stripe: sales outside the Spanish VAT territory follow the product's tax code, and stop when in doubt](/changelog/stripe-sales-outside-the-vat-territory) Oct 23, 2026 · Breaking Whether a charge is goods or services now comes from the Stripe product's tax code; unclear cases stop with a retryable `TAX_TREATMENT_NEEDS_DATA` instead of being issued. [Read the migration note](/changelog/stripe-sales-outside-the-vat-territory) ## [Stripe: the connection's threshold decides simplified invoices again, and a buyer's NIF data never comes from the card](/changelog/stripe-simplified-threshold-and-buyer-data) Oct 23, 2026 · Breaking Without complete fiscal data, a charge above the connection's simplified threshold (400 € by default) is no longer issued: it waits as a draft standard invoice. [Read the migration note](/changelog/stripe-simplified-threshold-and-buyer-data) ## [Payment events say how each one ended](/changelog/payment-events-outcome) Oct 22, 2026 · New Every payment event now carries `outcome`: `INVOICED`, `IN_PROGRESS`, `NOT_INVOICED`, `RESOLVED`, `INCIDENT` or `NO_CHANGE`. [Read the migration note](/changelog/payment-events-outcome) ## [Stripe: charges without a PaymentIntent are invoiced, and `external_payment_id` can start with `ch_` or `pr_`](/changelog/stripe-charges-without-payment-intent-and-disputes) Oct 22, 2026 · Improved A charge without a PaymentIntent, or a Stripe invoice paid outside Stripe, is now invoiced; its `external_payment_id` starts with `ch_` or `pr_`, not `pi_`. [Read the migration note](/changelog/stripe-charges-without-payment-intent-and-disputes) ## NIF validation in sandbox answers with simulated data Oct 19, 2026 · Improved In sandbox the NIF validation endpoint no longer queries the AEAT register. A well-formed NIF comes back `VALID` with the `legal_name` you sent, `legal_name_verified: false` and no `census_status`; a malformed one still comes back `INVALID`. With a Live key nothing changes. Only this endpoint is simulated: creating a company or a customer, and issuing, still check the NIF against the real AEAT census in sandbox. - `POST /v1/nif/validate` — Simulated in sandbox (test keys and the MCP server connected to Test) - [NIF validation is simulated](/verifactu/testing-in-sandbox#nif-validation-is-simulated) - [The census is real everywhere else](/verifactu/testing-in-sandbox#the-census-is-real-everywhere-else) - [Validate a NIF](/nif-validation/validateNif) ## Company stats count voided invoices by how they were voided Oct 16, 2026 · Improved The documents counted by `invoice_count` in the company stats change for voided invoices. Drafts, scheduled invoices and proformas still never count, and a corrective still counts as a document of its own. - **Do not count:** an invoice voided with the void endpoint (issued by mistake), a simplified invoice replaced by a standard one, and any corrective of an invoice voided that way. - **Count:** an invoice voided by a total corrective keeps counting, together with that corrective, so the pair counts as two. - **Still not a cursor.** Voiding an invoice lowers the count and rectifying one for its full amount raises it by one. `last_invoice_at` follows the same set and can move backwards. - `GET /v1/accounts/{account_id}/companies/stats` — New rule for `invoice_count` and `last_invoice_at` - [Get invoice stats per company](/companies/listCompanyStats) ## Exports add a Suplidos sheet for disbursements Oct 16, 2026 · New The sheet goes at the end of the workbook, after the sheets of the formats you asked for. Columns: «Número factura», «Fecha expedición», «Cliente», «NIF cliente», «Factura origen», «NIF emisor origen» and «Importe factura origen». The amount is the `total_to_pay` of the source invoice, or the line total for a manual disbursement with no linked invoice. - **It is not a format.** It is added whatever `formats` you send, and you cannot request it or opt out of it. Code that reads sheets by position is unaffected; code that expects a fixed number of sheets may need a change. - **A source invoice you cannot see** shows only its number, when known, with the issuer NIF and amount empty. - `POST /v1/companies/{company_id}/invoices/exports` — Adds the `Suplidos` sheet when there are disbursement lines - [Export invoices](/invoices/createCompanyInvoiceExport) - [Suplidos](/verifactu/suplidos) ## The invoice list date range uses the operation date when there is one Oct 16, 2026 · Breaking Before, `date_from` and `date_to` always matched the issue date. Now they match the operation date (`operation_date`) of invoices that have one, and the issue date of the rest. Both bounds stay inclusive. - **Who notices:** anyone issuing invoices whose operation date falls in a different period from the issue date. Those invoices now appear in the range of their operation date. - **Exports are not affected:** the `filters.date_from` and `filters.date_to` of an export still match the issue date. - `GET /v1/companies/{company_id}/invoices` — `date_from` / `date_to` match the operation date when set - `GET /v1/invoices` — Same change on the deprecated route - [List invoices](/invoices/listCompanyInvoices) ## Sorting by invoice number is numeric, and payment_date survives a correction Oct 16, 2026 · Improved Small corrections to the invoice list and the invoice resource. - **`sort_by=invoice_number`** sorts by series code and then by the number within the series, compared numerically. Ties on any sort field are broken by series code, then number, then id, in the requested direction, so pages are stable. - **`payment_date`** is present once a payment has been recorded and stays through later status changes (`RECTIFIED`, `VOIDED`). Before, the contract said it only appeared on `PAID` invoices. - `GET /v1/companies/{company_id}/invoices` — Numeric order for `invoice_number` and a stable tie-break - [List invoices](/invoices/listCompanyInvoices) ## Unpaid invoices past their due date now move to OVERDUE Oct 16, 2026 · Breaking `OVERDUE` was already in the `status` enum, but nothing ever set it: an unpaid invoice past its due date kept `ISSUED` or `SENT`. Now a daily process moves it to `OVERDUE`. It applies to unpaid `ISSUED` or `SENT` invoices with a total above zero whose `due_date` is earlier than the current day in Europe/Madrid, including invoices issued before this change. - **A filter on `status=SENT` or `status=ISSUED` returns fewer invoices.** The overdue ones now carry `OVERDUE`. To list everything still waiting for payment, use the new `pending_collection_only=true` filter instead of a list of statuses. - **No webhook is sent** when an invoice becomes `OVERDUE`. Read the status from the invoice or the list. - **It can lag behind the due date**, because the process runs once a day. Marking the invoice paid moves it to `PAID` as before. - **What to do:** if your code treats an unknown `status` as an error, or maps statuses to your own, add `OVERDUE`. - `GET /v1/companies/{company_id}/invoices` — Overdue invoices come back with `status: OVERDUE` - [List invoices](/invoices/listCompanyInvoices) ## Filter invoices pending collection Oct 16, 2026 · New The company invoice list accepts `pending_collection_only`. With `true` it returns only `STANDARD`, `SIMPLIFIED` or `CORRECTIVE` invoices in `ISSUED`, `SENT`, `OVERDUE` or `RECTIFIED` with no `payment_date`. A corrective invoice whose original is `VOIDED` and unpaid is left out, because nothing is owed or refunded for that pair; if the original was paid, the corrective is included. - **It combines with the other filters**, so a `status` or `type` outside that set returns an empty list. - **`false`, the default, does not filter.** Existing requests are unchanged. - `GET /v1/companies/{company_id}/invoices` — New query parameter `pending_collection_only` - [List invoices](/invoices/listCompanyInvoices) ## VeriFactu records accepted with errors get their own status: ACCEPTED_WITH_ERRORS Oct 16, 2026 · Breaking Until now a record the AEAT accepted while reporting errors in it was published as `ACCEPTED`, with an `error_code` alongside. It now has its own value, `ACCEPTED_WITH_ERRORS`, and `ACCEPTED` means accepted without remarks. This applies to records accepted before this change too. - **`verifactu_status=ACCEPTED` returns fewer invoices**: the ones accepted with errors match `ACCEPTED_WITH_ERRORS`. - **`verifactu.status.updated` can carry `ACCEPTED_WITH_ERRORS`** in `new_status` and `previous_status`. The record stands at the AEAT and its QR is valid, but the flagged data must be reviewed. - **`error_code` is now described once, as `VeriFactuErrorCode`.** It is still a string: the AEAT's numeric code (for example `1105`) or a BeeL. code such as `RECIPIENT_VAT_NOT_IN_VIES` when the submission was refused before reaching the AEAT. Generated clients may get a new type name. - **What to do:** if you validate the status against a closed enum, add `ACCEPTED_WITH_ERRORS` and treat any value you do not recognise as unknown, since more may be added. - `GET /v1/companies/{company_id}/invoices` — `verifactu_status` accepts `ACCEPTED_WITH_ERRORS` - `GET /v1/companies/{company_id}/invoices/{invoice_id}` — `verifactu.submission_status` can be `ACCEPTED_WITH_ERRORS` - [Submission states](/verifactu/submission-states) - [Accepted with errors](/verifactu/handling-rejections#accepted-with-errors) - [VeriFactu status webhook](/webhook-events/onVeriFactuStatusUpdated) ## The VeriFactu status webhook reports a new rejection reason and the real previous status Oct 16, 2026 · Improved Two changes to `verifactu.status.updated`. The payload keeps its shape. - **A new reason for a rejection sends a webhook.** While a record stays `REJECTED`, a different `error_code` or public `error_message` now triggers a delivery with `previous_status` and `new_status` both `REJECTED`. Handlers that assume the status always changes should accept this case. - **`previous_status` follows the invoice, not only the record.** It is the status of the invoice's record of the same `operation` just before the change, also when a new submission replaces a rejected one. It is omitted only on the first notification of each `operation`, so the first notification of a cancellation still has no `previous_status`. - [VeriFactu status webhook](/webhook-events/onVeriFactuStatusUpdated) - [Submission states](/verifactu/submission-states) ## Stripe: a buyer with a NIF always gets a standard invoice, and the simplified threshold is deprecated Oct 9, 2026 · Improved Three changes to how a connected Stripe account is invoiced. None of them changes an invoice that already exists, and no request or response changes shape. - **A buyer with a NIF (or foreign identifier) and a complete address always receives a `STANDARD` invoice**, whatever the amount. Before, a charge below the connection's threshold was issued as `SIMPLIFIED`, which never carries the buyer's NIF. Without that data the charge still gets a `SIMPLIFIED` invoice up to 3 000 €. - **A charge that cannot be invoiced is saved as a draft** instead of waiting as a skipped event: a charge above 3 000 € whose buyer has no NIF or address, and a charge whose NIF the AEAT definitively rejects. The draft appears in **Needs attention**, and on Live connections BeeL. emails the issuer. Complete the recipient and issue it. - **`simplificada_threshold` is deprecated.** The API still accepts and returns it, with the same validation, but its value no longer affects the invoice type. You can stop sending it. - **What to do:** nothing is required. If you relied on the threshold to keep small sales to identified buyers as simplified invoices, those sales are now standard invoices. To avoid drafts, collect tax IDs and the full billing address in Stripe. - `GET /v1/companies/{company_id}/payment-connections` — `simplificada_threshold` is returned but deprecated and ignored - `PATCH /v1/companies/{company_id}/payment-connections/{connection_id}` — `simplificada_threshold` is still accepted but deprecated and ignored - [What invoice gets generated](/stripe/generated-invoices#forward-invoices-standard-vs-simplified) - [Charges that cannot be invoiced automatically](/stripe/generated-invoices#charges-that-cannot-be-invoiced-automatically) - [Connection settings](/stripe/connection-settings#simplified-threshold-deprecated) ## Stripe: manual 0 % rates and the buyer's country on paid invoices Oct 8, 2026 · Improved Two changes to how a connected Stripe account is invoiced. Neither one changes an invoice that already exists. - **A manual 0 % tax rate in Stripe no longer leaves the charge without an invoice** when the buyer is in the peninsula or the Balearic Islands. This is the rate some platforms create by default. BeeL. applies the default exemption reason your company declared, or asks you to declare it. Buyers in the Canary Islands, Ceuta or Melilla, buyers from other countries, and payments with no postal code still wait in **Needs attention**. - **`invoice.paid` now sees the buyer's country.** When neither the Stripe invoice nor its customer carries one, BeeL. takes it from the billing address of the payment that paid the invoice, so both events of the same charge see the same buyer. - **A buyer outside Spain with an incomplete address** is no longer invoiced as if the sale were Spanish. If the sale cannot go on a simplified invoice, the charge waits with a draft to complete, as it already did for the payment event. - **What to do:** if you sell exempt with a 0 % rate in Stripe, declare your default exemption reason in BeeL. under Settings > Taxes. If you sell outside Spain, collect the full billing address (street, city, postal code and country) at checkout. - [Charges at 0 %](/stripe/configuracion-impuestos#charges-at-0) - [Buyers outside Spain](/stripe/generated-invoices#buyers-outside-spain) - [Data conversion](/stripe/data-conversion) - [Connection settings](/stripe/connection-settings#auto-invoicing) ## [A unit price with more than 4 decimals is rejected, not rounded](/changelog/unit-price-more-than-4-decimals-rejected) Oct 2, 2026 · Breaking A `unit_price` with more than 4 significant decimals now answers `422 LINE_UNIT_PRICE_TOO_MANY_DECIMALS` instead of being rounded silently. Round to 4 decimals, or send the line total. [Read the migration note](/changelog/unit-price-more-than-4-decimals-rejected) ## [More than one NIF on the API plan: a 403 that routes to sales](/changelog/api-plan-more-than-one-nif-contact-sales) Sep 30, 2026 · Breaking On the API plan with no agreed price, a second NIF, or going Live with several, answers `403 CONTACT_SALES_REQUIRED` with a link to sales. [Read the migration note](/changelog/api-plan-more-than-one-nif-contact-sales) ## [Province is only required for addresses in Spain](/changelog/province-optional-outside-spain) Sep 28, 2026 · Breaking `province` is no longer required on an `Address` outside Spain: a foreign customer or inline recipient without one is accepted. A Spanish address without it still answers `422 PROVINCE_EMPTY`. [Read the migration note](/changelog/province-optional-outside-spain) ## [Simplified invoice exchanges are recorded with VeriFactu](/changelog/simplified-exchange-recorded-with-verifactu) Sep 28, 2026 · Breaking With VeriFactu, exchanging simplified invoices now issues the full invoice and records it as `F3`. `SIMPLIFIED_EXCHANGE_NOT_RECORDABLE` now only means a simplified invoice issued without VeriFactu. [Read the migration note](/changelog/simplified-exchange-recorded-with-verifactu) ## [The VeriFactu status webhook says whether it reports the registration or the cancellation](/changelog/verifactu-status-webhook-operation) Sep 28, 2026 · New `verifactu.status.updated` now carries `operation`: `REGISTRATION` or `VOID`. AEAT's answer to a cancellation reaches you by webhook without a lookup. [Read the migration note](/changelog/verifactu-status-webhook-operation) ## [Corrective invoices and voids follow the rules of the law](/changelog/correctives-and-voids-follow-the-law) Sep 27, 2026 · Breaking A corrective can no longer rectify more than was invoiced, has a deadline, and can fix the recipient's data; a sent or paid invoice is voided only if issued in error. [Read the migration note](/changelog/correctives-and-voids-follow-the-law) ## [Series by type, and what AEAT would reject is refused before numbering](/changelog/invoice-checks-before-numbering) Sep 27, 2026 · Breaking A series numbers only its own type, and an invoice AEAT would reject answers `422` before a number is used. Zero-total invoices are accepted and issued paid. [Read the migration note](/changelog/invoice-checks-before-numbering) ## Exchange simplified invoices for a full invoice Sep 27, 2026 · New When a customer who paid with a simplified invoice asks for an invoice with their details, `POST /v1/companies/{company_id}/invoices/simplified-exchanges` issues a `STANDARD` invoice with the lines of up to 50 simplified invoices and the `recipient` you send. It is not a corrective invoice: it documents the same operations again, identifying the customer. The new invoice lists the ones it replaces in `replaced_invoice_ids`, and each simplified invoice becomes `VOIDED` with the new `void_cause` value `EXCHANGED`, in the same act. The exchange invoice cannot be voided afterwards; if it is wrong, correct it with a corrective invoice. When the invoice would be recorded with VeriFactu, the request answered `422 SIMPLIFIED_EXCHANGE_NOT_RECORDABLE` and nothing was issued. **Update:** with VeriFactu the exchange invoice is now issued and recorded as `F3`, and `SIMPLIFIED_EXCHANGE_NOT_RECORDABLE` only names a simplified invoice issued without VeriFactu. An `F3` exchange invoice cannot be corrected yet. See [Simplified invoice exchanges are recorded with VeriFactu](/changelog/simplified-exchange-recorded-with-verifactu). - **Rejections:** `422 EXCHANGE_REQUIRES_SIMPLIFIED` when an id is not a simplified invoice; `422 SIMPLIFIED_NOT_EXCHANGEABLE` when it is not issued, or was already voided, exchanged or corrected; voiding the exchange invoice answers `422 EXCHANGE_INVOICE_NOT_VOIDABLE`. - **If you read `void_cause`** with a strict enum, add `EXCHANGED`; `replaced_invoice_ids` is a new optional field on every invoice response. - `POST /v1/companies/{company_id}/invoices/simplified-exchanges` — New: a full invoice in exchange for simplified invoices - [Exchange simplified invoices](/invoices/createCompanySimplifiedExchange) - [Simplified vs standard](/verifactu/simplified-vs-standard) ## [Tax rates are judged by the operation date and the withholding by the issuer](/changelog/tax-rates-by-date-and-issuer) Sep 27, 2026 · Breaking Temporary VAT and surcharge rates only on operations of their period, `0.625` becomes `0.62`, companies cannot withhold individuals' IRPF rates, and some regime keys are refused. [Read the migration note](/changelog/tax-rates-by-date-and-issuer) ## [A new series needs its document type, and what else changes in this release](/changelog/series-type-required-and-behaviour-changes) Sep 25, 2026 · Breaking A new series needs `document_type`, several rejections now carry a specific code or status, and an issued invoice's PDF never changes. Plus behaviour changes. [Read the migration note](/changelog/series-type-required-and-behaviour-changes) ## [CLI 0.3.0: commands follow the routes under the NIF](/changelog/cli-0-3-0) Sep 24, 2026 · Breaking CLI 0.3.0 calls only the routes that name the company, so most commands change name: `beel companies list-invoices ` is now `beel invoices list`. [Read the migration note](/changelog/cli-0-3-0) ## [Webhook retries now span about 3 days](/changelog/webhook-retries-span-three-days) Sep 24, 2026 · Improved A failed webhook delivery is now retried 7 times over about 3 days instead of for about a minute, so a short outage of your endpoint no longer loses events. [Read the migration note](/changelog/webhook-retries-span-three-days) ## [A recurring template's history lists what did not happen too](/changelog/recurring-history-every-entry) Sep 22, 2026 · Breaking The history now includes failed runs, skipped periods and pauses, each with a `type`. For those entries `invoice_id` is `null`. [Read the migration note](/changelog/recurring-history-every-entry) ## [A simplified invoice can no longer name an identified recipient](/changelog/simplified-invoice-no-identified-recipient) Sep 22, 2026 · Breaking Creating or updating a `SIMPLIFIED` invoice whose recipient has a NIF or an alternative identifier now answers `400 SIMPLIFIED_INVOICE_FORBIDS_IDENTIFIED_RECIPIENT`. Issue it as `STANDARD`. [Read the migration note](/changelog/simplified-invoice-no-identified-recipient) ## [Where the contract and the API disagreed, they now agree](/changelog/contract-and-api-realigned) Sep 21, 2026 · Fixed A check of the published contract against the live API found a dozen differences. A few were fixed in the API, and the rest in the contract. [Read the migration note](/changelog/contract-and-api-realigned) ## [Export lines take regime 02 on their own](/changelog/export-lines-take-regime-02) Sep 21, 2026 · Fixed A VAT line exempt under art. 21 or 22 that arrives with `regime_key: "01"` is stored with `"02"`, instead of being refused by AEAT after issue. [Read the migration note](/changelog/export-lines-take-regime-02) ## Member grants carry the company's name Sep 21, 2026 · New Each grant in a member's response and in the grants list now carries `company_name` next to `company_id`, so you can name the company without resolving every id against the account's companies. It is optional and may be `null` for a company that has no name yet. It never falls back to the id. - `GET /v1/accounts/{account_id}/members/{member_id}/grants` — Each grant carries company_name - [List a member's grants](/members/listAccountMemberGrants) - [Retrieve a member](/members/getAccountMember) ## [A phone number in a response no longer promises the input rules](/changelog/phone-in-responses) Sep 19, 2026 · Improved The contract stops declaring `minLength` and `pattern` on `phone` in responses; they move to `PhoneInput`. The server sends exactly what it sent before. [Read the migration note](/changelog/phone-in-responses) ## [The VeriFactu records of an invoice, each with its own status](/changelog/verifactu-records) Sep 19, 2026 · New `GET …/invoices/{invoice_id}/verifactu-records` lists the registration and, after a void, the cancellation — each with its own `submission_status`, so you can tell whether AEAT accepted the cancellation. [Read the migration note](/changelog/verifactu-records) ## [chaining_hash leaves the documentation](/changelog/chaining-hash-leaves-the-contract) Sep 17, 2026 · Improved `verifactu.chaining_hash` was declared but never sent, so it is being withdrawn. No response changes: the server behaves exactly as before. [Read the migration note](/changelog/chaining-hash-leaves-the-contract) ## [A customer used by a live recurring template cannot be deleted](/changelog/customer-delete-blocked-by-recurring) Sep 17, 2026 · Breaking Deleting a customer that an active or paused recurring template invoices is now rejected, on the single `DELETE` and row by row in the bulk delete. [Read the migration note](/changelog/customer-delete-blocked-by-recurring) ## [An OSS line keeps the destination country's VAT](/changelog/oss-keeps-the-destination-vat) Sep 17, 2026 · Fixed Our OSS examples set `percentage: 0`, which drops the destination VAT from the breakdown. The API never required it. Check your `regime_key: "17"` lines. [Read the migration note](/changelog/oss-keeps-the-destination-vat) ## [A recurring template that emails its invoices needs someone to email](/changelog/recurring-auto-send-needs-a-recipient) Sep 17, 2026 · Breaking Saving a template with `send_automatically: true` and no recipient now answers `422 SIN_DESTINATARIO_RESOLUBLE`, and malformed recipient addresses are rejected. [Read the migration note](/changelog/recurring-auto-send-needs-a-recipient) ## [Recurring templates say when they are failing, and which period they last invoiced](/changelog/recurring-is-failing-and-last-slot) Sep 17, 2026 · New `is_failing` flags a template from its first failed run, and `last_generated_scheduled_date` gives the latest period it has already invoiced. [Read the migration note](/changelog/recurring-is-failing-and-last-slot) ## [A recurring template cannot produce an invoice with a negative total](/changelog/recurring-negative-totals-rejected) Sep 16, 2026 · Breaking Negative line totals on a template, a generated invoice adding up below zero, and editing a draft to a negative total are now rejected. [Read the migration note](/changelog/recurring-negative-totals-rejected) ## [Discarding or resolving a payment event acts on the whole charge](/changelog/payment-event-actions-cover-the-whole-charge) Sep 15, 2026 · Breaking `discard`, `restore` and `resolve` on a payment event now also apply to the other events of the same charge: its failed attempts, its refunds, its dispute. [Read the migration note](/changelog/payment-event-actions-cover-the-whole-charge) ## [Recurring templates: quarterly, yearly, and an invoice cap](/changelog/recurring-invoices-cadence-and-cap) Sep 15, 2026 · New Templates gain quarterly and yearly cadences, an end after `max_invoices`, a `completion` reason, `draft_in_advance`, and the amount of the next invoice on every row. [Read the migration note](/changelog/recurring-invoices-cadence-and-cap) ## [Recurring writes reject what they used to swallow](/changelog/recurring-writes-are-strict) Sep 15, 2026 · Breaking Payment detail without a method, an inactive series, a window with no occurrence and a blank name are now rejected instead of silently discarded. [Read the migration note](/changelog/recurring-writes-are-strict) ## [Stripe connections: faster correctives, disputes you can see, and exact amounts](/changelog/stripe-refunds-disputes-and-shipping) Sep 15, 2026 · Improved A card refund gets its corrective at once, disputes and voided credit notes raise a review item, and correctives and shipping add up to the cent. [Read the migration note](/changelog/stripe-refunds-disputes-and-shipping) ## [Resuming a recurring template no longer re-invoices a period](/changelog/resume-keeps-next-generation) Sep 13, 2026 · Fixed Resuming keeps `next_generation` when it has not fallen due yet, instead of recalculating from today, which could issue a period twice or undo a skip. [Read the migration note](/changelog/resume-keeps-next-generation) ## [Payment connections and events: two unused operations retired, and a Sunset for the per-event default](/changelog/payments-cleanup) Sep 12, 2026 · Breaking Two never-documented payment-connection operations are gone today; on 11 December 2026 `charges_only` defaults to `true` and three `counts` fields and four schema aliases retire. - Retired today: `GET …/payment-connections/{connection_id}` (now `405`) and `POST …/payment-connections/{connection_id}/reactivations` (now `404`) - No operation is deprecated: listing, opening an authorization and reading a single event stay documented and served - On 11 December 2026 omitting `charges_only` on the event listing reads as `charges_only=true`; until then a request that omits it answers with `Deprecation`, `Sunset` and `Link` - `counts.ignored`, `counts.needs_action`, `counts.by_failure_reason` and the four `*ManagedPaymentEventResponse` aliases retire the same day [Read the migration note](/changelog/payments-cleanup) ## [The deprecated flat routes now retire on 9 December](/changelog/flat-routes-retire-9-december) Sep 10, 2026 · Improved The retirement date of the deprecated flat routes moves from 10 September to **2026-12-09**. Nothing stopped answering, and you have the whole window again. [Read the migration note](/changelog/flat-routes-retire-9-december) ## [next_generation is null when there is no next invoice](/changelog/next-generation-null) Sep 10, 2026 · Breaking `next_generation` now carries only the date the system will honour, and `null` otherwise: a completed template, or a paused one whose date has passed. [Read the migration note](/changelog/next-generation-null) ## [Three response fields were never guaranteed](/changelog/contract-drops-guarantees-it-never-had) Sep 8, 2026 · Improved `amount`, `currency` and `sending_history.sent_at` leave `required`. No response changes — the contract was promising something the server never did. [Read the migration note](/changelog/contract-drops-guarantees-it-never-had) ## [A payment connection says which Stripe events it invoices](/changelog/payment-connection-event-source) Sep 8, 2026 · New `event_source` (`PAYMENTS`, `INVOICES` or `BOTH`) picks which family of Stripe events a connection invoices. Existing connections are `BOTH`, which is today's behaviour. [Read the migration note](/changelog/payment-connection-event-source) ## [New webhook event: invoice.pdf.generated](/changelog/webhook-invoice-pdf-generated) Sep 8, 2026 · New `invoice.pdf.generated` tells you an invoice's PDF is stored and ready, so you can fetch it instead of polling. [Read the migration note](/changelog/webhook-invoice-pdf-generated) ## [Clearer rejections, and updates that do not re-ask the census](/changelog/clearer-rejections-and-cheaper-updates) Sep 6, 2026 · Improved A customer update only asks the AEAT census when the fiscal pair changes, the invitation `404` stops saying "pending", and readiness names an incomplete identity. [Read the migration note](/changelog/clearer-rejections-and-cheaper-updates) ## [An import row without an address is a bad row](/changelog/import-rows-without-address) Sep 6, 2026 · Breaking A customer import row with an incomplete address is now reported as a bad row instead of being created with placeholder values. [Read the migration note](/changelog/import-rows-without-address) ## [Payment connections are addressed by id](/changelog/payment-connections-by-id) Sep 6, 2026 · Breaking The `{provider}` path segment becomes `{connection_id}` on nine payment-connection paths. The old paths are gone, with no coexistence window. [Read the migration note](/changelog/payment-connections-by-id) ## [Addresses can be missing, and accept more characters](/changelog/addresses-can-be-missing) Sep 3, 2026 · Breaking `issuer.address` is optional and is no longer filled with invented values, and one character set governs every address field. [Read the migration note](/changelog/addresses-can-be-missing) ## [The API serves its own spec](/changelog/openapi-spec-endpoint) Sep 3, 2026 · New `GET /v1/openapi.yaml` and `/v1/openapi.json` serve the public contract — the same document this reference is built from, no API key needed. [Read the migration note](/changelog/openapi-spec-endpoint) ## [The PDF download waits instead of asking you to poll](/changelog/pdf-download-waits) Sep 3, 2026 · Improved `GET .../invoices/{id}/pdf` now waits for the PDF and answers `200`. `Prefer: wait=0` keeps the old pure polling behaviour. [Read the migration note](/changelog/pdf-download-waits) ## [VeriFactu is a fact of the taxpayer, not a flag per invoice](/changelog/verifactu-is-an-account-fact) Sep 3, 2026 · Breaking Whether an invoice reaches the AEAT is now decided by the NIF's regime at issue time. The per-invoice flag and three response fields are gone. [Read the migration note](/changelog/verifactu-is-an-account-fact) ## [The street number is no longer required in an address](/changelog/street-number-is-optional) Sep 2, 2026 · Improved `address.number` is now optional: omit it when the address has none, or when `street` already carries it. [Read the migration note](/changelog/street-number-is-optional) ## [New webhook event: invoice.schedule_failed](/changelog/webhook-invoice-schedule-failed) Sep 2, 2026 · New `invoice.schedule_failed` tells you a scheduled invoice could not be issued, so you find out without opening the dashboard. [Read the migration note](/changelog/webhook-invoice-schedule-failed) ## [A fully discounted line no longer kills the invoice](/changelog/invoice-zero-amount) Aug 28, 2026 · Fixed A line discounted to zero used to reject the whole invoice. Zero is now judged on the invoice total, with `INVOICE_ZERO_AMOUNT`. [Read the migration note](/changelog/invoice-zero-amount) ## VeriFactu is always on in sandbox Aug 26, 2026 · Improved Creating a company in sandbox is asking for a VeriFactu test bench, so the configuration is now born enabled and the NIF is registered with the provider on the first submission — no explicit step. In Live nothing changes: enabling VeriFactu there is still a deliberate act by the taxpayer. No existing configuration was touched. - [VeriFactu configuration](/verifactu/getCompanyVeriFactuConfiguration) ## [Four collections paginate, and branding goes wrapped](/changelog/collections-paginate-and-branding-wrapped) Aug 25, 2026 · Breaking Four collections now paginate — without `limit` you get the first 20 — and the three branding responses come wrapped in `{success, data, meta}`. [Read the migration note](/changelog/collections-paginate-and-branding-wrapped) ## [The census is checked before the invoice is numbered](/changelog/census-check-before-numbering) Aug 23, 2026 · Breaking Issuing with VeriFactu on checks the recipient against the AEAT census first: an uncensused recipient answers `422`, and no number is spent. [Read the migration note](/changelog/census-check-before-numbering) ## [OAuth2 leaves the public contract](/changelog/oauth2-out-of-the-contract) Aug 23, 2026 · Improved OAuth2 is gone from the spec. Each operation now states the scope it requires in its own description. API key auth is unchanged. [Read the migration note](/changelog/oauth2-out-of-the-contract) ## [Three filters returned the wrong rows](/changelog/filters-that-were-silently-dropped) Aug 22, 2026 · Breaking A literal `%` in a filter value dropped the filter. `series_code` matched any series containing the code. Sorting customers ignored the documented field names. **Only `series_code` changes a response you may rely on today.** [Read the migration note](/changelog/filters-that-were-silently-dropped) ## [Rate limits now count per IP](/changelog/global-rate-limit) Aug 22, 2026 · Breaking The published global ceiling drops to 1000 req/60 s to match what was already enforced. Strict and Global count **per IP**, not per credential. [Read the migration note](/changelog/global-rate-limit) ## [Request bodies limited to 2 MB](/changelog/request-body-limits) Aug 22, 2026 · Breaking Bodies above 2 MB answer `413 REQUEST_BODY_TOO_LARGE`. `411 LENGTH_REQUIRED` is gone — chunked encoding is accepted. [Read the migration note](/changelog/request-body-limits) ## [Lost updates answer 409](/changelog/concurrent-modification) Aug 21, 2026 · Improved Two overlapping updates: the second now answers `409 CONCURRENT_MODIFICATION` instead of silently discarding the first. [Read the migration note](/changelog/concurrent-modification) ## [Contract drops what was never sent](/changelog/contract-declares-what-the-server-does) Aug 21, 2026 · Fixed Several documented responses and one header were never actually sent. They are out of the contract; the server did not change. [Read the migration note](/changelog/contract-declares-what-the-server-does) ## [Breakdowns, series and schedules](/changelog/invoicing-contract-detail) Aug 21, 2026 · Improved Tax breakdowns travel complete and add up. Series publish the next number they will assign. Recurring invoices declare `frequency` in the request. [Read the migration note](/changelog/invoicing-contract-detail) ## [Import managed accounts from a file](/changelog/managed-account-imports) Aug 21, 2026 · New Create managed accounts in bulk from a spreadsheet — template, preview, apply — and see where each claim stands. [Read the migration note](/changelog/managed-account-imports) ## [Semantic rejections answer 422](/changelog/semantic-rejections-are-422) Aug 21, 2026 · Improved A body that parses but breaks a rule now answers `422` with a code and populated `details`, not an empty `400`. [Read the migration note](/changelog/semantic-rejections-are-422) ## [Unknown query parameters rejected from 3 September](/changelog/strict-query-parameters-and-rate-limits) Aug 21, 2026 · Breaking From **2026-09-03** the flat routes reject an undeclared query parameter with `400` instead of ignoring it. Until then they answer `200` with a `BeeL-Warning` header naming it. [Read the migration note](/changelog/strict-query-parameters-and-rate-limits) ## [Void cause on voided invoices](/changelog/invoice-void-cause) Aug 21, 2026 · New Voided invoices now carry `void_cause`, `void_reason` and `voided_at`, so a direct void and a total corrective are told apart without a second call. [Read the migration note](/changelog/invoice-void-cause) ## [One shape for lists and deletes](/changelog/canonical-surface-consistency) Aug 17, 2026 · Breaking Lists answer `data.`, deletes answer `204` unless the body informs, and every create returns `Location`. `DELETE products/bulk` takes `?ids=` instead of a body. - Lists: `data` is never a bare array anymore. Six lists that answered `data: [...]` + root `pagination` (companies of an account, series, recurring invoices, payment events, request logs, sent emails) now answer `data.` + `data.pagination` — deprecated flat aliases included, since they share the schema. Five unpaginated lists (company stats, email indicators, payment connections, recurring history, series defaults) are wrapped in `data.{plural}` with no pagination block. - Deletes: `DELETE .../customers/{id}` and `DELETE .../representation` now answer `204` with no body — their old `200` bodies carried nothing you could not already know. Bulk deletes and `DELETE .../activations` keep their `200` body (partial results and the computed `effective_at` are only knowable from the response). - `DELETE /v1/companies/{company_id}/products/bulk` no longer takes a request body — a body on DELETE has no defined semantics and intermediaries may drop it. Send `?ids=` (comma-separated, max 100 per request), same as customers/bulk. - Every single-resource `201` now carries a `Location` header pointing at the created resource's canonical GET — including actions that produce a resource (corrective, convert, derivations, generate, payment-event draft). Claim tokens point at their `claim_url`. Bulk creations carry none: there is no single URI to point at. - `PUT /v1/configuration/series/{series_id}` is now deprecated like the rest of the flat series routes. It has no drop-in successor: the canonical `PATCH /v1/companies/{company_id}/series/{series_id}` behaves the same for every body except an explicit `description: null`, which the old `PUT` ignored and the `PATCH` honours by clearing the field. - Declarative sweep: every live operation now documents `429` and `500`, every tag is declared, and the account companies operations moved from the `PublicCompanies` tag to `AccountCompanies`. - These changes ship without a grace window: measured traffic on the affected shapes was test-mode only. If your integration reads any of the old list shapes, adapt the paths above — everything else about each operation is unchanged. [Read the migration note](/changelog/canonical-surface-consistency) ## A webhook URL on a private network is rejected when you register it Aug 17, 2026 · Improved Registering or changing a subscription URL that points to a private or internal network address now answers `422 URL_TARGET_NOT_ALLOWED`, instead of creating a subscription that would never receive a delivery. A host that does not resolve yet is still accepted, so you can register before your DNS is live. - [URL_TARGET_NOT_ALLOWED](/errors/URL_TARGET_NOT_ALLOWED) - [Create a subscription](/webhooks/createAccountWebhookSubscription) ## [external_reference is now external_ref](/changelog/external-ref-rename) Aug 13, 2026 · Breaking The invoice field first announced as `external_reference` is now called `external_ref`. Responses already emit the new name; the old one is still accepted when you write, as a deprecated alias. - Responses emit `external_ref` — the old name is no longer returned - Writes still accept `external_reference`, as a deprecated alias - Affects the request body of the create-invoice routes and the `GET /v1/invoices` query filter - Nothing has stopped working, and no removal date is announced yet [Read the migration note](/changelog/external-ref-rename) ## [Webhook subscriptions report their health, and pause when the endpoint is dead](/changelog/webhook-endpoint-health) Aug 12, 2026 · New A subscription now says how its endpoint is doing, emails you when it keeps failing, and is paused after 25 failed deliveries over more than 48 hours. [Read the migration note](/changelog/webhook-endpoint-health) ## [Resources under the NIF](/changelog/resources-under-the-nif) Aug 7, 2026 · Breaking New: an account can hold several NIFs, each addressed in the path. As a result the old flat routes are deprecated — 82 operations gain a `Sunset` date, and all but three a successor route, and keep answering until then. - 82 operations are deprecated, each with a `Sunset` date and, for all but three, a successor route - Nothing is removed — every deprecated route keeps answering until its `Sunset` date - Deprecated routes carry `Deprecation: true`, `Sunset` and, where a successor is declared, `Link: ; rel="successor-version"` - The three replacing `PUT`s (customer, product, recurring invoice) declare no successor: the canonical `PATCH` merges instead of replacing, so it is not a drop-in [Read the migration note](/changelog/resources-under-the-nif) ## [Filter invoices by several statuses](/changelog/multi-status-invoice-filter) Aug 3, 2026 · Improved The `status` filter on `GET /v1/invoices` accepts a comma-separated list, so one request covers several statuses. [Read the migration note](/changelog/multi-status-invoice-filter) ## [external_reference on invoices](/changelog/invoice-external-reference) Jul 18, 2026 · New Invoices accept an `external_reference` — your own order id — that you can filter by and that is enforced as unique. [Read the migration note](/changelog/invoice-external-reference) ## [Disbursements (suplidos): pass-through payments](/changelog/suplidos) Jul 15, 2026 · New Invoice lines carry a `line_type`. Set `SUPLIDO` to pass through amounts paid in your client’s name, outside the taxable base. [Read the migration note](/changelog/suplidos) ## [Read your API request logs](/changelog/request-logs) Jun 15, 2026 · New A Request Logs endpoint family lets you inspect what your own API keys have called — method, path, status, timing and the full detail. [Read the migration note](/changelog/request-logs) ## [BeeL. CLI](/changelog/cli) Jun 13, 2026 · New Official CLI on npm as `@beel_es/cli`. Run any endpoint from the terminal, sandbox by default, nothing to install. [Read the migration note](/changelog/cli) ## [Node.js / TypeScript SDK](/changelog/node-sdk) Jun 11, 2026 · New Official Node.js / TypeScript SDK on npm as `@beel_es/sdk`, fully typed from the spec. [Read the migration note](/changelog/node-sdk) ## [v1.3.0 — contract fixes](/changelog/v1-3-0) Jun 10, 2026 · Breaking Idempotency keys accept any string, `country` becomes optional, and webhook URLs must be HTTPS. [Read the migration note](/changelog/v1-3-0) ## [Active-company header renamed](/changelog/active-company-header) Jun 9, 2026 · Improved The header that selects the active company is now `Beel-Active-Company`, was `X-Active-Profile`. [Read the migration note](/changelog/active-company-header) ## [v1.2.0 — VeriFactu validation pack](/changelog/v1-2-0) May 22, 2026 · Breaking Invalid fiscal combinations now fail at request time with specific `422`s. Adds a public error-code catalog, metadata filters, the RD-ley rates and BIZUM. [Read the migration note](/changelog/v1-2-0) ## [v1.1.0 — recipient and payment_info](/changelog/v1-1-0) May 6, 2026 · Breaking Invoice `recipient` and `payment_info` become structured objects, and new series get sensible defaults. [Read the migration note](/changelog/v1-1-0) ## [v1.0.3 — exemptions and document types](/changelog/v1-0-3) Apr 18, 2026 · Breaking VeriFactu exemptions and document types, plus stricter validation on fiscal fields. [Read the migration note](/changelog/v1-0-3) ## [v1.0.1 — operation_date](/changelog/v1-0-1) Mar 26, 2026 · Breaking `issue_date` is now always today, and a new `operation_date` carries the date the service was actually rendered. [Read the migration note](/changelog/v1-0-1) ## [BeeL. API v1.0 — public launch](/changelog/api-launch) Mar 18, 2026 · Release The BeeL. API is publicly available: invoicing, customers, products, tax configuration and VeriFactu, with a 7-day trial. [Read the migration note](/changelog/api-launch) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Series by type, and what AEAT would reject is refused before numbering A series numbers only its own type, and an invoice AEAT would reject answers `422` before a number is used. Zero-total invoices are accepted and issued paid. Sep 27, 2026 · Breaking Two changes move failures earlier. A series numbers only the documents of its own type, as the invoicing regulation requires. And with VeriFactu, BeeL. builds the record it will send to AEAT before numbering the invoice and checks it: what used to be an issued invoice with its registration rejected is now a `422`, with the invoice still a draft and the number unused. Invoices already issued do not change. ## What breaks - **A series numbers only its own type.** A series still `UNASSIGNED` numbers nothing: creating, editing or issuing with it answers `422 SERIES_INCOMPATIBLE_DOC_TYPE`. Every live `UNASSIGNED` series was given the type it numbered most (`STANDARD` when it numbered none or there was a tie). A company whose only default was such a series may have no default `STANDARD` series now: a standard invoice without `series_id` answers `422 SERIES_DEFAULT_NOT_FOUND` until you create or mark one. Drafts and recurring templates pointing at a series that now has another type fail with `SERIES_INCOMPATIBLE_DOC_TYPE` until you change their series. - **`document_type` is locked once a series has numbered.** Changing it answers `400 SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES`, except to give an `UNASSIGNED` series its type. Listing series with `document_type` no longer includes the `UNASSIGNED` ones. - **The VeriFactu record is checked before numbering.** More than 12 different tax groups on one invoice answers `422 INVOICE_TAX_BREAKDOWN_TOO_LONG`; a tax or surcharge rate with more than two decimals, `422 INVOICE_TAX_RATE_TOO_MANY_DECIMALS`; any other rule of AEAT's validations the record breaks, its specific code or `422 VERIFACTU_RECORD_NOT_DECLARABLE`, with the AEAT section in the message. - **The recipient's `legal_name` fits AEAT's 120 characters, counted as AEAT counts them.** Under VeriFactu a longer one answers `422 FIELD_TOO_LONG` at issue. Length is measured in UTF-16 code units: an emoji or any character outside the Basic Multilingual Plane counts as two, so a name that looks like 119 characters can be too long. The operation description sent to AEAT is shortened to its 500-unit limit, never rejected. - **An invoice of disbursements only is refused again**, with `422 INVOICE_REQUIRES_AT_LEAST_ONE_NORMAL_LINE`, a corrective included: put the `SUPLIDO` line on the invoice of the operation it belongs to. - **`operation_date` more than twenty years old** answers `422 OPERATION_DATE_TOO_OLD`, on create, edit and issue. - **A simplified invoice cannot document an operation located outside Spain.** A line with `exemption_reason` `NO_SUJETA_LOCALIZACION`, like `EXENTA_ART_25` before it, answers `400 SIMPLIFICADA_FORBIDS_CROSS_BORDER`, now also when an edit makes the invoice `SIMPLIFIED`, when it is issued, and on an `R5` corrective that adds such a line. ## Does this affect you? - If you pass a `series_id` stored long ago, check its `document_type` with `GET /v1/companies/{company_id}/series/{series_id}`. - If you issue standard invoices without `series_id`, check `GET /v1/companies/{company_id}/series/defaults`. - If your recipients' names can carry emojis or long legal forms, cut them to 120 UTF-16 code units (`string.length` in JavaScript, Java or C#). - If you create invoices of disbursements only, or that total 0 and then mark them paid, adjust that flow. ## What else changed - **The default `SIMPLIFIED` and `CORRECTIVE` series are created on first use** (code `S` or `R`, or the next free one). Only a missing default `STANDARD` series still answers `SERIES_DEFAULT_NOT_FOUND`, and the issuing readiness reports only that one. - **An invoice whose total is 0 is accepted and issued as `PAID`**, with `payment_date` equal to `issue_date`, and registered with AEAT with a total of 0. `INVOICE_ZERO_AMOUNT` is retired. Calling `mark-paid` or `mark-sent` on it answers `400`: it is already paid. - **Fewer asynchronous rejections.** These invoices used to reach AEAT and come back `REJECTED`; now they fail on the request, so an integration that handles `verifactu.status.updated` sees fewer rejections and more `422`s. ## Endpoints - `POST /v1/companies/{company_id}/invoices` — 422 SERIES_INCOMPATIBLE_DOC_TYPE, INVOICE_REQUIRES_AT_LEAST_ONE_NORMAL_LINE, OPERATION_DATE_TOO_OLD; a total of 0 is accepted - `POST /v1/companies/{company_id}/invoices/{invoice_id}/issue` — 422 INVOICE_TAX_BREAKDOWN_TOO_LONG / INVOICE_TAX_RATE_TOO_MANY_DECIMALS / VERIFACTU_RECORD_NOT_DECLARABLE / FIELD_TOO_LONG before numbering - `PATCH /v1/companies/{company_id}/series/{series_id}` — 400 SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES - `GET /v1/companies/{company_id}/series` — document_type returns only the series of that type ## Where to go next - [Series and numbering](/guides/series-and-numbering) - [Issue an invoice](/invoices/issueCompanyInvoice) - [Handling rejections](/verifactu/handling-rejections) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # external_reference on invoices Invoices accept an `external_reference` — your own order id — that you can filter by and that is enforced as unique. Jul 18, 2026 · New Invoices now accept an optional external_reference — your own order / cart / contract id — that BeeL. stores, returns, lets you filter by, and enforces as a business-uniqueness key. It's the right tool for "one invoice per order", separate from the Idempotency-Key (which guards request retries). ## What else changed - **`external_reference` on `POST /v1/invoices`** — send your order id (e.g. `ORD-2025-0042`). It's stored, echoed back on reads, and filterable via `GET /v1/invoices?external_reference=ORD-2025-0042`. - **At most one live invoice per reference** — creating a second standard/simplified invoice with the same `external_reference` returns `409 INVOICE_DUPLICATE_EXTERNAL_REFERENCE`. Delete the existing one and you can recreate it. - **It is NOT the `Idempotency-Key`** — the idempotency key protects request *retries* (use a fresh UUID per attempt) and survives deletion by design; `external_reference` is a durable *business* key that reflects the current state. Use both, for different jobs. - **Isolated per environment** — the same reference can exist once in sandbox and once in live. ## Endpoints - `POST /v1/invoices` — Accepts optional external_reference; returns 409 INVOICE_DUPLICATE_EXTERNAL_REFERENCE on a live duplicate - `GET /v1/invoices` — New external_reference query filter ## Where to go next - [Idempotency guide](/guides/idempotency) - [Error reference](/errors/INVOICE_DUPLICATE_EXTERNAL_REFERENCE) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # The invoice list date range uses the operation date when there is one `date_from` and `date_to` on the invoice list now match the operation date when the invoice has one, and the issue date otherwise. Oct 16, 2026 · Breaking Before, `date_from` and `date_to` always matched the issue date. Now they match the operation date (`operation_date`) of invoices that have one, and the issue date of the rest. Both bounds stay inclusive. ## What else changed - **Who notices:** anyone issuing invoices whose operation date falls in a different period from the issue date. Those invoices now appear in the range of their operation date. - **Exports are not affected:** the `filters.date_from` and `filters.date_to` of an export still match the issue date. ## Endpoints - `GET /v1/companies/{company_id}/invoices` — `date_from` / `date_to` match the operation date when set - `GET /v1/invoices` — Same change on the deprecated route ## Where to go next - [List invoices](/invoices/listCompanyInvoices) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Sorting by invoice number is numeric, and payment_date survives a correction `sort_by=invoice_number` orders by series and then by number (`F-9` before `F-10`), ties are broken the same way, and `payment_date` stays after rectifying or voiding. Oct 16, 2026 · Improved Small corrections to the invoice list and the invoice resource. ## What else changed - **`sort_by=invoice_number`** sorts by series code and then by the number within the series, compared numerically. Ties on any sort field are broken by series code, then number, then id, in the requested direction, so pages are stable. - **`payment_date`** is present once a payment has been recorded and stays through later status changes (`RECTIFIED`, `VOIDED`). Before, the contract said it only appeared on `PAID` invoices. ## Endpoints - `GET /v1/companies/{company_id}/invoices` — Numeric order for `invoice_number` and a stable tie-break ## Where to go next - [List invoices](/invoices/listCompanyInvoices) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Void cause on voided invoices Voided invoices now carry `void_cause`, `void_reason` and `voided_at`, so a direct void and a total corrective are told apart without a second call. Aug 21, 2026 · New Every voided invoice now carries `void_cause`, `void_reason` and `voided_at`. `VOIDED` was reachable two ways — a direct void, or a TOTAL corrective issued over the invoice — and until now telling them apart meant looking for a corrective invoice yourself. The fields come back on the invoice object, both on the single read and on every row of the list. ## What else changed - **`void_cause`** is `VOID_REQUEST` (voided directly via `POST /v1/companies/{company_id}/invoices/{invoice_id}/void`) or `TOTAL_CORRECTIVE` (left voided by a TOTAL corrective invoice issued over it). Only present on voided invoices. - **No extra call.** It ships in the same response as the invoice — including each row of `GET /v1/companies/{company_id}/invoices` — so you no longer need a second request to find out whether a corrective exists. - **`void_reason`** is the reason recorded at the time, and **`voided_at`** the exact instant of the void. - **Do not read the VeriFactu state to tell the two apart.** They are different tax events: a void reports the cancellation of the original record to the AEAT, while a TOTAL corrective cancels nothing — it reports a *new* record (R1–R5) and leaves the original as it was. The reporting state of the original invoice therefore varies by case and is not a reliable signal; `void_cause` is. - **`void_date` on the void request no longer has any effect.** A void is a system instant, not a date you choose: `voided_at` is set at the moment it happens. Invoices voided before this field existed carry their void day at `00:00Z`, because only the day was kept for them. ## Endpoints - `GET /v1/companies/{company_id}/invoices/{invoice_id}` — Returns void_cause, void_reason and voided_at on voided invoices - `GET /v1/companies/{company_id}/invoices` — Every row carries the same fields — no second call to detect a corrective - `POST /v1/companies/{company_id}/invoices/{invoice_id}/void` — Sets void_cause to VOID_REQUEST; void_date in the body is ignored - `POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective` — A TOTAL corrective sets void_cause to TOTAL_CORRECTIVE on the original invoice ## Where to go next - [Retrieve an invoice](/invoices/getCompanyInvoice) - [Void an invoice](/invoices/voidCompanyInvoice) - [Create a corrective invoice](/invoices/createCompanyCorrectiveInvoice) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # A fully discounted line no longer kills the invoice A line discounted to zero used to reject the whole invoice. Zero is now judged on the invoice total, with `INVOICE_ZERO_AMOUNT`. Aug 28, 2026 · Fixed A line whose final amount came to zero — a 100% discount, typically — was rejected with `LINE_ZERO_PRICE` and took the entire invoice down with it, even when every other line was charged. What the rule was actually there to prevent is a zero-euro invoice, which is legal but has no fiscal value. The check now runs on the sum of the lines: a single free line is fine, an invoice that adds up to zero is rejected with the new code `INVOICE_ZERO_AMOUNT`. It applies to creating an invoice, updating a draft and everything that goes through line processing. ## What else changed - **`LINE_ZERO_PRICE` is still alive** for corrective invoices, where a zero line is its own problem. What it no longer does is reject an ordinary invoice with one free line. - **New code `INVOICE_ZERO_AMOUNT`** for the case the rule really targets: the whole invoice adds up to zero. - **A documentation fix in the same change.** The `company_id` path parameter was described as "NIF (company)" while its schema is a UUID. Every mention in the contract that confused the identifier with the NIF is gone — `company_id` is the company's UUID. ## Endpoints - `POST /v1/companies/{company_id}/invoices` — A single zero line is accepted; an invoice totalling zero answers INVOICE_ZERO_AMOUNT ## Where to go next - [Create an invoice](/invoices/createCompanyInvoice) - [Error codes](/errors) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Breakdowns, series and schedules Tax breakdowns travel complete and add up. Series publish the next number they will assign. Recurring invoices declare `frequency` in the request. Aug 21, 2026 · Improved Breakdowns travel complete and their bases add up to the invoice base. Series publish the number they will actually assign next. Recurring invoices declare `frequency` in the request. A submission that was never sent is now `NOT_SUBMITTED` rather than absent. ## What else changed - **Tax breakdowns travel complete.** Every breakdown line is present in the response, and their bases add up to the invoice base exactly — the rounding remainder is distributed rather than left to fall where it may, so `base × rate` no longer disagrees with the amount charged. Lines that carry no tax no longer report a phantom `main_tax`. - **`next_number` is the number that will actually be assigned.** It is resolved with the same rule the issuing path uses, so it accounts for the series' counter reset policy: a series that resets annually publishes the first number of the current year, not the last one of the previous year. - **`numbering_locked` tells you whether you can still change how a series numbers.** It is `true` once the series has issued its first invoice; from that point `code`, `format`, `counter_reset` and `initial_number` are permanently locked. A draft does not lock anything — it has consumed no number yet. - **Corrective invoices.** A partial corrective inherits the defaults of the invoice it corrects instead of requiring them again, and a corrective invoice cannot itself be corrected. - **Recurring invoices declare `frequency`** in the request contract, and an unsupported value is rejected with `422` naming it, instead of being accepted and quietly producing nothing. - **VeriFactu submission status gains `NOT_SUBMITTED`** for an invoice that was never sent. Reading it no longer requires inferring absence, and filtering by submission status now matches the value the invoice itself reports. - **Voiding.** `voided_at` is the instant the system recorded the void, not a date the client supplies. --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Import managed accounts from a file Create managed accounts in bulk from a spreadsheet — template, preview, apply — and see where each claim stands. Aug 21, 2026 · New Three new operations create managed accounts in bulk from a spreadsheet: download the template, preview what would happen, then apply. The account resource also tells you whether its claim link is still usable. ## What else changed - **Download the template** with `GET /v1/templates/account-import` and fill it in. The import accepts the sheet as it comes. - **Preview before committing** with `POST /v1/accounts/imports/preview`: it reports, row by row, what would be created and what would be rejected, without creating anything. Each rejection says what is wrong with that row rather than failing the whole file. - **Apply** with `POST /v1/accounts/imports`. - **The account resource now carries `claim`**, with the state of its claim link and when it expires. The top-level `status` could tell you an account was provisioned but not whether the holder still had a working link or whether it expired weeks ago — which is the difference between waiting and having to act. ## Endpoints - `GET /v1/templates/account-import` — Download the import template - `POST /v1/accounts/imports/preview` — Preview an import without creating anything - `POST /v1/accounts/imports` — Import managed accounts from a file --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Member grants carry the company's name Each grant in a member's response and in the grants list now carries `company_name` next to `company_id`, so you can name the company without resolving every id against the account's companies. It is optional and may be `null` for a company that has no name yet. It never falls back to the id. Sep 21, 2026 · New Each grant in a member's response and in the grants list now carries `company_name` next to `company_id`, so you can name the company without resolving every id against the account's companies. It is optional and may be `null` for a company that has no name yet. It never falls back to the id. ## Endpoints - `GET /v1/accounts/{account_id}/members/{member_id}/grants` — Each grant carries company_name ## Where to go next - [List a member's grants](/members/listAccountMemberGrants) - [Retrieve a member](/members/getAccountMember) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Filter invoices by several statuses The `status` filter on `GET /v1/invoices` accepts a comma-separated list, so one request covers several statuses. Aug 3, 2026 · Improved The `status` filter on `GET /v1/invoices` now accepts a comma-separated list, so a single paginated request can return invoices in any of several statuses. ## What else changed - **`GET /v1/invoices?status=DRAFT,ISSUED,PAID`** — matches invoices in any of the listed statuses (OR). Previously this needed one request per status, which broke pagination on the merged result. - **Nothing changes for a single value.** `?status=DRAFT` behaves exactly as before, so existing integrations need no update. - `ACTIVE` and `EXPIRED` still resolve to the same stored status, so listing both is equivalent to listing either one. - Excluding a status is not supported: list the ones you do want instead. ## Endpoints - `GET /v1/invoices` — List invoices, optionally filtered by one or more statuses ## Where to go next - [List invoices](/invoices/listInvoices) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # next_generation is null when there is no next invoice `next_generation` now carries only the date the system will honour, and `null` otherwise: a completed template, or a paused one whose date has passed. Sep 10, 2026 · Breaking `next_generation` used to show dates the system was never going to honour. The rule is now one line and does not enumerate statuses: **it carries the date the system will honour, and `null` when there is none**. It travels `null` — present in the JSON, never omitted. It affects the three responses that publish the resource — detail, create and list — on the canonical route and on the flat alias. ## What else changed - **`null` in exactly two cases:** a `COMPLETED` template, whose stored date is the one that ran past its end and triggered the closure; and a `PAUSED` template whose date is strictly in the past, because resuming reschedules from today and that date will never be invoiced. - **An `ACTIVE` template always carries its date, including one already in the past.** That is the occurrence the next run will generate, and it is your only notice that an invoice is on its way. The field's description no longer promises "never in the past", which was not true. - **A `PAUSED` template whose date is still ahead** — today counts as ahead — carries it too: it is exactly the date resuming would keep. - **The stored schedule is untouched.** `next_generation` is what gets published, not what gets kept: resuming, rescheduling and skipping are anchored where they always were. `sort_by=next_generation` still sorts by the stored date, so a row that now travels `null` sorts where it always did. - **What to do.** Treat the field as optional. `null` does not mean "unknown": it means that template has no generation ahead of it — it is closed, or paused with its date behind it. ## Endpoints - `GET /v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}` — next_generation is null when there is no generation ahead - `GET /v1/companies/{company_id}/recurring-invoices` — Same rule on every row ## Where to go next - [Retrieve a recurring invoice](/recurring-invoices/getCompanyRecurringInvoice) - [List recurring invoices](/recurring-invoices/listCompanyRecurringInvoices) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Node.js / TypeScript SDK Official Node.js / TypeScript SDK on npm as `@beel_es/sdk`, fully typed from the spec. Jun 11, 2026 · New The official BeeL. SDK for Node.js and TypeScript is now published on npm as @beel_es/sdk. It is fully typed from the OpenAPI spec, with automatic retries, idempotency keys, typed errors, and webhook signature verification built in. ## What else changed - **Install with `npm install @beel_es/sdk`** — Node.js 18+, ships both ESM and CommonJS with a single runtime dependency. - **Fully-typed client** auto-generated from the OpenAPI spec — invoices, customers, products, configuration, series, and NIF validation. - **Automatic retries** with exponential backoff on 429 and 5xx, plus auto idempotency keys on every POST so retries never create duplicates. - **Typed errors** — catch `BeeLNotFoundError`, `BeeLValidationError`, and friends instead of checking status codes. - **Webhook signature verification** with HMAC-SHA256 and PDF download as a Buffer. ## Where to go next - [Node.js SDK docs](/sdks/node) - [npm package](https://www.npmjs.com/package/@beel_es/sdk) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # OAuth2 leaves the public contract OAuth2 is gone from the spec. Each operation now states the scope it requires in its own description. API key auth is unchanged. Aug 23, 2026 · Improved The `OAuth2` security scheme is gone from the published spec: from the global `security` block, from `securitySchemes`, and from every operation that declared it. Nothing changes at runtime — the authorization endpoints, the tokens already issued and the per-endpoint scope enforcement are all exactly as they were. What replaces it in the document is more useful than what it removed: every operation now says which scope it needs, in prose you can read in this reference. ## What else changed - **Why it goes.** There was no way for a third party to register a client, so the spec offered a flow on hundreds of operations that only we could actually use. Documenting a mechanism nobody can exercise is worse than not documenting it. - **Where the scope lives now.** Each operation's description carries a line like `**Required scope:** invoices:write`, and the full scope catalogue — which used to hang off the OAuth2 flow — is a table in the description of `ApiKeyAuth`. - **Nothing to do.** API key authentication (`Authorization: Bearer beel_sk_…`) is untouched. If you generate a client from the spec, the new one simply stops offering an OAuth2 flow you could not use. - **It can come back.** The day third-party application registration exists, OAuth2 returns to the contract with its catalogue and its flow. ## Where to go next - [Authentication](/auth/api-keys) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # The API serves its own spec `GET /v1/openapi.yaml` and `/v1/openapi.json` serve the public contract — the same document this reference is built from, no API key needed. Sep 3, 2026 · New The API now serves its own contract at `GET /v1/openapi.yaml` and `GET /v1/openapi.json` — byte for byte the document this reference is generated from, so a client generated from the API and a client generated from the docs are the same client. Only the public spec is served. ## What else changed - **No API key required.** It is the contract, not your data. - **Deliberately absent from the spec it serves**, so a generated client does not grow a method for downloading its own definition. `/openapi.yaml` and `/openapi.json` answer the same document. ## Endpoints - `GET /v1/openapi.yaml` — The public contract, as YAML - `GET /v1/openapi.json` — The public contract, as JSON ## Where to go next - [SDKs](/sdks/node) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # An OSS line keeps the destination country's VAT Our OSS examples set `percentage: 0`, which drops the destination VAT from the breakdown. The API never required it. Check your `regime_key: "17"` lines. Sep 17, 2026 · Fixed This is a documentation fix, not an API change: nothing about the server's behaviour changed today. But the guides were telling you to build the wrong payload, so a line issued by following them came out wrong. We said an OSS line had to carry `exemption_reason: NO_SUJETA_LOCALIZACION` and `main_tax.percentage: 0`, and that the API rejected the line without that reason. Neither was true. Worse, an exemption reason forces the rate to 0 %, so the destination country's VAT disappeared from the breakdown — the cookbook example billed 480 € to a German customer with 0 € of VAT instead of 91,20 €. ## What else changed - **Leave `exemption_reason` unset on OSS lines.** `regime_key: "17"` is what classifies the operation as N2; that has always been enough. Adding a reason forces the rate to 0 % and costs you the destination VAT in the breakdown. - **Keep the destination rate on the line.** The regime widens the accepted rates beyond the Spanish menu, so 19 % (Germany) or 22 % (Italy) are valid on a `"17"` line and would be rejected anywhere else. - **Two rows in the cross-field table had the sign flipped.** `regime_key: "02"` without `EXENTA_ART_21` is not "allowed but unusual" — it is rejected with `REGIME_REQUIRES_INCOMPATIBLE_EXEMPTION`. And `"17"` without an exemption reason is accepted, not rejected. - **What to do.** If you built your OSS flow from these pages, look at any invoice issued with `regime_key: "17"`: a 0 % line means the destination VAT was never charged, and that is a fiscal correction, not a display one. ## Where to go next - [Regime keys — OSS / IOSS](/verifactu/regime-keys) - [International customers — B2C above the OSS threshold](/verifactu/international-customers) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Unpaid invoices past their due date now move to OVERDUE A daily process now sets `status: OVERDUE` on unpaid invoices past their `due_date`, so `status=SENT` no longer lists them. No webhook is sent. Oct 16, 2026 · Breaking `OVERDUE` was already in the `status` enum, but nothing ever set it: an unpaid invoice past its due date kept `ISSUED` or `SENT`. Now a daily process moves it to `OVERDUE`. It applies to unpaid `ISSUED` or `SENT` invoices with a total above zero whose `due_date` is earlier than the current day in Europe/Madrid, including invoices issued before this change. ## What else changed - **A filter on `status=SENT` or `status=ISSUED` returns fewer invoices.** The overdue ones now carry `OVERDUE`. To list everything still waiting for payment, use the new `pending_collection_only=true` filter instead of a list of statuses. - **No webhook is sent** when an invoice becomes `OVERDUE`. Read the status from the invoice or the list. - **It can lag behind the due date**, because the process runs once a day. Marking the invoice paid moves it to `PAID` as before. - **What to do:** if your code treats an unknown `status` as an error, or maps statuses to your own, add `OVERDUE`. ## Endpoints - `GET /v1/companies/{company_id}/invoices` — Overdue invoices come back with `status: OVERDUE` ## Where to go next - [List invoices](/invoices/listCompanyInvoices) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # A payment connection says which Stripe events it invoices `event_source` (`PAYMENTS`, `INVOICES` or `BOTH`) picks which family of Stripe events a connection invoices. Existing connections are `BOTH`, which is today's behaviour. Sep 8, 2026 · New A Stripe account sends every event to the same webhook endpoint, but you may only want one family of them invoiced: your charges, or the invoices Stripe Billing issues. A connection now declares which with `event_source`, and what falls outside it is recorded as skipped and needs no attention. Every existing connection is `BOTH`, so nothing you have changes until you set it. ## What else changed - **`PAYMENTS`** invoices charges, from `payment_intent.*` and `checkout.session.*`. **`INVOICES`** invoices Stripe's own billing documents, from `invoice.*`. **`BOTH`** takes both, deduplicated to one invoice per charge. - **Refunds, disputes and credit notes are acted on under every value**, because Stripe does not always report a correction through the family the charge came in. A correction whose charge was never invoiced is recorded as skipped and needs no action. - **Changing it affects the events that arrive from then on.** Events already recorded keep their outcome. ## Endpoints - `PATCH /v1/companies/{company_id}/payment-connections/{connection_id}` — Accepts event_source - `GET /v1/companies/{company_id}/payment-connections` — Every connection carries event_source ## Where to go next - [Event source](/stripe/connection-settings#event-source) - [Update a payment connection](/payment-connections/updateCompanyPaymentConnection) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Payment connections are addressed by id The `{provider}` path segment becomes `{connection_id}` on nine payment-connection paths. The old paths are gone, with no coexistence window. Sep 6, 2026 · Breaking A provider slug does not name a connection: one NIF can hold **several** connections with the same provider — one per external account within an environment — so the old path picked one of them ambiguously whenever there was more than one. The identifier names it without ambiguity, and `GET /v1/companies/{company_id}/payment-connections` returns it. Eleven operations over nine paths move. There is no coexistence window: keeping the ambiguous form alive is keeping the bug. ## What else changed - **The substitution is mechanical**: `/payment-connections/{provider}/…` becomes `/payment-connections/{connection_id}/…`. Take the id from the connections list and use it where you used the slug. - **It applies to the whole subtree**: the connection itself (`PATCH`, `DELETE`), its events list and detail, and the event actions `retry`, `draft`, `resolve`, `discard` and `restore`. - **Two of those operations were retired days later** — see [the payments cleanup](/changelog#payments-cleanup) for which and why. ## Endpoints - `GET /v1/companies/{company_id}/payment-connections` — Returns the connection_id you now address - `PATCH|DELETE /v1/companies/{company_id}/payment-connections/{connection_id}` — Replaces the {provider} form - `GET /v1/companies/{company_id}/payment-connections/{connection_id}/events` — Replaces the {provider} form ## Where to go next - [List payment connections](/payment-connections/listCompanyPaymentConnections) - [List payment events](/payment-events/listCompanyPaymentEvents) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Discarding or resolving a payment event acts on the whole charge `discard`, `restore` and `resolve` on a payment event now also apply to the other events of the same charge: its failed attempts, its refunds, its dispute. Sep 15, 2026 · Breaking A single charge usually leaves several events: the sale, its failed attempts, its refunds. Discarding or resolving one of them used to leave the others in place, so the charge still showed up as needing attention, now represented by a sibling event. The three actions now work on the charge as a whole. The response still carries the event you named. ## What breaks - **`discard` removes more than the event you name.** Every active, eligible event with the same `external_payment_id` is discarded with it, in one go and with the same `deleted_at`. Without a payment id, events are grouped by the same `source_object_id` (a credit note, a dispute). After a discard, a list call returns fewer rows than it did before. - **`restore` brings back exactly what that discard removed**: the events with the same `deleted_at`. Events discarded in another operation stay discarded. - **`resolve` resolves every event of the charge that needs action**, the same criterion as the `needs_action` filter. That includes a failed event still waiting for an automatic retry, so a charge you have handled elsewhere is not retried and invoiced twice. It answers `400` only if the event you name is not eligible. ## Does this affect you? - If you call `discard` or `resolve` event by event and then check that the others of the same charge are still there, they no longer will be. ## What else changed - **Events not yet processed are left alone.** A `RECEIVED` event other than the one you name is not discarded or resolved, and neither is an event that needs no action. ## Endpoints - `POST /v1/companies/{company_id}/payment-connections/{connection_id}/events/{event_id}/discard` — Discards every eligible event of the same charge - `POST /v1/companies/{company_id}/payment-connections/{connection_id}/events/{event_id}/restore` — Restores everything that discard removed - `POST /v1/companies/{company_id}/payment-connections/{connection_id}/events/{event_id}/resolve` — Resolves every event of the charge that needs action ## Where to go next - [Discard a payment event](/payment-events/discardCompanyPaymentEvent) - [Resolve a payment event](/payment-events/resolveCompanyPaymentEvent) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Payment events say how each one ended Every payment event now carries `outcome`: `INVOICED`, `IN_PROGRESS`, `NOT_INVOICED`, `RESOLVED`, `INCIDENT` or `NO_CHANGE`. Oct 22, 2026 · New The payment events of a connection, and the answers of the actions on them (retry, resolve, discard, restore), include a new `outcome` field that sums up the result, so you do not have to derive it from `status` and `failure_reason`. `INCIDENT` is the one that needs you. ## Endpoints - `GET /v1/companies/{company_id}/payment-connections/{connection_id}/events` — Each event has `outcome` ## Where to go next - [Reading the outcome of an event](/stripe/edge-cases-and-limits#event-outcome) - [List payment events](/payment-events/listCompanyPaymentEvents) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Payments cleanup Two never-documented payment-connection operations are retired today. On 11 December 2026 the event listing defaults to one row per money movement, and three `counts` fields and four schema aliases go with it — here's what changes, when, and how to tell whether it affects you. **What's new: the payment area of the contract is smaller and says less twice.** Two operations that no SDK, MCP tool, n8n node or integrator ever called are gone as of today. Everything else in [payment connections](/multi-nif/payment-connections) and payment events keeps answering exactly as before, and **no operation is deprecated**. What *is* announced is one change of default and a handful of fields and aliases that nothing reads. They retire on **11 December 2026**, and the API tells you so from today through the `Deprecation`, `Sunset` and `Link` headers described below. ## Retired today Both operations were added on 4 September 2026. They appeared in this auto-generated reference between 7 and 12 September, and nowhere else — not in the Node SDK, the MCP server, the n8n node, the CLI or any guide — and in those days no request reached them. Nothing called them, so they go without a grace period. | Operation | Route | Answers now | |---|---|---| | `getCompanyPaymentConnection` | `GET /v1/companies/{company_id}/payment-connections/{connection_id}` | `405 Method Not Allowed` — the route stays for `PATCH` and `DELETE` | | `reactivateCompanyPaymentConnection` | `POST /v1/companies/{company_id}/payment-connections/{connection_id}/reactivations` | `404 Not Found` | Everything the `GET` returned is in the response of `PATCH …/payment-connections/{connection_id}`; an empty `PATCH` body reads the connection without changing it. The error codes only the reactivation emitted — `CONNECTION_ALREADY_ACTIVE`, `CONNECTION_DEAUTHORIZED` and `CONNECTION_PROVIDER_UNAVAILABLE` — leave the catalogue with it. **Bringing a disconnected connection back** is done the way it was first connected: open a new authorization with `POST …/payment-connections/authorizations` (or from the BeeL dashboard) and let the holder authorize the provider again. Reactivating without a fresh OAuth authorization was never used by the dashboard or by any integrator. ## What retires on 11 December 2026 Nothing below stops working before that date. Until then the contract marks each item `deprecated: true` with the same date and a link back to this page. | What | Where | What to do | |---|---|---| | **The default of `charges_only`** — today `false`, one row per provider event | Query parameter of `GET …/payment-connections/{connection_id}/events` | On that day, omitting the parameter reads as `charges_only=true`: one row per money movement. **Send the value you want explicitly**, whichever it is. The parameter itself is not deprecated. | | `counts.needs_action` | Field of the event listing | Filter with `needs_action=true` and read `pagination.total_items`. | | `counts.ignored` | Field of the event listing | The closest surviving figure is `counts.by_status.SKIPPED`. | | `counts.by_failure_reason` | Field of the event listing (deprecated since 10 September) | Read `counts.failure_reasons`: the same counts, plus the reason written out in the language of the request. | | `RetryManagedPaymentEventResponse`, `ResolveManagedPaymentEventResponse`, `DiscardManagedPaymentEventResponse`, `RestoreManagedPaymentEventResponse` | Schema aliases in generated clients | Use `ManagedPaymentEventResponse`. The aliases always had the same shape; only the type name goes. | ## Does this affect you? - **Grep your integration for `/events` under `/payment-connections/`** and check whether each call sends `charges_only`. A call that omits it changes shape on 11 December: it will get one row per money movement instead of one per event, and `pagination.total_items`, `counts.total`, `counts.discarded`, `counts.needs_action` and `counts.by_status` will describe movements rather than events. Add `charges_only=false` to keep today's view, or `charges_only=true` to adopt the new one now. - **Watch your responses.** From today, a request to that listing that omits `charges_only` answers with: ```http Deprecation: true Sunset: Fri, 11 Dec 2026 00:00:00 GMT Link: ; rel="deprecation" ``` A request that sends `charges_only` — `true` or `false` — gets none of them: you have already chosen. Log the headers for a week and you have the exact list of calls left to touch. - **Grep for `by_failure_reason`, `counts.ignored` and `counts.needs_action`** in whatever reads the listing. Each has a replacement in the table above. - **Regenerate your client** if you rely on the `*ManagedPaymentEventResponse` alias type names; the generated types for those routes are `ManagedPaymentEventResponse` already. ## The retirement calendar | Phase | What happens | |---|---| | **Today** | The two operations above answer `405` / `404`. Everything else answers as before. Requests that omit `charges_only` carry `Deprecation`, `Sunset` and `Link`. | | **Until 11 December 2026** | `charges_only` keeps defaulting to `false`; `counts.ignored`, `counts.needs_action` and `counts.by_failure_reason` keep being returned; the aliases stay in the contract. | | **11 December 2026** | Omitting `charges_only` reads as `true`. The three `counts` fields and the four aliases leave the contract. | The change of default is the one that alters a response you may already be parsing without touching a line of your code. If you list payment events and do not send `charges_only`, decide which view you want and send it before the date. --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # The PDF download waits instead of asking you to poll `GET .../invoices/{id}/pdf` now waits for the PDF and answers `200`. `Prefer: wait=0` keeps the old pure polling behaviour. Sep 3, 2026 · Improved The `202` on `GET /v1/companies/{company_id}/invoices/{invoice_id}/pdf` meant "poll this endpoint until it answers `200`": a loop to write, a backoff to tune, and a PDF that took longer than if the request had simply waited. It waits now. By default the request waits up to 10 seconds and answers `200` with the URL. `202` becomes the exception, and it carries `Retry-After`. ## What else changed - **You choose the wait, with a standard header.** `Prefer: wait=N` bounds it; `Prefer: wait=0` gives you the pure poll you have today, unchanged. Asking for more than the cap is capped, and the response tells you what was applied in `Preference-Applied`. A preference that is not understood is ignored. - **Both cases that produced `202` now wait** — no file yet, and a file rendered by an earlier template — each queueing its regeneration once before waiting. - **What can never have a fiscal PDF still fails immediately.** A draft or a scheduled invoice answers `400` at once: you are not charged the latency of a request that cannot succeed. - **Nothing you have breaks.** If you already poll, you keep polling — you will just usually get the `200` on the first call. ## Endpoints - `GET /v1/companies/{company_id}/invoices/{invoice_id}/pdf` — Waits up to 10s and answers 200; honours Prefer: wait=N ## Where to go next - [Download an invoice PDF](/invoices/getCompanyInvoicePdf) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Filter invoices pending collection `pending_collection_only=true` lists the invoices still waiting for payment, whatever their status: issued, sent, overdue or rectified. Oct 16, 2026 · New The company invoice list accepts `pending_collection_only`. With `true` it returns only `STANDARD`, `SIMPLIFIED` or `CORRECTIVE` invoices in `ISSUED`, `SENT`, `OVERDUE` or `RECTIFIED` with no `payment_date`. A corrective invoice whose original is `VOIDED` and unpaid is left out, because nothing is owed or refunded for that pair; if the original was paid, the corrective is included. ## What else changed - **It combines with the other filters**, so a `status` or `type` outside that set returns an empty list. - **`false`, the default, does not filter.** Existing requests are unchanged. ## Endpoints - `GET /v1/companies/{company_id}/invoices` — New query parameter `pending_collection_only` ## Where to go next - [List invoices](/invoices/listCompanyInvoices) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # A phone number in a response no longer promises the input rules The contract stops declaring `minLength` and `pattern` on `phone` in responses; they move to `PhoneInput`. The server sends exactly what it sent before. Sep 19, 2026 · Improved A correction to the contract, not to the API. The `phone` of a customer, an invoice's issuer and recipient, and the company profile declared the same 9-character minimum and character pattern that a request has to meet. A stored number does not always meet them: it may have arrived through a payment provider or a bulk import, or have been saved before the rule existed. A client that validated responses against the contract threw away the **whole** list when it hit one such number. ## What else changed - **Responses use `Phone`**, which only states the 20-character maximum. Read the field defensively and do not assume it parses. - **Requests use `PhoneInput`**, with the rules the API enforces on the way in: 9 to 20 characters, digits, spaces, dashes, parentheses and an optional leading `+`. Nothing you send is judged differently. - **What to do.** If you generate a client from the contract, regenerate it. Response models lose the pattern check and request models keep it. ## Where to go next - [Create a customer](/customers/createCompanyCustomer) - [Three response fields were never guaranteed](/changelog#contract-drops-guarantees-it-never-had) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Province is only required for addresses in Spain `province` is no longer required on an `Address` outside Spain: a foreign customer or inline recipient without one is accepted. A Spanish address without it still answers `422 PROVINCE_EMPTY`. Sep 28, 2026 · Breaking Many foreign addresses have no province, yet a customer or an inline recipient in France or the United States without `province` was rejected with `422 VALIDATION_ERROR`. `province` is now required only when the address is in Spain (`country_code` `ES`, or no country). Outside Spain it is optional, and a response carries it only when it was sent. ## What else changed - **A foreign address without `province` answers `201`** when you create a customer or an invoice with an inline recipient. With a Spanish address it still answers `422 PROVINCE_EMPTY`. - **Breaking only if you read `province` from a customer echo:** the customer returned as received in `customers_validation` (bulk create and the import previews) can now come without `province` when the customer is foreign. - **Nothing changes for Spanish addresses**, nor for invoices already issued. ## Where to go next - [Create a customer](/customers/createCompanyCustomer) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # A recurring template that emails its invoices needs someone to email Saving a template with `send_automatically: true` and no recipient now answers `422 SIN_DESTINATARIO_RESOLUBLE`, and malformed recipient addresses are rejected. Sep 17, 2026 · Breaking A template set to email every invoice, with no address to send it to, was accepted. You found out months later, when the customer had never received an invoice. It is now rejected when you save it, on create and on every update. Templates already stored are not touched. The check runs when a template is written. ## What breaks - **`send_automatically: true` needs a recipient.** Either `email_configuration.recipients` carries at least one address, or the template's customer has an email. With neither, `POST`, `PUT` and `PATCH` answer `422 SIN_DESTINATARIO_RESOLUBLE`, where they used to answer `201`/`200`. - **`email_configuration.recipients` and `cc` must be valid email addresses** (since 15 September). A malformed one answers `422 VALIDATION_ERROR`, on the three writes and when deriving a template from an invoice. ## Does this affect you? - Grep your client for recurring-template writes that send `send_automatically: true`. If the body has no `email_configuration.recipients`, the call now depends on the customer having an email. ## Endpoints - `POST|PUT|PATCH /v1/companies/{company_id}/recurring-invoices` — 422 SIN_DESTINATARIO_RESOLUBLE when auto-send has no recipient ## Where to go next - [SIN_DESTINATARIO_RESOLUBLE](/errors/SIN_DESTINATARIO_RESOLUBLE) - [Create a recurring invoice](/recurring-invoices/createCompanyRecurringInvoice) - [Recurring invoices](/guides/recurring-invoices) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # A recurring template's history lists what did not happen too The history now includes failed runs, skipped periods and pauses, each with a `type`. For those entries `invoice_id` is `null`. Sep 22, 2026 · Breaking The history of a recurring template listed only the invoices it generated. So a month with no invoice left no trace, and "why was March not invoiced?" had no answer in the API. The canonical history now records every entry: what was generated, and what was not and why. The deprecated flat alias keeps returning only generated invoices, unchanged until it retires. ## What breaks - **The trap: an entry is no longer always an invoice.** Code that takes each entry's `invoice_id` and fetches the invoice now meets `FAILED`, `SKIPPED` and `PAUSED` entries whose `invoice_id` is `null`. Filter on `type: GENERATED` for the previous list. - **Pages hold entries, not invoices.** The default 20 per page now mixes all four types, so a page can hold fewer invoices than before. ## Does this affect you? - Grep for `/recurring-invoices/` followed by `/history` under `/v1/companies/`. Anything that reads `invoice_id` from each entry needs to handle `null`, or filter on `type` first. ## What else changed - **`type`** is `GENERATED`, `FAILED`, `SKIPPED` or `PAUSED`. Only `GENERATED` uses up the period. After the other three the period is still free, and the next run can fill it. - **`origin`** says who triggered a generation: `MANUAL` (a person) or `UNATTENDED` (the scheduled run). It is absent on entries that are not generations, and on generations recorded before this was stored. - **`reason`** explains a `FAILED` or `PAUSED` entry, translated to the caller's language. It is text for a person: branch on `type`, never on `reason`. - **`requested_by` and `requested_by_name`** say who skipped a period, on `SKIPPED` entries only. The name is the user's name, or their email when there is none, and never the raw id. - **Recorded from 22 September on.** Earlier failures, skips and pauses were never stored, so an older gap in the history still has no entry explaining it. ## Endpoints - `GET /v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}/history` — Every entry type, with type, origin, reason and requested_by ## Where to go next - [Get the history of a recurring invoice](/recurring-invoices/getCompanyRecurringInvoiceHistory) - [Recurring invoices](/guides/recurring-invoices) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Recurring templates: quarterly, yearly, and an invoice cap Templates gain quarterly and yearly cadences, an end after `max_invoices`, a `completion` reason, `draft_in_advance`, and the amount of the next invoice on every row. Sep 15, 2026 · New Recurring templates stop being monthly-only, stop being open-ended-or-dated-only, and start telling you what they are going to charge. Everything here is additive: a template you create today the way you created it yesterday behaves identically. ## What else changed - **`frequency` accepts `MONTHLY`, `QUARTERLY` and `YEARLY`** — every 1, 3 or 12 months, on the same `day_of_month` anchor. Omitted, `MONTHLY` applies. The cadence governs the step from the first invoice onwards, not where the first one lands: a yearly template starting 15 February with `day_of_month` 10 first invoices on 10 March, then every 10 March — it does not wait a year. - **`max_invoices` ends the recurrence by number** (2 to 600). It is the **total agreed**, not what is left: remaining is `max_invoices - generated_invoices`, and there is deliberately no second field for it. What counts against it is invoices *generated*, so a skip does not spend cap and a generate-now does. A recurrence ends in exactly one way — open-ended, on `end_date`, or after `max_invoices`. - **`completion` says why a template ended**: `USER`, `END_DATE_REACHED` or `MAX_INVOICES_REACHED`, with the instant in `at`. `status` keeps its three values and `COMPLETED` stays a single terminal status, so nothing breaks an exhaustive `switch` — new causes land in `reason`, so treat it as an open set. Templates completed before this was recorded carry no `completion`, because that cause is not known and is not invented. - **`draft_in_advance` replaces `preview_days`.** The review window is no longer a number you pick: it is fixed at 5 days. `preview_days` is deprecated and still accepted — any value above `0` means `draft_in_advance: true`, `0` means `false`, and if both arrive `draft_in_advance` wins. Either way the invoice is emitted on the scheduled day; what changes is whether there is a draft to look at first. - **`amount` on every template** — what the customer will be asked to transfer on the next invoice it generates: base + VAT + equivalence surcharge − withholding + disbursements. The same number the next occurrence publishes as `total_to_pay`, to the cent. It is computed on the fly, so it always matches the lines the template carries right now — and for that reason it is not sortable or filterable. `null` when the lines cannot be priced. - **`day_of_month: 31` is how you ask for the last day of the month.** A month without that day falls back to its last one — 28 February, 30 April — and the adjustment never sticks: every generation is recalculated from the value you sent, so the schedule does not drift. - **Three more fields on the response**: `payment_iban`, `payment_swift` and `payment_term_days` of the template's own payment method, and `recipient_alternative_id` for a recipient identified by something other than a Spanish NIF (mutually exclusive with `recipient_nif`). - **`start_date` is a no-op when you resend the value it already has**, instead of being rejected once the template has issued — so a read-modify-write cycle no longer has to strip the field out of the body. ## Endpoints - `POST /v1/companies/{company_id}/recurring-invoices` — frequency QUARTERLY|YEARLY, max_invoices, draft_in_advance - `GET /v1/companies/{company_id}/recurring-invoices` — Every row carries amount, completion and the payment detail ## Where to go next - [Create a recurring invoice](/recurring-invoices/createCompanyRecurringInvoice) - [Update a recurring invoice](/recurring-invoices/patchCompanyRecurringInvoice) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Recurring templates say when they are failing, and which period they last invoiced `is_failing` flags a template from its first failed run, and `last_generated_scheduled_date` gives the latest period it has already invoiced. Sep 17, 2026 · New Two read-only fields on every recurring template. They answer two questions you used to have to work out from the history: is this template in trouble, and how far has it invoiced. Both are derived on every read from what is already stored. Nothing else changes because of them. ## What else changed - **`is_failing` is `true` from the first failed unattended run**, even while `status` is still `ACTIVE` and before any warning email, which only goes out every third failure in a row. It is also `true` for a template paused because generation kept failing. A successful generation clears it. - **`last_generated_scheduled_date` is the latest period already invoiced**: the highest `scheduled_date` in the generation history, or `null` if the template never generated an invoice. - **It is not the date of `last_generated_at`.** That is when the most recent invoice was created. A generate-now creates today an invoice for a future period, so the two diverge on purpose. - **A skip does not move it, and neither does deleting an invoice**, with one exception: deleting the draft of the latest generation frees that period, so the date moves back to the previous one. ## Endpoints - `GET /v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}` — is_failing and last_generated_scheduled_date ## Where to go next - [Retrieve a recurring invoice](/recurring-invoices/getCompanyRecurringInvoice) - [Recurring invoices](/guides/recurring-invoices) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # A recurring template cannot produce an invoice with a negative total Negative line totals on a template, a generated invoice adding up below zero, and editing a draft to a negative total are now rejected. Sep 16, 2026 · Breaking A negative standard or simplified invoice is a corrective in disguise: BeeL. handles negative amounts only as a corrective that points at the invoice it corrects. Creating one was already refused, but a recurring template could still generate one, and a draft could be edited into one. Both are closed now. Correctives are unaffected: a negative total is normal there. ## What breaks - **`total_excluding_tax` and `total_including_tax` on a template line must be 0 or more.** A negative one answers `422 VALIDATION_ERROR` with the field in `details`, on create and update, where it used to be accepted. - **Editing a draft so that its total goes below zero** answers `422 NEGATIVE_TOTAL_REQUIRES_RECTIFICATIVE`, the same answer creating it would get. Negative lines are still allowed as long as the total is not negative. - **A template whose lines add up below zero no longer generates.** The run fails permanently and the template is paused, with `recurring_invoice.paused`, instead of issuing a negative invoice. ## Does this affect you? - Look for templates with a line whose declared total is negative, such as a discount written as its own line. Keep the total at 0 or above, or apply the discount as `discount_percentage`. ## What else changed - **A template whose series is inactive, deleted or of the wrong type is paused as well**, and so is one with no default series to fall back on. It used to be retried every night without ever succeeding. ## Endpoints - `POST|PUT|PATCH /v1/companies/{company_id}/recurring-invoices` — Negative line totals answer 422 VALIDATION_ERROR - `PATCH /v1/companies/{company_id}/invoices/{invoice_id}` — A draft edited to a negative total answers 422 NEGATIVE_TOTAL_REQUIRES_RECTIFICATIVE ## Where to go next - [NEGATIVE_TOTAL_REQUIRES_RECTIFICATIVE](/errors/NEGATIVE_TOTAL_REQUIRES_RECTIFICATIVE) - [Corrective invoices](/verifactu/corrective-invoices) - [Recurring invoices](/guides/recurring-invoices) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Recurring invoices: `series_id` is optional Creating a recurring invoice without `series_id` no longer answers `VALIDATION_ERROR`: the template uses the company's default series for `invoice_type`. A `STANDARD` template with no default standard series is rejected with `SERIES_DEFAULT_NOT_FOUND`. Oct 26, 2026 · Improved Creating a recurring invoice without `series_id` no longer answers `VALIDATION_ERROR`: the template uses the company's default series for `invoice_type`. A `STANDARD` template with no default standard series is rejected with `SERIES_DEFAULT_NOT_FOUND`. ## Where to go next - [Recurring invoices](/guides/recurring-invoices) - [Create a recurring invoice](/recurring-invoices/createCompanyRecurringInvoice) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Recurring writes reject what they used to swallow Payment detail without a method, an inactive series, a window with no occurrence and a blank name are now rejected instead of silently discarded. Sep 15, 2026 · Breaking Five ways a write to a recurring template used to answer `200`/`201` and quietly do something other than what you asked. They are now named rejections, each with its own code. If a request of yours is in this list, it was never doing what you thought — but it did answer success, so check before the next deploy. ## What breaks - **The trap: `PATCH {"payment_iban": "ES…"}` with no `payment_method`.** It answered `200` and changed nothing. It now answers `422 PAYMENT_DETAILS_REQUIRE_METHOD`. `payment_iban`, `payment_swift` and `payment_term_days` are detail of `payment_method`, not standalone fields: they are only accepted alongside a method that is present, non-null and not `NONE`. Clearing the payment method is unchanged — send `payment_method: null` **without** mentioning the other three and they are released, as always. - **A template numbering against an inactive series** is rejected with `SERIES_INACTIVE`, and nothing is written. It is judged on the resulting template, so an update that leaves an inactive series in place is rejected too, even when the body does not mention the series. - **A `frequency` and an `end_date` that are impossible together** — no occurrence at all between `start_date` and `end_date`, the everyday case for a yearly template created with the year under way — are rejected with `RECURRING_NO_OCCURRENCE_IN_WINDOW`, hanging off `end_date`, the field you can move. It is not `RECURRING_END_DATE_BEFORE_START`: that one says the *next* generation falls past the end, this one says there is no first invoice and never will be. - **A line priced by declared total whose derived unit price does not fit** is rejected with `LINE_UNIT_PRICE_OUT_OF_RANGE`, whose `details` name the offending line and carry the limit and the derived quotient as JSON numbers — so you do not have to parse the message. - **A blank `name`** is rejected as empty rather than as "characters not allowed", on all five write requests. - **A line whose exemption requires a specific recipient identifier** (today `EXENTA_ART_25` needs `NIF_IVA`) is rejected with `EXEMPTION_REQUIRES_RECIPIENT_ID_TYPE` when the referenced customer does not carry it — the same rejection invoice creation already gave, brought forward to the template instead of every generated invoice bouncing at the AEAT. - **`RECURRING_ALREADY_ENDED` answers `409`, not `422`** — since 8 September, and in every place it appears: writes, generate and preview. A completed template rejects every write, including a `PATCH` that only touches notes. If you branch on the status code, that code moved; if you branch on `error.code`, nothing changed. ## Does this affect you? - Grep your client for a write to a recurring template that sends `payment_iban`, `payment_swift` or `payment_term_days`. If `payment_method` is not in the same body, that call now answers `422`. - Replay a template creation against an inactive series, and one with a yearly cadence inside a window shorter than a year: both used to succeed. - Check whether you treat `RECURRING_ALREADY_ENDED` as a `422`. ## What else changed - **None of this changes a read.** Templates already stored are untouched — what changes is which writes are accepted. - **Block replacement is unchanged.** Changing `payment_method` without resending the detail still releases it, and a `PATCH` that mentions none of the four fields still leaves them alone. ## Endpoints - `POST|PUT|PATCH /v1/companies/{company_id}/recurring-invoices` — New rejections: PAYMENT_DETAILS_REQUIRE_METHOD, SERIES_INACTIVE, RECURRING_NO_OCCURRENCE_IN_WINDOW, LINE_UNIT_PRICE_OUT_OF_RANGE ## Where to go next - [Update a recurring invoice](/recurring-invoices/patchCompanyRecurringInvoice) - [Error codes](/errors) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Invoices and emails without the BeeL. mark With the branding removal add-on, available on Enterprise plans, PDFs generated from then on drop the "Generated with BeeL." footer and invoice emails drop the BeeL. mark. Oct 23, 2026 · New With the branding removal add-on, available on Enterprise plans, PDFs generated from then on drop the "Generated with BeeL." footer and invoice emails drop the BeeL. mark. ## Where to go next - [White-label](/guides/branding-and-pdf#white-label-invoices-without-beel-in-sight) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Request bodies limited to 2 MB Bodies above 2 MB answer `413 REQUEST_BODY_TOO_LARGE`. `411 LENGTH_REQUIRED` is gone — chunked encoding is accepted. Aug 22, 2026 · Breaking A body above 2 MB is now rejected by the API with `413` and the new error code `REQUEST_BODY_TOO_LARGE`, whose `error.details` carries the applicable maximum and the size the request declared. The 8 MB ceiling still exists but is enforced at the network edge, before the request reaches the API, and keeps answering `PAYLOAD_TOO_LARGE`. Chunked transfer encoding is no longer rejected: `411 LENGTH_REQUIRED` is gone. The largest body the API expects is a bulk import at its declared `maxItems`, comfortably under 2 MB. If you are approaching it, split the batch. ## What else changed - Above 2 MB → `413 REQUEST_BODY_TOO_LARGE`, with the limit and the declared size in `error.details` - Above 8 MB → `413 PAYLOAD_TOO_LARGE`, rejected at the edge - File uploads keep their own lower per-endpoint limit, reported as `FILE_TOO_LARGE` - `411 LENGTH_REQUIRED` no longer exists — a body sent with chunked encoding is accepted ## Where to go next - [Handling errors](/guides/handling-errors) - [Error codes](/errors) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Read your API request logs A Request Logs endpoint family lets you inspect what your own API keys have called — method, path, status, timing and the full detail. Jun 15, 2026 · New A new Request Logs endpoint family lets you inspect the requests your own API keys have made (live + test) — method, path, status, timing, and the full request/response detail — so you can correlate and debug integrations without leaving your stack. ## What else changed - **`GET /v1/developers/request-logs`** — list your past API requests, cursor-paginated. Filter by `environment` (live/test), `only_errors`, `method`, `http_status`, `path_contains`, `api_key_id`, and a `from`/`to` time range. By default the last 30 days are returned. - **`GET /v1/developers/request-logs/{request_id}`** — full detail of a single request, including request/response bodies and headers. Pass the optional `timestamp` hint (the value from the list) to look up logs older than the default window. - **Cursor pagination** — navigate with the opaque `next_cursor` / `prev_cursor` returned in each response; `has_next` / `has_previous` tell you when you've reached the edges. - **Correlate with `X-Request-Id`** — each log's `request_id` matches the `X-Request-Id` response header (and `meta.request_id`), so you can jump straight from a live response to its full log. - Works with your existing API key (`Authorization: Bearer`) — no extra scope required. ## Endpoints - `GET /v1/developers/request-logs` — List your API request logs (cursor-paginated, filterable by environment, status, method, path, key and time range) - `GET /v1/developers/request-logs/{request_id}` — Get the full detail (bodies + headers) of a single request log ## Where to go next - [List request logs](/request-logs/listDeveloperRequestLogs) - [Get a request log](/request-logs/getDeveloperRequestLog) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Resources under the NIF An account can now hold several NIFs, each named in the path. The old flat routes are deprecated with a Sunset date and a successor — here's what moved where, when the old routes retire, and how to tell whether it affects you. **What's new: an account can now hold several NIFs.** A fiscal identity is no longer inferred from your credential — you name it in the path, so one account can invoice under many NIFs. That's the model documented in [Multi-NIF](/multi-nif) and [Companies](/multi-nif/companies); this note is the API side of it. Each resource now lives under the axis it belongs to: business resources under the NIF (`/v1/companies/{company_id}`), account-wide ones under the account (`/v1/accounts/{account_id}`), the shared catalogues at the top level, and your preferred language on `/v1/me`. The full move is in the [route table](#find-your-route) below. **Nothing breaks today.** The old flat routes are deprecated, not removed: each keeps answering and now carries `Deprecation: true`, a `Sunset` date and, where one is declared, a `Link` to its successor. Four routes deliberately have none — the `PUT`s that *replace* a customer, a product, a recurring invoice or a series — and the contract says so instead of pointing you at something that behaves differently. They all retire on **9 December 2026** — migrate on your own schedule until then. **Want the exact list for your code?** If you use [Claude Code](https://claude.com/claude-code), the `beel-api` plugin has a skill (`/beel-api:upgrade`) that reads this note and your repository and comes back with the calls you need to change — jump to [Hand it to Claude Code](#hand-it-to-claude-code). ## What breaks Five changes need more than a new path — a mechanical find-and-replace gets each of them wrong: - **`GET /v1/products/search` is the one trap.** Its successor is `GET /v1/companies/{company_id}/products`, which takes the same query filter but answers a different shape: the old route returned `data: [ … ]`, the successor returns `data: { products, pagination }`. Swapping the path without reading the schema leaves you mapping over an object. - **The `PUT`s that really replace have no successor, on purpose.** `PUT /v1/customers/{customer_id}`, `PUT /v1/products/{product_id}`, `PUT /v1/recurring-invoices/{recurring_invoice_id}` and `PUT /v1/series/{series_id}` replace the whole resource: a field you leave out is cleared. The canonical form has a single update verb, `PATCH`, and it *merges* — so it is not a drop-in destination. The contract marks these four `x-no-successor`, and the API sends them no `Link: rel="successor-version"`, precisely so that nobody migrates them blind. Moving one of them to the company-scoped `PATCH` changes what your call does, from replacing to merging: go through those call sites by hand, and where you relied on replacement send the resource complete, passing `null` in every field you want cleared. Their `PATCH` siblings — which already existed on the flat routes — are the ones with a clean 1:1 successor. - **`PUT /v1/invoices/{invoice_id}` is the exception, and it costs you nothing.** It is the only `PUT` here with a declared successor, `PATCH /v1/companies/{company_id}/invoices/{invoice_id}`, and it earns it: this route never replaced the invoice. It applied only the fields present in the body and left the rest as they were — exactly what the successor does. The verb was the lie, not the behaviour. Change route and verb, keep the body, and the result is the same as before. - **Action verbs converged onto `status`.** `mark-paid`, `mark-sent` and `revert-to-issued` all become `PUT /v1/companies/{company_id}/invoices/{invoice_id}/status` with the target status in the body; `pause` and `resume` do the same for recurring invoices. The old path is gone from the successor — the state you want is now data, not a URL. - **The four `/v1/invoices/bulk/*` routes split by intent** into `pdf-archive`, `deliveries`, `batches` and `exports`, each with its own request and response. There is no single successor to find-and-replace them onto. ## Does this affect you? - Grep your integration for `/v1/invoices`, `/v1/customers`, `/v1/products`, `/v1/recurring-invoices`, `/v1/configuration/`, `/v1/webhooks`, `/v1/emails` and `/v1/developers/request-logs`. Every hit is a deprecated route, and the table below gives its successor — or says it has none. - Watch your responses: a deprecated route answers with `Deprecation: true`, a `Sunset` date and, when a successor is declared, `Link: ; rel="successor-version"`. Log those headers for a week and you have the exact list of calls left to migrate, with no guessing — and a deprecated route arriving *without* the `Link` is one of the four replacing `PUT`s, which you have to move by hand. - Check whether you send the `BeeL-Active-Company` header. Only the flat routes read it; once the NIF is in the path, the header plays no part. ## The retirement calendar The deprecated routes retire on **9 December 2026**. One speed, with a grace period on every route until then. | Phase | What happens | |---|---| | **Today** | Every successor route is live, and every deprecated route keeps answering exactly as before. Nothing 404s; nothing has been withdrawn. | | **Grace period** | The 91 deprecated operations keep working, adding `Deprecation: true`, the `Sunset` date and — for all but the four replacing `PUT`s — a `Link` to their successor. You migrate on your own schedule while this lasts. | | **9 December 2026** | The deprecated routes stop answering and return `410 Gone`. Every response until then carried the same `Sunset` date in its headers, so you can read it straight from your own traffic rather than trusting a page. | A deprecated route keeps working until its `Sunset` date and then answers `410 Gone`, so an integration left untouched keeps issuing invoices right up to a date it was told about in every response it ever received. Nothing degrades silently in between: the headers are there from day one. ## Find your route Every route this release touched, grouped by resource. All 82 keep answering and carry `Deprecation` and `Sunset`, and all but the four replacing `PUT`s also carry `Link: ; rel="successor-version"` — migrate before the date `Sunset` announces. Both columns show the route in full. Where the **Now** cell leads with a method, the method changed too, and a path-only find-and-replace leaves you calling a verb the successor does not serve. Read the note on those rows before you move them: `PUT` becoming `PATCH` is harmless on invoices and a change of behaviour on customers, products and recurring invoices. ### Invoices 24 operations The `bulk/*` routes split by intent; each successor has its own response. | Method | Was | Now | |---|---|---| | `GET` `POST` | `/v1/invoices` | `/v1/companies/{company_id}/invoices` | | `GET` `DELETE` | `/v1/invoices/{invoice_id}` | `/v1/companies/{company_id}/invoices/{invoice_id}` | | `PUT` | `/v1/invoices/{invoice_id}` | `PATCH` `/v1/companies/{company_id}/invoices/{invoice_id}`. Only the verb and the path change. This `PUT` never replaced the invoice — it applied just the fields present in the body, exactly as the successor `PATCH` does. | | `POST` | `/v1/invoices/{invoice_id}/issue` | `/v1/companies/{company_id}/invoices/{invoice_id}/issue` | | `POST` | `/v1/invoices/{invoice_id}/void` | `/v1/companies/{company_id}/invoices/{invoice_id}/void` | | `POST` | `/v1/invoices/{invoice_id}/corrective` | `/v1/companies/{company_id}/invoices/{invoice_id}/corrective` | | `POST` | `/v1/invoices/{invoice_id}/send` | `/v1/companies/{company_id}/invoices/{invoice_id}/send` | | `POST` | `/v1/invoices/{invoice_id}/convert-to-invoice` | `/v1/companies/{company_id}/invoices/{invoice_id}/convert-to-invoice` | | `GET` | `/v1/invoices/{invoice_id}/pdf` | `/v1/companies/{company_id}/invoices/{invoice_id}/pdf` | | `GET` | `/v1/invoices/{invoice_id}/pdf/preview` | `/v1/companies/{company_id}/invoices/{invoice_id}/pdf/preview` | | `POST` | `/v1/invoices/{invoice_id}/mark-paid` | `PUT` `/v1/companies/{company_id}/invoices/{invoice_id}/status`. Target status goes in the body. | | `POST` | `/v1/invoices/{invoice_id}/mark-sent` | `PUT` `/v1/companies/{company_id}/invoices/{invoice_id}/status`. Target status goes in the body. | | `POST` | `/v1/invoices/{invoice_id}/revert-to-issued` | `PUT` `/v1/companies/{company_id}/invoices/{invoice_id}/status`. Target status goes in the body. | | `POST` | `/v1/invoices/{invoice_id}/schedule` | `PUT` `/v1/companies/{company_id}/invoices/{invoice_id}/schedule` | | `PATCH` | `/v1/invoices/{invoice_id}/reschedule` | `PUT` `/v1/companies/{company_id}/invoices/{invoice_id}/schedule`. Same route as `schedule`. | | `POST` | `/v1/invoices/{invoice_id}/unschedule` | `DELETE` `/v1/companies/{company_id}/invoices/{invoice_id}/schedule` | | `POST` | `/v1/invoices/{invoice_id}/duplicate` | `POST` `/v1/companies/{company_id}/invoices/derivations` | | `POST` | `/v1/invoices/{invoice_id}/create-recurring` | `POST` `/v1/companies/{company_id}/recurring-invoices/derivations` | | `POST` | `/v1/invoices/bulk/pdf` | `POST` `/v1/companies/{company_id}/invoices/pdf-archive` | | `POST` | `/v1/invoices/bulk/send` | `POST` `/v1/companies/{company_id}/invoices/deliveries` | | `POST` | `/v1/invoices/bulk/status` | `POST` `/v1/companies/{company_id}/invoices/batches` | | `POST` | `/v1/invoices/export/excel` | `POST` `/v1/companies/{company_id}/invoices/exports` | ### Configuration 14 operations | Method | Was | Now | |---|---|---| | `GET` `POST` | `/v1/configuration/series` | `/v1/companies/{company_id}/series` | | `PATCH` `DELETE` | `/v1/configuration/series/{series_id}` | `/v1/companies/{company_id}/series/{series_id}` | | `POST` | `/v1/configuration/series/{series_id}/default` | `PUT` `/v1/companies/{company_id}/series/{series_id}/default` | | `POST` | `/v1/configuration/series/defaults` | `PUT` `/v1/companies/{company_id}/series/defaults` | | `GET` | `/v1/configuration/series/defaults-status` | `GET` `/v1/companies/{company_id}/series/defaults` | | `GET` `PUT` | `/v1/configuration/verifactu` | `/v1/companies/{company_id}/verifactu-configuration` | | `GET` `PUT` | `/v1/configuration/taxes` | `/v1/companies/{company_id}/tax-configuration` | | `PUT` | `/v1/configuration/language` | `PATCH` `/v1/me`. The preferred language belongs to the person, not to a NIF. | | `GET` | `/v1/configuration/tax-types` | `GET` `/v1/tax-types`. The catalogue is the same for every NIF, so it left `/v1/configuration/`. | | `GET` | `/v1/configuration/invoice-customization-options` | `GET` `/v1/invoice-customization-options` | ### Recurring invoices 12 operations | Method | Was | Now | |---|---|---| | `GET` `POST` | `/v1/recurring-invoices` | `/v1/companies/{company_id}/recurring-invoices` | | `GET` `PATCH` `DELETE` | `/v1/recurring-invoices/{recurring_invoice_id}` | `/v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}`. The 1:1 move: the successor `PATCH` merges the fields you send, just as this one does. | | `PUT` | `/v1/recurring-invoices/{recurring_invoice_id}` | `PATCH` `/v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}`. **No declared successor** — the contract marks this route `x-no-successor` and the API sends it no `Link`. It replaces the schedule, lines and recipient, clearing every field you omit; the `PATCH` shown merges instead, so moving there changes what your call does. Send the template complete, with `null` in the fields you want cleared. | | `POST` | `/v1/recurring-invoices/{recurring_invoice_id}/pause` | `PUT` `/v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}/status`. Target status goes in the body. | | `POST` | `/v1/recurring-invoices/{recurring_invoice_id}/resume` | `PUT` `/v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}/status`. Target status goes in the body. | | `POST` | `/v1/recurring-invoices/{recurring_invoice_id}/skip` | `/v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}/skip` | | `POST` | `/v1/recurring-invoices/{recurring_invoice_id}/generate` | `/v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}/generate` | | `GET` | `/v1/recurring-invoices/{recurring_invoice_id}/history` | `/v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}/history` | | `GET` | `/v1/recurring-invoices/{recurring_invoice_id}/preview` | `GET` `/v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}/next-occurrence` | ### Customers 11 operations | Method | Was | Now | |---|---|---| | `GET` `POST` | `/v1/customers` | `/v1/companies/{company_id}/customers` | | `GET` `DELETE` | `/v1/customers/{customer_id}` | `/v1/companies/{company_id}/customers/{customer_id}` | | `PUT` | `/v1/customers/{customer_id}` | `PATCH` `/v1/companies/{company_id}/customers/{customer_id}`. **No declared successor** — the contract marks this route `x-no-successor` and the API sends it no `Link`. It replaces the customer, clearing every field you omit; the `PATCH` shown merges instead, so moving there changes what your call does. Send the customer complete, with `null` in the fields you want cleared. | | `PATCH` | `/v1/customers/{customer_id}` | `/v1/companies/{company_id}/customers/{customer_id}`. The 1:1 move: this `PATCH` already existed and its successor behaves identically. | | `POST` `DELETE` | `/v1/customers/bulk` | `/v1/companies/{company_id}/customers/bulk` | | `POST` | `/v1/customers/import-csv-preview` | `POST` `/v1/companies/{company_id}/customers/imports/preview` | | `POST` | `/v1/customers/import-holded-contacts` | `POST` `/v1/companies/{company_id}/customers/imports` | | `POST` | `/v1/customers/templates/csv` | `GET` `/v1/templates/customer-import`. Reading a fixed template is a `GET`, and it is the same for every NIF. | ### Products 9 operations | Method | Was | Now | |---|---|---| | `GET` `POST` | `/v1/products` | `/v1/companies/{company_id}/products` | | `GET` `DELETE` | `/v1/products/{product_id}` | `/v1/companies/{company_id}/products/{product_id}` | | `PUT` | `/v1/products/{product_id}` | `PATCH` `/v1/companies/{company_id}/products/{product_id}`. **No declared successor** — the contract marks this route `x-no-successor` and the API sends it no `Link`. It replaces the product, resetting every field you omit to its creation default; the `PATCH` shown merges instead, so moving there changes what your call does. Send the product complete, with `null` in the fields you want cleared. | | `PATCH` | `/v1/products/{product_id}` | `/v1/companies/{company_id}/products/{product_id}`. The 1:1 move: this `PATCH` already existed and its successor behaves identically. | | `POST` `DELETE` | `/v1/products/bulk` | `/v1/companies/{company_id}/products/bulk` | | `GET` | `/v1/products/search` | `GET` `/v1/companies/{company_id}/products`. **Different response shape.** The old route returned `data: [ … ]`; the successor returns `data: { products, pagination }`. | ### Webhooks 8 operations Webhook subscriptions belong to the account, so they move under `@`. | Method | Was | Now | |---|---|---| | `GET` `POST` | `/v1/webhooks` | `/v1/accounts/{account_id}/webhooks` | | `GET` `PATCH` `DELETE` | `/v1/webhooks/{webhook_id}` | `/v1/accounts/{account_id}/webhooks/{webhook_id}` | | `POST` | `/v1/webhooks/{webhook_id}/secret` | `/v1/accounts/{account_id}/webhooks/{webhook_id}/secret` | | `GET` | `/v1/webhooks/{webhook_id}/deliveries` | `/v1/accounts/{account_id}/webhooks/{webhook_id}/deliveries` | | `POST` | `/v1/webhooks/{webhook_id}/deliveries/{delivery_id}/retry` | `/v1/accounts/{account_id}/webhooks/{webhook_id}/deliveries/{delivery_id}/retry` | ### Emails 2 operations | Method | Was | Now | |---|---|---| | `GET` | `/v1/emails` | `/v1/accounts/{account_id}/emails` | | `GET` | `/v1/emails/indicators` | `/v1/accounts/{account_id}/email-indicators`. A sibling of the collection, not a member of it, so it does not reserve `indicators` as an id. | ### Request logs 2 operations | Method | Was | Now | |---|---|---| | `GET` | `/v1/developers/request-logs` | `/v1/accounts/{account_id}/request-logs` | | `GET` | `/v1/developers/request-logs/{request_id}` | `/v1/accounts/{account_id}/request-logs/{request_id}` | ## Hand it to Claude Code This note can tell you *what* moved. Only something looking at your code can tell you *where*. If you use [Claude Code](https://claude.com/claude-code), the `beel-api` plugin has a skill that reads this note and your repository and comes back with the list. Run `/beel-api:upgrade`. From the `beel-api` plugin. It reads `/api/changelog`, matches the route table against your own calls, and writes up what it finds. Run it with no arguments for everything, or name an area (`/beel-api:upgrade invoices`) to narrow it. Or paste this prompt: ```text Migrate my BeeL. API integration to the per-NIF routes. First, read https://docs.beel.es/api/changelog and find the entry whose slug is "resources-under-the-nif". Treat its `routeMigration` groups as the authoritative old-to-new mapping, and its `breakingChanges` as the list of changes that a find-and-replace will get wrong. Then find every BeeL. API call in this codebase and report, before editing anything: 1. Each call to a DEPRECATED route — give me the successor and the Sunset date read from the response headers. 2. Calls that need more than a new path: a different HTTP verb (PUT becoming PATCH), a different request body, or a different response shape. Propose a diff for (1). For (2), show me each call site and stop for my review — do not rewrite them automatically. Finally, tell me which of my calls need no change at all, so I know the scope. ``` **What to expect:** - **It proposes; it does not apply.** You get a report and a diff to review, not a rewritten branch. Nothing changes until you say so. - **It reads the route table rather than guessing.** The old-to-new mapping, the `Sunset` date and the traps all come from this note, served as JSON at `/api/changelog` — so it migrates to the route we actually published. - **It tells you what is already fine.** Most of the answer is usually the list of calls that need nothing, and that is the part that lets you size the job. **Review these by hand:** - **`GET /v1/products/search`.** Its successor `GET /v1/companies/{company_id}/products` takes the same filter but returns `data: { products, pagination }` where the old route returned `data: [ … ]`. The path swap compiles and the mapping breaks at runtime. - **`PUT` becoming `PATCH` — only one of these is safe.** `PUT /v1/invoices/{invoice_id}` has a declared successor and always applied just the fields you sent, so the move to `PATCH /v1/companies/{company_id}/invoices/{invoice_id}` changes the verb and the path and nothing else. The `PUT`s on customers, products and recurring invoices are the opposite: they replace the resource, they are marked `x-no-successor` in the contract, and no `Link` header points anywhere. Migrating them to the company-scoped `PATCH` turns a replace into a merge — review each call site and resend the resource complete, with `null` in the fields you want cleared. - **Converged action verbs.** `mark-paid`, `mark-sent`, `revert-to-issued`, `pause` and `resume` collapse onto a single `status` route with the target state in the body — a change of request shape, not just of URL. ## See also - [Multi-NIF](/multi-nif) — the model behind the axis: one account, many fiscal identities. - [Companies](/multi-nif/companies) — creating and addressing each NIF. - [Payment connections](/multi-nif/payment-connections) — Stripe per NIF. - [Managed accounts](/multi-nif/managed-accounts) — issuing on behalf of another account. - [VeriFactu auto-submit](/verifactu/auto-submit) — what changes for fiscal submission per NIF. - [Node/TypeScript SDK](https://www.npmjs.com/package/@beel_es/sdk) — the official typed client, generated from this contract, so it targets the per-NIF routes. --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Resuming a recurring template no longer re-invoices a period Resuming keeps `next_generation` when it has not fallen due yet, instead of recalculating from today, which could issue a period twice or undo a skip. Sep 13, 2026 · Fixed Resuming a paused template used to recalculate the next generation from the day you resumed. That could move it **backwards**. Take a template on day 15 that had already invoiced September and pointed at 15 October: resumed in late September, it went back to 15 September, and the next run issued a second invoice for a period already billed. It undid skips the same way. Resuming now keeps the scheduled date whenever it has not fallen due yet. ## What else changed - **A date that has not fallen due is kept**, and today counts as not fallen due. Only a date left in the past is moved, to the first occurrence after today. Periods missed while the template was paused are not backfilled. - **If nothing is left to generate**, because the date falls beyond `end_date` or `max_invoices` was already reached, resuming leaves the template `COMPLETED`. - **Changing `day_of_month` on a paused template now moves `next_generation` straight away**, as it already did on an active one. The response to that `PATCH` carries the new date, and resuming keeps it. Before, the new day was stored but only took effect when you resumed, counted from that day. - **What to do.** Check invoices generated just after a resume. A second invoice for a period already billed is a duplicate, and under VeriFactu it is corrected, not deleted. ## Endpoints - `PUT /v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}/status` — Moving to ACTIVE keeps a next_generation that has not fallen due - `PATCH /v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}` — day_of_month on a paused template moves next_generation immediately ## Where to go next - [Change the status of a recurring invoice](/recurring-invoices/setCompanyRecurringInvoiceStatus) - [Recurring invoices](/guides/recurring-invoices) - [Corrective invoices](/verifactu/corrective-invoices) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # NIF validation in sandbox answers with simulated data With a test key, `POST /v1/nif/validate` checks the syntax only and no longer queries the AEAT register. Oct 19, 2026 · Improved In sandbox the NIF validation endpoint no longer queries the AEAT register. A well-formed NIF comes back `VALID` with the `legal_name` you sent, `legal_name_verified: false` and no `census_status`; a malformed one still comes back `INVALID`. With a Live key nothing changes. Only this endpoint is simulated: creating a company or a customer, and issuing, still check the NIF against the real AEAT census in sandbox. ## Endpoints - `POST /v1/nif/validate` — Simulated in sandbox (test keys and the MCP server connected to Test) ## Where to go next - [NIF validation is simulated](/verifactu/testing-in-sandbox#nif-validation-is-simulated) - [The census is real everywhere else](/verifactu/testing-in-sandbox#the-census-is-real-everywhere-else) - [Validate a NIF](/nif-validation/validateNif) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Semantic rejections answer 422 A body that parses but breaks a rule now answers `422` with a code and populated `details`, not an empty `400`. Aug 21, 2026 · Improved A body that parses but breaks a rule now answers `422` with a code and populated `details`, instead of `400` with an empty `details` object. `400` is left for what is wrong with the request target. ## What else changed - **The split, stated once.** `400` means the fault is in the request target — an unknown query parameter, a malformed identifier in the path. `422` means the body is syntactically valid but semantically wrong. Several rejections were on the wrong side of that line and have moved. - **`details` is no longer empty.** A rejection now names the field and the rule: which value was rejected, which field it depends on, which values are allowed. Before, the reason was buried in the message text — readable by a person, useless to code. - **Where you will notice it.** Enabling a default without enabling the feature it depends on, a date range that runs backwards or exceeds the maximum, an identifier that is required and arrived blank. All of these used to be `400` with `details: {}`. - **If you branch on the status code**, check that you are not treating `422` as a transport error. If you branch on `error.code` you are already fine: the codes did not change, they were simply not reachable before. --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # A new series needs its document type, and what else changes in this release A new series needs `document_type`, several rejections now carry a specific code or status, and an issued invoice's PDF never changes. Plus behaviour changes. Sep 25, 2026 · Breaking Several changes can break a request that works today: a new invoice series must say which documents it numbers, a `NIF_IVA` or any foreign identifier must be one AEAT accepts, recipient data that used to be ignored is now refused, and many rejections that answered a generic code now name their cause. The rest change what a working integration receives, without any request having to change. Existing series, invoices, numbers and PDFs are not touched. ## What breaks - **`document_type` is required when you create a series**, on `POST /v1/companies/{company_id}/series`, on `POST /v1/configuration/series` and in `options.series[]` of the managed-account import and its preview. Without it the request answers `422 VALIDATION_ERROR`. `UNASSIGNED` is no longer accepted for a new series, nor as the new type of an existing one: `422 SERIES_UNASSIGNED_TYPE_NOT_ALLOWED`. Series that were `UNASSIGNED` now number only one type: see [a series numbers only its own type](/changelog/invoice-checks-before-numbering). - **A `NIF_IVA` must be one AEAT accepts.** An `alternative_id` of type `NIF_IVA` is accepted only with the country of another EU Member State (`422 ALTERNATIVE_ID_VAT_REQUIRES_EU_COUNTRY`) and in that State's EU VAT number format, the country prefix (`EL` for Greece) followed by the national number (`422 ALTERNATIVE_ID_VAT_INVALID_FORMAT`). It applies when you create or edit a customer, create an invoice or a recurring invoice with the recipient inline, and when you issue, before a number is used. Until now such an invoice was issued and then refused by VeriFactu, ending up `REJECTED` with its number spent. A customer saved earlier with one of these identifiers can still be read and edited; to invoice it, change the identifier. - **A simplified invoice with an identified recipient answers `422`, not `400`, and on every path.** `SIMPLIFIED_INVOICE_FORBIDS_IDENTIFIED_RECIPIENT` now answers `422` when you create a `SIMPLIFIED` invoice whose recipient carries `nif` or `alternative_id`, when an edit changes its type or its recipient, when you issue it — one by one, in bulk or on schedule — and when you write a recurring invoice template. A draft created earlier with an identifier can still be edited, but it is not issued until it becomes `STANDARD` or loses the identifier. When you read invoices, an older simplified invoice may still carry a `nif`. - **Specific codes instead of generic ones.** Rejections that answered `BUSINESS_RULE_VIOLATION` or `VALIDATION_ERROR` now carry a code of their own, with the same HTTP status: if you branch on `error.code`, they reach a different branch. Sending an invoice: `400 INVOICE_DRAFT_NOT_SENDABLE` for a draft or a scheduled invoice and `422 INVOICE_EMAIL_NO_RECIPIENTS` with no recipients, on a single send and on a batch. Correctives: `CORRECTIVE_RECENT_DUPLICATE`, `CORRECTIVE_TOTAL_ALREADY_EXISTS`, `CORRECTIVE_ORIGINAL_NOT_FOUND`, `CORRECTIVE_ORIGINAL_DELETED`, `CORRECTIVE_ORIGINAL_IS_DRAFT`, `CORRECTIVE_ORIGINAL_REQUIRED`, `RECTIFICATION_REASON_REQUIRED` and `ORIGINAL_REFERENCE_ONLY_ON_CORRECTIVE`. An invoice with no recipient: `RECIPIENT_NOT_PROVIDED`. Fields: `FIELD_TOO_LONG`, `FIELD_OUT_OF_RANGE`, and `INVALID_IRPF` / `INVALID_SURCHARGE` on products as on invoice lines. Managed accounts: `PROVISIONING_TAX_PROFILE_REQUIRED`, `PROVISIONING_EMAIL_REQUIRED`, `PROVISIONING_INVALID_CURSOR` and `CLAIM_TOKEN_EMAIL_REQUIRED`. The VeriFactu representation: `REPRESENTATION_NOT_FOUND`, `REPRESENTATION_DOCUMENT_NOT_STORED`, `REPRESENTATION_ALREADY_ACTIVE`, `REPRESENTATION_NOT_ACTIVE` and `NIF_NOT_CONFIGURED`. - **`SERIES_DOCUMENT_TYPE_INCOMPATIBLE` is retired.** A series that does not fit the document's type answers `422 SERIES_INCOMPATIBLE_DOC_TYPE` everywhere: when you create or edit an invoice, when you issue it, and when a recurring invoice template changes its type or series. - **`customer_id` together with recipient data answers `422 RECIPIENT_CUSTOMER_AND_DATA_EXCLUSIVE`**, on create and on edit. Until now the other recipient fields were ignored and the invoice took the customer's data. Send one or the other. - **A corrective with `recipient` answers `422 CORRECTIVE_RECIPIENT_NOT_ACCEPTED`** and nothing is created. A corrective always goes to the recipient of the invoice it corrects, with that invoice's data; the field used to be ignored. The one exception is correcting the recipient's data with an `R4`: see [corrective invoices and voids](/changelog/correctives-and-voids-follow-the-law). - **`alternative_id.country_code` is required**, except for `PASSPORT` and `NOT_REGISTERED`, which take `ES` when you omit it. Any other type without it answers `422 ALTERNATIVE_ID_COUNTRY_REQUIRED`, naming the field, on a customer and on an invoice recipient. Until now an invoice recipient without it answered `400 VALIDATION_ERROR`, even for a passport, and a customer without it was judged as Spanish and answered `ALTERNATIVE_ID_SPAIN_INVALID_TYPE` or `ALTERNATIVE_ID_VAT_REQUIRES_EU_COUNTRY`. - **An unknown `sort_by` on the invoice lists answers `400 VALIDATION_ERROR`**, naming `sort_by` and the accepted fields, as customers and products already did. Until now it was ignored and the list came back in the default order. `due_date` is a new accepted field. - **An empty element in a list filter answers `400 VALIDATION_ERROR`** naming the parameter, on every list: `status=ISSUED,` or `status=ISSUED&status=`. It used to fail with a `500`. A list parameter sent entirely empty (`status=`) is now the same as omitting it. - **Sending an invoice whose PDF does not exist yet answers `202`**, not an error. It happens right after issuing, and under VeriFactu while the invoice waits for the QR of its registration. The email goes out shortly after the PDF is stored (minutes, if VeriFactu or the PDF is delayed); `sent_at` in the `202` is when the request was accepted, and `invoice.email.sent` tells you when it left. If the invoice ends without a PDF, or its PDF is not stored within a day, the email is recorded as failed with its reason, and a failed email sends no webhook. The preview image answers `202` with `Retry-After` in the same case. - **An invoice under VeriFactu that is not registered with the AEAT has no PDF.** Downloading it, its preview image, or emailing it with the PDF answers `400 INVOICE_NOT_REGISTERED_NO_PDF` at once: its registration was rejected before reaching the AEAT, or it was voided without being registered. `verifactu.error_message` says why. ## Does this affect you? - If you create series from code, add `document_type` to the request. - If you parse error messages or depend on their language, send `Accept-Language` explicitly. - If your customers have both `email` and `billing_emails`, their invoices now go to `billing_emails`. - If you relied on `initial_number` restarting every year at the same number, create the series for next year yourself. - If you send customers from outside the EU as `NIF_IVA`, or EU VAT numbers without their country prefix, change them: use `OTHER_DOCUMENT` or `COUNTRY_ID` outside the EU, and the full number with its prefix inside it. - If you branch on the status of `SIMPLIFIED_INVOICE_FORBIDS_IDENTIFIED_RECIPIENT`, expect `422`; better, compare `error.code`. - If you branch on `error.code` being `BUSINESS_RULE_VIOLATION` or `VALIDATION_ERROR`, or on `SERIES_DOCUMENT_TYPE_INCOMPATIBLE`, add the new codes to those branches. - If you send `customer_id` together with recipient fields, or a `recipient` on a corrective, remove them. - If you send `alternative_id` without `country_code`, add it. - If you pass `sort_by` to the invoice lists, check it is one of the accepted fields; if you build list filters by joining values with commas, make sure no element is empty. - If you call `/send` right after issuing, handle `202`: the email is on its way, not sent yet. - If you store invoice PDFs, keep them: an issued invoice's PDF does not change after voiding or correcting it. ## What else changed - **Simplified invoices generated from Stripe never identify the customer.** Below the connection's simplified threshold, for a customer with a NIF but no address, or when the connection has no default standard series, the simplified invoice keeps the name, email and address of the payment but not the NIF or `alternative_id`, and it is not linked to the customer. A customer who needs an identified invoice needs a charge at or above the threshold, with full fiscal data. - **English is the default language.** A request without `Accept-Language`, or with one that asks for none of `es`, `en` and `ca`, gets its messages in English. - **A missing scope answers `403` first.** A key without the scope of the operation gets `403 INSUFFICIENT_SCOPE` before the body or the parameters are validated, instead of a `422` or `400` about them. - **Invoice emails go to `billing_emails` before `email`.** Without `recipients` in the request or in the invoice's `email_config`, an invoice goes to the customer's `billing_emails`, and to `email` only when there are none. It applies to `/send`, to the automatic send on issue and to recurring invoices. A corrective with `send_automatically: true` uses the customer's addresses too. - **One number per issuer.** Creating or editing a series that could print a number another series of the company prints answers `409 SERIES_FORMAT_OVERLAPS`. Issuing a number another invoice of the company already has answers `400 SERIES_NUMBER_COLLISION`, without issuing or using a number. - **`initial_number` applies to the first period only.** With an `ANNUAL` or `MONTHLY` reset, every later year or month starts at 1. No number already issued changes. - **Invoice numbers fit the AEAT.** A series whose longest number exceeds 60 characters, or would carry `"`, `'`, `<`, `>` or `=`, answers `422` when you create or edit it; an invoice number that breaks the rule at issue answers `422` without using the number. - **VeriFactu: fewer, clearer webhooks.** `verifactu.status.updated` is sent only when the public status changes. A temporary AEAT error keeps the invoice `PENDING`, with no `error_code` or `error_message`, while BeeL. retries it. A submission refused before it reached AEAT, or one BeeL. stopped waiting for, is `REJECTED` and now also sends the webhook; its `error_message` is BeeL.'s own text. - **Addresses: `country_code` decides the country.** `country` is accepted only as a real ISO code or the country's official name in Spanish, English or Catalan (`UK` answers `422 COUNTRY_CODE_REQUIRED`; the code is `GB`), and a `country` that contradicts `country_code` answers `422 COUNTRY_CODE_MISMATCH`. Responses always carry the code and the Spanish name derived from it. - **Webhooks.** Turning a paused subscription back on also counts towards the 10 active subscriptions: `400 WEBHOOK_ACTIVE_SUBSCRIPTION_LIMIT_REACHED`, the code an 11th subscription now gets too. The new retry schedule is in [its own entry](/changelog/webhook-retries-span-three-days). - **Managed accounts.** An account claimed by its holder with no NIF yet reads `CLAIMED`, not `ACTIVE`, in the account, the list and its `status` filter. Every account is born with one company, so `POST /v1/accounts` returns a `company_id` with or without a `tax_profile`. - **Companies.** Creating a company keeps the trade name and the whole address, and answers `502 EXTERNAL_SERVICE_ERROR` when the AEAT census cannot be reached, storing nothing. A Spanish postal code without 5 digits answers `422 POSTAL_CODE_INVALID_ES`. Changing `nif`, `entity_type` or `legal_form` answers `422 IMMUTABLE_…`, and a `legal_name` change with the census down answers `200` and is checked again later. - **Imports.** A Holded file over 5,000 contacts or 10 MB is rejected whole with `400 TOO_MANY_RECORDS` or `CSV_FILE_TOO_LARGE`, instead of being cut. - **The invoice PDF prints the QR centred at the top of the first page**, at the size the AEAT requires, with «QR tributario:» above it and the AEAT legend below, both centred. It applies to invoices issued from now on: the PDF of an invoice already issued is not generated again. - **Filter invoices by payment method.** The invoice lists accept `payment_method`, one value or several separated by commas (`payment_method=DIRECT_DEBIT,CARD`); `NONE` also matches invoices with no payment method stored. - **Provisioning again keeps a valid claim link.** Resending the `external_ref` of an unclaimed account, or re-importing it, no longer replaces a claim link that is still valid: `claim_token` and `claim_url` come back `null` with `claim_link_already_issued: true`, and no email is sent. A fresh link is issued only when none is valid; to replace one on purpose, use `POST /v1/accounts/{account_id}/claim-tokens`. - **The VeriFactu records of an invoice** list a registration refused before it reached AEAT as `REJECTED` until the invoice is sent again, when the new attempt takes its place. `error_message` is BeeL.'s own text when AEAT gave no answer, and `error_code` travels only when AEAT gave one. - **The PDF of an issued invoice never changes.** It is generated once, with its VeriFactu QR when that applies, and served as it was delivered. Voiding the invoice or issuing a corrective for it, including a `TOTAL` one, does not change the PDF or add a watermark: the status is in `status` and `verifactu.submission_status`. In the sandbox every PDF keeps the test-invoice watermark. - **`invoice.pdf.generated` fires once for an issued invoice** and carries `data.generation`, which numbers the stored PDF (`1` for the first). It only goes past `1` in the exceptional case that BeeL. staff regenerate the PDF to fix a rendering defect. Events recorded before the field existed do not carry it: treat a missing value as unknown, not as `1`. - **The simplified-invoice cap is checked on every path.** A `SIMPLIFIED` invoice over 3,000 € (VAT included) answers `400 SIMPLIFIED_INVOICE_EXCEEDS_LEGAL_LIMIT` when it is created, as it always did, and now also when an edit takes it over the cap and when it is issued; an edit used to fail with a `500`. The reference said `422` for this code: the status was always `400`, and the reference now says so. - **A recurring invoice template can change its type.** `PATCH` accepts `invoice_type`; the change is judged on the resulting template with the rules of the new type, so send the new `series_id`, and `customer_id: null` when moving to `SIMPLIFIED`, in the same call. - **Creating a company returns the whole company.** The `201` carries every field `GET /v1/companies/{company_id}` returns, with the same values, plus `series`. - **VeriFactu: a number AEAT already holds for another invoice.** If AEAT already has a record with an invoice's number and issue date that is not that invoice, for example one issued with the software you used before, the invoice ends `REJECTED`, with no `error_code` and an `error_message` that says the number is taken. Issue it again with a number AEAT does not hold yet. - **Customers in bulk.** Every row error carries a `code`, the same one the single create answers or one of its own (`CUSTOMER_DUPLICATED_IN_BATCH`, `CUSTOMER_FIELD_REQUIRED`…). If the AEAT census cannot be reached, the whole request answers `502` or `503` and nothing is saved, instead of blaming the rows. - **`POST /v1/nif/validate` answers a NIF with bad syntax with `200` and `status: INVALID`**, as its reference says, instead of an error. Its `message` comes in the language of the request. - **Webhook deliveries carry only the documented headers**, plus `User-Agent: BeeL-Webhooks`, and whatever HTTP itself adds. - **The daily cap on distinct recipient addresses applies per environment, and the sandbox now enforces it.** The sandbox and production each count their own addresses, and the sandbox applies its [published cap](/guides/sending-email#send-quotas), which it did not until now: a sandbox integration that emails many different addresses in a day may start getting `429`. Keep sandbox sends to a few addresses of your own. ## Endpoints - `POST /v1/companies/{company_id}/invoices` — 422 SIMPLIFIED_INVOICE_FORBIDS_IDENTIFIED_RECIPIENT (was 400); also on PATCH, issue, bulk and recurring templates; 422 RECIPIENT_CUSTOMER_AND_DATA_EXCLUSIVE - `POST /v1/companies/{company_id}/series` — document_type required; 409 SERIES_FORMAT_OVERLAPS - `PATCH /v1/companies/{company_id}/series/{series_id}` — 409 SERIES_FORMAT_OVERLAPS; UNASSIGNED no longer accepted - `POST /v1/companies/{company_id}/invoices/{invoice_id}/issue` — 400 SERIES_NUMBER_COLLISION; 422 when the number does not fit the AEAT - `PATCH /v1/accounts/{account_id}/webhooks/{webhook_id}` — Turning a subscription back on counts towards the limit of 10 - `POST /v1/companies/{company_id}/customers` — 422 ALTERNATIVE_ID_VAT_REQUIRES_EU_COUNTRY / ALTERNATIVE_ID_VAT_INVALID_FORMAT / ALTERNATIVE_ID_COUNTRY_REQUIRED - `GET /v1/companies/{company_id}/invoices` — New payment_method filter - `POST /v1/companies/{company_id}/invoices/{invoice_id}/send` — 202 while the PDF does not exist yet; 400 INVOICE_DRAFT_NOT_SENDABLE (draft or scheduled) / INVOICE_NOT_REGISTERED_NO_PDF; 422 INVOICE_EMAIL_NO_RECIPIENTS - `GET /v1/companies/{company_id}/invoices/{invoice_id}/pdf` — 400 INVOICE_NOT_REGISTERED_NO_PDF; the PDF of an issued invoice never changes - `POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective` — 422 CORRECTIVE_RECIPIENT_NOT_ACCEPTED and specific CORRECTIVE_* codes - `GET /v1/companies/{company_id}/invoices` — Unknown sort_by and empty list elements answer 400; new sort field due_date - `PATCH /v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}` — Accepts invoice_type; 422 SERIES_INCOMPATIBLE_DOC_TYPE ## Where to go next - [Series and numbering](/guides/series-and-numbering) - [Submission states](/verifactu/submission-states) - [Sending email](/guides/sending-email#recipients) - [Create a series](/invoice-series/createCompanySeries) - [International customers](/verifactu/international-customers#identifying-foreign-customers) - [Simplified vs standard](/verifactu/simplified-vs-standard#on-the-f2-path) - [Sending before the PDF exists](/guides/sending-email#sending-before-the-pdf-exists) - [The PDF and the QR](/verifactu/qr-and-pdf#the-pdf-and-the-qr) - [The number is already taken at AEAT](/verifactu/handling-rejections#the-number-is-already-taken-at-aeat) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Simplified invoice exchanges are recorded with VeriFactu With VeriFactu, exchanging simplified invoices now issues the full invoice and records it as `F3`. `SIMPLIFIED_EXCHANGE_NOT_RECORDABLE` now only means a simplified invoice issued without VeriFactu. Sep 28, 2026 · Breaking Until now, an exchange of simplified invoices for a full invoice answered `422 SIMPLIFIED_EXCHANGE_NOT_RECORDABLE` when the company had VeriFactu enabled, and nothing was issued. Now the full invoice is issued and recorded as `F3`, identifying each simplified invoice it replaces by number and issue date. The simplified invoices become `VOIDED` with `void_cause` `EXCHANGED`, as before, and keep their registration: no cancellation record is sent for them. An `F3` only replaces simplified invoices the AEAT already accepted, so each one in `simplified_invoice_ids` is checked before anything is issued. The exchange stays all or nothing, and without VeriFactu nothing changes. ## What breaks - **`SIMPLIFIED_EXCHANGE_NOT_RECORDABLE` changes meaning.** It no longer says that exchanges are unavailable with VeriFactu: it now names one simplified invoice that was issued without VeriFactu, which an `F3` cannot replace, and the message carries its number. An integration that read it as "not available yet" gets `201` for the same request now. - **Two new rejections on the exchange:** `422 EXCHANGE_SIMPLIFIED_NOT_YET_ACCEPTED` when a simplified invoice's registration is still pending (wait until it is accepted and retry), and `422 EXCHANGE_SIMPLIFIED_RECORD_REJECTED` when it was rejected (fix or resubmit it first). - **A simplified invoice listed twice is rejected:** `simplified_invoice_ids` used to drop a repeated id silently; now the request fails with `422 EXCHANGE_DUPLICATED_SIMPLIFIED`, naming the repeated invoice, and nothing is issued. A `null` in the list fails with `422 MISSING_REQUIRED_FIELD`. The contract no longer declares `uniqueItems` on the list. - **An exchange invoice recorded as `F3` cannot be corrected yet:** a corrective on it answers `422 EXCHANGE_INVOICE_NOT_CORRECTABLE`. It still cannot be voided either (`EXCHANGE_INVOICE_NOT_VOIDABLE`). ## Does this affect you? - If you branch on `SIMPLIFIED_EXCHANGE_NOT_RECORDABLE` to hide or postpone exchanges under VeriFactu, remove that branch: the exchange works now. - If you exchange simplified invoices right after issuing them, handle `EXCHANGE_SIMPLIFIED_NOT_YET_ACCEPTED` by retrying once `verifactu.status.updated` reports them accepted. - If you correct exchange invoices, handle `EXCHANGE_INVOICE_NOT_CORRECTABLE`. ## What else changed - **Same company and environment.** Every simplified invoice must belong to the company in the path and to the environment of the API key; otherwise `422 SIMPLIFIED_NOT_EXCHANGEABLE`. - **Webhook examples:** the `verifactu.status.updated` examples in the reference now show `operation`, including an accepted cancellation. ## Endpoints - `POST /v1/companies/{company_id}/invoices/simplified-exchanges` — Recorded as F3 with VeriFactu; EXCHANGE_SIMPLIFIED_NOT_YET_ACCEPTED, EXCHANGE_SIMPLIFIED_RECORD_REJECTED, EXCHANGE_DUPLICATED_SIMPLIFIED - `POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective` — EXCHANGE_INVOICE_NOT_CORRECTABLE on an F3 exchange invoice ## Where to go next - [Exchanging simplified invoices with VeriFactu](/verifactu/simplified-vs-standard#exchange-with-verifactu) - [Exchange simplified invoices](/invoices/createCompanySimplifiedExchange) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Exchange simplified invoices for a full invoice A new operation issues a full invoice in exchange for simplified invoices when the customer asks for one with their details. With VeriFactu it is now recorded as `F3`. Sep 27, 2026 · New When a customer who paid with a simplified invoice asks for an invoice with their details, `POST /v1/companies/{company_id}/invoices/simplified-exchanges` issues a `STANDARD` invoice with the lines of up to 50 simplified invoices and the `recipient` you send. It is not a corrective invoice: it documents the same operations again, identifying the customer. The new invoice lists the ones it replaces in `replaced_invoice_ids`, and each simplified invoice becomes `VOIDED` with the new `void_cause` value `EXCHANGED`, in the same act. The exchange invoice cannot be voided afterwards; if it is wrong, correct it with a corrective invoice. When the invoice would be recorded with VeriFactu, the request answered `422 SIMPLIFIED_EXCHANGE_NOT_RECORDABLE` and nothing was issued. **Update:** with VeriFactu the exchange invoice is now issued and recorded as `F3`, and `SIMPLIFIED_EXCHANGE_NOT_RECORDABLE` only names a simplified invoice issued without VeriFactu. An `F3` exchange invoice cannot be corrected yet. See [Simplified invoice exchanges are recorded with VeriFactu](/changelog/simplified-exchange-recorded-with-verifactu). ## What else changed - **Rejections:** `422 EXCHANGE_REQUIRES_SIMPLIFIED` when an id is not a simplified invoice; `422 SIMPLIFIED_NOT_EXCHANGEABLE` when it is not issued, or was already voided, exchanged or corrected; voiding the exchange invoice answers `422 EXCHANGE_INVOICE_NOT_VOIDABLE`. - **If you read `void_cause`** with a strict enum, add `EXCHANGED`; `replaced_invoice_ids` is a new optional field on every invoice response. ## Endpoints - `POST /v1/companies/{company_id}/invoices/simplified-exchanges` — New: a full invoice in exchange for simplified invoices ## Where to go next - [Exchange simplified invoices](/invoices/createCompanySimplifiedExchange) - [Simplified vs standard](/verifactu/simplified-vs-standard) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # A simplified invoice can no longer name an identified recipient Creating or updating a `SIMPLIFIED` invoice whose recipient has a NIF or an alternative identifier now answers `400 SIMPLIFIED_INVOICE_FORBIDS_IDENTIFIED_RECIPIENT`. Issue it as `STANDARD`. Sep 22, 2026 · Breaking BeeL. no longer issues a simplified invoice that names an identified recipient: an invoice that identifies its recipient is issued as a standard one, whatever the amount. A simplified invoice that named one used to be accepted, up to 3,000 €. It is now rejected on create and on update. This is a BeeL. rule. A simplified invoice without an identified recipient, the ticket for a final consumer, works as before. ## What breaks - **The trap: a `customer_id` counts too.** The check runs on the resolved recipient, so a `SIMPLIFIED` invoice that points at a stored customer with a NIF is rejected, even if the body carries no NIF of its own. - **Both writes are affected.** `POST` a new invoice, or `PATCH` a draft, with `type: SIMPLIFIED` and a recipient carrying `nif` or `alternative_id`: `400 SIMPLIFIED_INVOICE_FORBIDS_IDENTIFIED_RECIPIENT`, where it used to succeed. Send `type: STANDARD` with the full recipient instead. ## Does this affect you? - Grep your client for `SIMPLIFIED`. Any path that sets it and also sends `nif`, `alternative_id` or a `customer_id` for a business customer needs to switch to `STANDARD`. ## What else changed - **The cap is unchanged:** 3,000 € (VAT included) on a simplified invoice without an identified recipient, as before (`SIMPLIFIED_INVOICE_EXCEEDS_LEGAL_LIMIT`). The RD 1619/2012 sets 400 € as the general limit (art. 4.1) and 3,000 € for the operations listed in its art. 4.2, such as retail and hospitality; which one applies depends on the issuer's activity. - **Invoices generated from a Stripe connection are not affected.** They follow the connection's own simplified threshold, as described in the Stripe guide. - **Correctives are not affected.** ## Endpoints - `POST /v1/companies/{company_id}/invoices` — 400 SIMPLIFIED_INVOICE_FORBIDS_IDENTIFIED_RECIPIENT - `PATCH /v1/companies/{company_id}/invoices/{invoice_id}` — Same check on the resulting draft ## Where to go next - [Simplified vs standard](/verifactu/simplified-vs-standard) - [SIMPLIFIED_INVOICE_FORBIDS_IDENTIFIED_RECIPIENT](/errors/SIMPLIFIED_INVOICE_FORBIDS_IDENTIFIED_RECIPIENT) - [Create an invoice](/invoices/createCompanyInvoice) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Issuing or scheduling a standard invoice checks the recipient's name and address A standard invoice whose recipient lacks a tax ID, name or address is rejected with `422` when you issue or schedule it, saved customer included. Oct 23, 2026 · Improved The check now runs on the recipient as it will be issued, including data that comes from a saved customer, so a customer saved without an address now stops the issue instead of reaching the invoice. ## What else changed - Missing tax ID: `RECIPIENT_ID_REQUIRED`. Missing name: `RECIPIENT_FISCAL_NAME_REQUIRED`. Missing address: `RECIPIENT_ADDRESS_REQUIRED`. ## Where to go next - [Issue an invoice](/invoices/issueCompanyInvoice) - [Schedule an invoice](/invoices/setCompanyInvoiceSchedule) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # The street number is no longer required in an address `address.number` is now optional: omit it when the address has none, or when `street` already carries it. Sep 2, 2026 · Improved `address.number` was required in every address you send — a customer, a company, an invoice recipient — so an address that genuinely has none had to be padded with something to get past a `422`: a named building, a rural road, or a `line1` arriving from another system that already carries the number inside the street. It is now optional. Omit it when the address has no number, or when `street` already carries the address in full; `street`, `postal_code`, `city` and `province` are unchanged, and addresses you already send with a number keep working untouched. One trap if you build the body dynamically: `number` is still validated when it is present, and an empty string is not a way to say "none". Omit the key — `"number": ""` is rejected with `422`. ## Endpoints - `POST|PATCH /v1/companies/{company_id}/customers` — `address.number` may be omitted - `POST /v1/companies/{company_id}/invoices` — `recipient.address.number` may be omitted - `POST /v1/accounts/{account_id}/companies` — `address.number` may be omitted ## Where to go next - [Create a customer](/customers/createCompanyCustomer) - [Create a company](/companies/createCompany) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Unknown query parameters rejected from 3 September From **2026-09-03** the flat routes reject an undeclared query parameter with `400` instead of ignoring it. Until then they answer `200` with a `BeeL-Warning` header naming it. Aug 21, 2026 · Breaking From 2026-09-03 the flat routes reject a query parameter they do not declare with `400`, instead of silently ignoring it. Until then every affected response carries a `BeeL-Warning` header naming the parameter, so you can find them before the date. The rate limits you are actually subject to are now written down. ## What else changed - **What changes, and when.** The canonical routes — `/v1/companies/{company_id}/…` and `/v1/accounts/{account_id}/…` — have always answered `400` naming an unrecognised query parameter. Nothing changes for them. The flat aliases (`/v1/invoices`, `/v1/customers`, `/v1/products`, …) still ignore it today: you get `200`, but the filter, ordering or flag you sent was never applied. From **2026-09-03** they answer like the canonical routes. - **How to find out if this affects you, before the date.** Any alias response that dropped a parameter carries a `BeeL-Warning` header naming it. Log that header and you have the exact list of requests to fix. The most common case by far is `per_page`, which in this API is spelled `limit` — if you send `per_page` today you are being served an unpaginated default and probably have not noticed. - **Which status you get, and why.** A value outside a parameter's vocabulary — an unknown enum, a malformed UUID — is `400`: the fault is in the request target, not in its content. `422` is reserved for a body that parses but is semantically wrong. One crossover: a parameter that parses but whose value the operation will not take (a `limit` under its minimum, a `cursor` that is not one of ours) answers `422`, and the operations where that happens declare it. - **Rate limits are now documented.** Three tiers — global, standard and a stricter one for the heavier operations — on a fixed 60-second window. They are enforced at the network edge and independently at each location, so short bursts may exceed the nominal figure before throttling engages: read each figure as the rate at which you may start receiving `429`, not as an exact quota. - **The bucket depends on how you authenticate.** With an API key the window is counted per key: it is your bucket and nobody else spends it. With OAuth2 or a dashboard session it is counted per client, on a budget you share. If you integrate at any volume, use an API key — it is the only credential with a quota of its own. - Operations carrying a `Sunset` header are never canonical, whatever their shape: they keep the lax behaviour until they are removed. --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Stripe: a buyer with a NIF always gets a standard invoice, and the simplified threshold is deprecated A Stripe charge whose buyer has a NIF and a complete address is invoiced as STANDARD at any amount, a charge that cannot be invoiced is saved as a draft, and `simplificada_threshold` no longer has any effect. Oct 9, 2026 · Improved Three changes to how a connected Stripe account is invoiced. None of them changes an invoice that already exists, and no request or response changes shape. ## What else changed - **A buyer with a NIF (or foreign identifier) and a complete address always receives a `STANDARD` invoice**, whatever the amount. Before, a charge below the connection's threshold was issued as `SIMPLIFIED`, which never carries the buyer's NIF. Without that data the charge still gets a `SIMPLIFIED` invoice up to 3 000 €. - **A charge that cannot be invoiced is saved as a draft** instead of waiting as a skipped event: a charge above 3 000 € whose buyer has no NIF or address, and a charge whose NIF the AEAT definitively rejects. The draft appears in **Needs attention**, and on Live connections BeeL. emails the issuer. Complete the recipient and issue it. - **`simplificada_threshold` is deprecated.** The API still accepts and returns it, with the same validation, but its value no longer affects the invoice type. You can stop sending it. - **What to do:** nothing is required. If you relied on the threshold to keep small sales to identified buyers as simplified invoices, those sales are now standard invoices. To avoid drafts, collect tax IDs and the full billing address in Stripe. ## Endpoints - `GET /v1/companies/{company_id}/payment-connections` — `simplificada_threshold` is returned but deprecated and ignored - `PATCH /v1/companies/{company_id}/payment-connections/{connection_id}` — `simplificada_threshold` is still accepted but deprecated and ignored ## Where to go next - [What invoice gets generated](/stripe/generated-invoices#forward-invoices-standard-vs-simplified) - [Charges that cannot be invoiced automatically](/stripe/generated-invoices#charges-that-cannot-be-invoiced-automatically) - [Connection settings](/stripe/connection-settings#simplified-threshold-deprecated) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Stripe: charges without a PaymentIntent are invoiced, and `external_payment_id` can start with `ch_` or `pr_` A charge without a PaymentIntent, or a Stripe invoice paid outside Stripe, is now invoiced; its `external_payment_id` starts with `ch_` or `pr_`, not `pi_`. Oct 22, 2026 · Improved Both used to be skipped. If your code assumes `external_payment_id` is always a PaymentIntent id, accept the `ch_` and `pr_` prefixes too. A dispute on a charge BeeL. did not invoice is no longer an incident: there is no invoice to correct. ## Where to go next - [Finding generated invoices](/stripe/generated-invoices#finding-generated-invoices) - [Supported events](/stripe/supported-events) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Stripe: manual 0 % rates and the buyer's country on paid invoices A manual 0 % tax rate in Stripe is invoiced for buyers in the peninsula or the Balearic Islands, and `invoice.paid` reads the buyer's country from the payment. Oct 8, 2026 · Improved Two changes to how a connected Stripe account is invoiced. Neither one changes an invoice that already exists. ## What else changed - **A manual 0 % tax rate in Stripe no longer leaves the charge without an invoice** when the buyer is in the peninsula or the Balearic Islands. This is the rate some platforms create by default. BeeL. applies the default exemption reason your company declared, or asks you to declare it. Buyers in the Canary Islands, Ceuta or Melilla, buyers from other countries, and payments with no postal code still wait in **Needs attention**. - **`invoice.paid` now sees the buyer's country.** When neither the Stripe invoice nor its customer carries one, BeeL. takes it from the billing address of the payment that paid the invoice, so both events of the same charge see the same buyer. - **A buyer outside Spain with an incomplete address** is no longer invoiced as if the sale were Spanish. If the sale cannot go on a simplified invoice, the charge waits with a draft to complete, as it already did for the payment event. - **What to do:** if you sell exempt with a 0 % rate in Stripe, declare your default exemption reason in BeeL. under Settings > Taxes. If you sell outside Spain, collect the full billing address (street, city, postal code and country) at checkout. ## Where to go next - [Charges at 0 %](/stripe/configuracion-impuestos#charges-at-0) - [Buyers outside Spain](/stripe/generated-invoices#buyers-outside-spain) - [Data conversion](/stripe/data-conversion) - [Connection settings](/stripe/connection-settings#auto-invoicing) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Stripe connections: faster correctives, disputes you can see, and exact amounts A card refund gets its corrective at once, disputes and voided credit notes raise a review item, and correctives and shipping add up to the cent. Sep 15, 2026 · Improved A set of changes, rolled out between August and mid-September, to what a connected Stripe account produces in BeeL. None of them asks anything of you. They change when a corrective appears, what reaches your review queue, and the amounts on the invoices. If you reconcile BeeL. against Stripe, the last two highlights are the ones to read. ## What else changed - **A card refund gets its corrective straight away.** It used to wait for a later Stripe update that could arrive a day later, or never. It is now issued as soon as the refund has succeeded. A refund is also no longer dropped because the connection was disconnected when it arrived. - **A dispute raises a review item** instead of going unnoticed. If you win it, the item closes on its own and the invoice stands. If you lose it, one item remains, and you decide whether the invoice needs a corrective. BeeL. never issues one for a dispute. - **Voiding a credit note in Stripe after its corrective was issued raises a review item.** The corrective is already numbered and submitted, and voiding the note does not undo it. A voided note that had produced nothing is ignored. - **A charge above 3,000 € without the customer's NIF can still be invoiced.** Generating a draft from the skipped event gives a standard invoice with the recipient left for you to complete. It cannot be issued until it has a NIF (or a foreign identifier) and an address. - **Shipping that Stripe charged without a tax rate** is invoiced at the VAT rate of the sale it belongs to, inside the amount charged, so the total is still exactly what Stripe collected. A sale that mixes rates shares the shipping between them in proportion to each rate's base. - **A refund's corrective matches the refunded amount to the cent.** Refunding 21.00 € of a 121.00 € invoice declares −21.00 €, never −21.01 €. ## Where to go next - [Supported events](/stripe/supported-events) - [Generated invoices](/stripe/generated-invoices) - [Shipping charged without VAT](/stripe/data-conversion#shipping-charged-without-vat) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Stripe: sales outside the Spanish VAT territory follow the product's tax code, and stop when in doubt Whether a charge is goods or services now comes from the Stripe product's tax code; unclear cases stop with a retryable `TAX_TREATMENT_NEEDS_DATA` instead of being issued. Oct 23, 2026 · Breaking Charges to buyers in the Canary Islands, Ceuta, Melilla or outside the EU no longer get a not-subject invoice from the country alone. Goods or services is read from the tax code of the Stripe product, or from your account's default tax code. ## What else changed - **Services to a business outside the EU:** standard invoice, not subject by place of supply. **Services to a consumer outside the EU:** the charge stops. - **Goods to the Canary Islands, Ceuta, Melilla or outside the EU:** exempt export, only with a physical shipping address in that same territory. Without one, the charge stops. - **Electronic services to a business in the Canary Islands, Ceuta or Melilla** with 0 % from Stripe: standard invoice, not subject. - **What stops:** no tax code, an ambiguous one, goods and services mixed, a customer country different from the charge's, and similar doubts. `failure_reason` is `TAX_TREATMENT_NEEDS_DATA`: fix the data in Stripe and retry. What BeeL. cannot reflect keeps `UNSUPPORTED_STRIPE_TAX_TREATMENT`. ## Where to go next - [Data conversion](/stripe/data-conversion) - [Retry a payment event](/payment-events/retryCompanyPaymentEvent) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Stripe: the connection's threshold decides simplified invoices again, and a buyer's NIF data never comes from the card Without complete fiscal data, a charge above the connection's simplified threshold (400 € by default) is no longer issued: it waits as a draft standard invoice. Oct 23, 2026 · Breaking This replaces part of what we announced on 9 October. `simplificada_threshold` is no longer ignored, and the buyer data of a charge with a NIF is stricter. Charges that used to be issued automatically can now wait as drafts until the buyer's data is completed. ## What else changed - **The threshold applies.** A charge whose buyer has no complete fiscal data (tax ID, name and address) gets a simplified invoice only up to the connection's `simplificada_threshold`. Above it, the charge waits as a draft standard invoice. The default is 400 €; you can raise it up to 3,000 €, which states that your activity is one of those in article 4.2 of RD 1619/2012. - **With a NIF, the card is never used.** The buyer's name comes only from the same Stripe object that carries the NIF, and the address only from what the buyer declared; the card adds nothing, not even the country. A NIF sent through metadata still accepts the card's billing details as declared. - **A NIF without name or address never becomes a simplified invoice.** At any amount, the charge waits as a draft standard invoice until the data is completed. ## Where to go next - [Connection settings](/stripe/connection-settings) - [Generated invoices](/stripe/generated-invoices) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Disbursements (suplidos): pass-through payments Invoice lines carry a `line_type`. Set `SUPLIDO` to pass through amounts paid in your client’s name, outside the taxable base. Jul 15, 2026 · New Invoice lines now carry a `line_type`. Set it to `SUPLIDO` to pass through amounts you paid in your client's name (art. 78.Tres.3 LIVA). These disbursements (*suplidos*) stay out of the taxable base, VAT and VeriFactu, and add to a new `total_to_pay` alongside the fiscal `invoice_total`. ## What else changed - **`line_type` on every invoice line** (`NORMAL` | `SUPLIDO`, defaults to `NORMAL`). A `SUPLIDO` line is excluded from the taxable base, VAT and VeriFactu. - **`source_invoice_reference`** (required on `SUPLIDO` lines) references the original third-party invoice issued in the client's name. - **`source_invoice_ids`** optionally links the BeeL. invoices that make up the disbursement, for audit traceability. - **New totals** `total_disbursements` (sum of disbursement lines) and `total_to_pay` (`invoice_total` + `total_disbursements`), which is the amount printed on the PDF and charged to the client. - The fiscal `invoice_total` and all tax breakdowns are unchanged: VeriFactu only ever sees `invoice_total`. ## Where to go next - [Disbursements guide](/verifactu/suplidos) - [Create invoice](/invoices/createInvoice) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Tax rates are judged by the operation date and the withholding by the issuer Temporary VAT and surcharge rates only on operations of their period, `0.625` becomes `0.62`, companies cannot withhold individuals' IRPF rates, and some regime keys are refused. Sep 27, 2026 · Breaking The rates, regime keys and exemptions an invoice accepts are now the ones AEAT accepts for that operation and that issuer, checked on create, edit and issue, before a number is used. Until now some of these invoices were issued and then rejected by AEAT. Correctives keep what their original carried: they are exempt from the values retired here. Invoices already issued do not change. ## What breaks - **Temporary VAT rates only on operations of their period**, judged on `operation_date` (or the issue date when there is none): 5 % from 2022-07-01 to 2024-09-30, and the new 2 % and 7.5 % from 2024-10-01 to 2024-12-31. Otherwise `422 VAT_RATE_NOT_ACCEPTED_ON_DATE`. A line at 5 % without an `operation_date` of that period is now rejected. - **The 5 % surcharge is `0.62`, not `0.625`**, from 2023-01-01, and `0.5` up to 2022-12-31. `0.625` answers `422 VALIDATION_ERROR`; a pair outside its period, `422 SURCHARGE_RATE_NOT_ACCEPTED_ON_DATE`. New pairs: 2 % ↔ `0.26` and 7.5 % ↔ `1` in the last quarter of 2024, and 21 % ↔ `1.75` for tobacco. Products, templates and configurations stored with `0.625` now read `0.62`; drafts and proformas were recalculated, and one that could not be answers `422 SURCHARGE_RATE_REQUIRES_RECALCULATION` at issue until you edit it. Issued invoices keep `0.625`. - **No entity withholds an individual's IRPF rate.** An issuer whose NIF starts with `A`, `B`, `C`, `D`, `F`, `G`, `Q`, `R`, `U` or `W` accepts only `0`, `19`, `24` and `9.5`; `N` only `0`, `19` and `24`; `S` and `P` only `0`. Anything else answers `422 IRPF_RATE_NOT_FOR_CORPORATE_ISSUER`, on invoice lines, products, the default tax configuration and recurring templates. A company's line sent without `irpf_rate` now takes `0` instead of a stored default of 15 %. - **Regime keys `03`, `06` and `14` are refused** with `422 REGIME_KEY_NOT_SUPPORTED`. And what AEAT requires with each key is checked before numbering: `04` only with reverse charge or an exemption, `08` only with `NO_SUJETA_LOCALIZACION` (it is not the IGIC general regime, which is `01`), `10` only on a `STANDARD` invoice to a recipient with `nif`, `11` only at 21 %. The codes are `REGIME_KEY_CLASSIFICATION_NOT_ACCEPTED`, `REGIME_KEY_REQUIRES_VAT_RATE`, `REGIME_KEY_REQUIRES_STANDARD_INVOICE` and `REGIME_KEY_REQUIRES_RECIPIENT_NIF`. - **`EXENTA_ART_26` is refused on an issued invoice** (`422 EXEMPTION_NOT_FOR_ISSUED_INVOICE`): it exempts the buyer's acquisition. A supply to another member state is `EXENTA_ART_25`. - **`irpf_rate` and `equivalence_surcharge_rate` in responses are plain numbers**, and so are `default_irpf_rate` and `default_equivalence_surcharge` of the tax configuration: they carry what was stored, which an older invoice may hold outside today's list. The JSON of an integer rate does not change, but an SDK generated from the previous contract types them as enums and fails on `2.8`, `7.6` or `9.5`, or on an issued `0.625`: regenerate it. The unused schemas `VatCategory`, `IrpfCategory`, `IgicPercentage`, `IpsiPercentage` and `OtherTaxPercentage` are gone from the contract. ## Does this affect you? - If you invoice from a company NIF with `irpf_rate` 1, 2, 7 or 15, use `0` (a service) or `19` / `24` where the Corporate Income Tax requires it. - If you send `equivalence_surcharge_rate: 0.625`, send `0.62`. - If you issue late invoices at 5 %, 2 % or 7.5 % VAT, send the `operation_date` of the period. - If you use regime keys `03`, `06`, `08`, `10`, `11` or `14`, check the requirements above. - If you use a generated SDK with enums for `irpf_rate` or `equivalence_surcharge_rate`, regenerate it. ## What else changed - **Ceuta and Melilla withholding rates:** `6`, `2.8` and `7.6` for individuals, `9.5` for companies (`422 IRPF_RATE_ONLY_FOR_CORPORATE_ISSUER` from an individual). `irpf_rate` is a number now; `15.0` is `15`. - **`withholding_options`** in the company's tax configuration lists the IRPF rates that company can use and the one to preselect: build the IRPF picker from it. - **`GET /v1/tax-types`** gives every rate and every VAT ↔ surcharge pair its `valid_from` and `valid_until`, and offers only the regime keys that are accepted. A surcharge can appear twice (`0.5` with 4 % and with 5 %): key them by rate and VAT. - **Newly accepted:** reverse charge `ISP_ART_84_2_B`, `_C` and `_D`; `EXENTA_ART_140` (investment gold); regime key `02` with IGIC; `05` and `07` with the mention of their regime on the PDF. `ISP_ART_84_2_G` is refused with `422 REVERSE_CHARGE_CASE_NOT_SUPPORTED`: the law requires a special series for it. - **`entity_type` must match the NIF** when a company is created or updated: `422 ENTITY_TYPE_INCONSISTENT_WITH_NIF`. ## Endpoints - `POST /v1/companies/{company_id}/invoices` — VAT_RATE_NOT_ACCEPTED_ON_DATE, SURCHARGE_RATE_NOT_ACCEPTED_ON_DATE, IRPF_RATE_NOT_FOR_CORPORATE_ISSUER, REGIME_KEY_*; also on PATCH and issue - `GET /v1/companies/{company_id}/tax-configuration` — New read-only withholding_options; default rates are plain numbers - `GET /v1/tax-types` — valid_from / valid_until on every rate and surcharge pair; only the accepted regime keys ## Where to go next - [Equivalence surcharge](/verifactu/equivalence-surcharge) - [Regime keys](/verifactu/regime-keys) - [Tax classification](/verifactu/tax-classification) - [Get the tax configuration of a company](/tax-configuration/getCompanyTaxConfiguration) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # A unit price with more than 4 decimals is rejected, not rounded A `unit_price` with more than 4 significant decimals now answers `422 LINE_UNIT_PRICE_TOO_MANY_DECIMALS` instead of being rounded silently. Round to 4 decimals, or send the line total. Oct 2, 2026 · Breaking The contract has always said `unit_price` supports up to 4 decimal places, but a price with more was rounded silently to 4: `1000 × 0.12345` was invoiced at `0.1235` with a base of `123.50`, and `0.00001` was stored as `0`. The invoice then said something different from what you sent. Now that line answers `422 LINE_UNIT_PRICE_TOO_MANY_DECIMALS` and the invoice is not created or changed. Trailing zeros do not count: `10.500000` is still `10.5`. ## What else changed - **Applies wherever you send a `unit_price`:** creating and editing invoices, corrective invoices, and recurring invoice templates. - **Who is affected:** integrations that send prices with 5 or more significant decimals, typically computed by division (`total / quantity`) without rounding. - **What to do:** round the price to 4 decimals before sending it. If what you know is the line total, send it in `total_excluding_tax` or `total_including_tax` and the unit price is derived from it. ## Where to go next - [LINE_UNIT_PRICE_TOO_MANY_DECIMALS](/errors/LINE_UNIT_PRICE_TOO_MANY_DECIMALS) - [Create an invoice](/invoices/createCompanyInvoice) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # v1.0.1 — operation_date `issue_date` is now always today, and a new `operation_date` carries the date the service was actually rendered. Mar 26, 2026 · Breaking The issue_date of an invoice is now always the day it is actually issued in BeeL., when its billing record is generated, and a new operation_date field lets you record when the operation actually took place. ## What else changed - New `operation_date` field on invoices — use when invoicing for a past operation (e.g., services delivered last month but invoiced this month) - `issue_date` is now read-only and always set to today per VeriFactu regulations - `issue_date` removed from required fields in CreateInvoiceRequest - Duplicate invoice no longer accepts a custom `issue_date` — duplicates are always dated today - Idempotency header renamed from `X-Idempotency-Key` to `Idempotency-Key` (standard naming) - Improved `due_date` documentation — must be same as or after today's date - New `start_date` field on recurring invoice creation ## Endpoints - `POST /v1/invoices` — operation_date replaces issue_date in request body - `PUT /v1/invoices/{invoice_id}` — operation_date (nullable) replaces issue_date - `POST /v1/invoices/{invoice_id}/duplicate` — issue_date param removed from request ## Where to go next - [Invoice API Reference](/invoices/listInvoices) - [VeriFactu Guide](/verifactu) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # v1.0.3 — exemptions and document types VeriFactu exemptions and document types, plus stricter validation on fiscal fields. Apr 18, 2026 · Breaking Second round of VeriFactu compliance improvements: invoice lines can now carry an explicit exemption reason, the tax-types endpoint exposes the full LIVA exemption catalog, invoice series can be typed, and the `id_otro` VeriFactu rules are now enforced with specific error messages. ## What breaks - **`irpf_rate` enum** — `21.00` is removed and `1.00` is added on `lines[].irpf_rate` (`POST/PUT /v1/invoices`, `POST /v1/invoices/{invoice_id}/corrective`) and on `default_irpf_rate` (`PUT /v1/configuration/taxes`). 21% IRPF is not a valid withholding rate for the flows BeeL. supports. - **`template_html` removed** — the `template_types[].template_html` property no longer ships in `GET /v1/configuration/invoice-customization-options`. PDF templates are owned and rendered by the backend; clients should not inspect the raw HTML. - **Stricter NIF pattern** — `POST/PUT /v1/customers` and `POST /v1/customers/bulk` now validate `nif` against the full DNI/NIE/CIF regex `^(\d{8}[A-Z]|[ABCDEFGHJKLMNPQRSUVW]\d{7}[A-Z0-9]|[XYZ]\d{7}[A-Z])$` instead of the permissive `^[A-Z0-9]{9}$`. Previously-accepted but invalid strings (e.g. `ABCDEFGHI`) will now be rejected. ## What else changed - **Invoice line exemption reasons** — `exemption_reason` (enum covering `EXENTA_ART_*`, `NO_SUJETA_*`, `ISP_ART_84_2_*`, `REGIMEN_ART_*` and `OTRO`) and the free-text `exemption_reason_text` are now accepted and returned on invoice lines. Required by VeriFactu whenever a line is exempt or not-subject. - **Exemption reasons catalog** — `GET /v1/configuration/tax-types` returns the full LIVA exemption catalog so integrators can build UIs without hardcoding the list. - **Typed invoice series** — new `document_type` on `/v1/configuration/series` (request, response and list query filter), so you can segregate series for invoices, corrective invoices, etc. - **Descriptive alternative ID types** — `id_otro.type` now accepts `PASSPORT`, `COUNTRY_ID`, `NIF_IVA`, `RESIDENCE_CERTIFICATE`, `OTHER_DOCUMENT`, `NOT_REGISTERED` alongside the legacy numeric codes `02`–`07` (still valid, now deprecated). - **VeriFactu `id_otro` rules enforced at the boundary** — if `country_code = ES` the `type` must be `PASSPORT` (03) or `NOT_REGISTERED` (07); if `type = NOT_REGISTERED` the `country_code` must be `ES`. Violations return 422 with a specific message per rule (previously a generic "identificador alternativo no es válido"). --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # v1.1.0 — recipient and payment_info Invoice `recipient` and `payment_info` become structured objects, and new series get sensible defaults. May 6, 2026 · Breaking Invoice recipient and payment_info schemas have been refactored to use structured objects with allOf composition. This change normalizes the API and enables future extensibility. Also adds new series defaults endpoints. ## What breaks - **PUT /v1/invoices/{invoice_id} schema change** — `recipient` and `payment_info` now use `allOf` composition referencing `Recipient` and `PaymentInfo` schemas. The fields (`nif`, `legal_name`, `iban`, `method`, etc.) remain available but the schema path changed from inline properties to a $ref. Clients using generated SDKs may need to regenerate. - **SDK regeneration recommended** — If you use generated clients from the OpenAPI spec, regenerate them to pick up the new schema references. The underlying fields are the same; only the structure (and how the SDK types represent them) has changed. ## What else changed - **Structured `recipient` and `payment_info`** — PUT /v1/invoices/{invoice_id} now uses `allOf` composition with `PaymentInfo` and `Recipient` schemas. Fields like `nif`, `legal_name`, `iban`, `method` are still available via the referenced schemas, but the structure changed from inline to composed. Regenerate your SDK if you use one. - **New series defaults endpoints** — POST /v1/configuration/series/defaults and GET /v1/configuration/series/defaults-status allow setting and checking per-document-type default series. - **Idempotency-Key header** — Now formally documented on POST /v1/customers. - **Invoice email options** — All invoice endpoints now return `email_config` and `send_automatically` fields in responses. ## Endpoints - `PUT /v1/invoices/{invoice_id}` — recipient and payment_info now use allOf composition — update your request payload structure - `POST /v1/configuration/series/defaults` — Set default series per document type - `GET /v1/configuration/series/defaults-status` — Check which series have defaults configured ## Where to go next - [Invoice API Reference](/invoices/listInvoices) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # v1.2.0 — VeriFactu validation pack Invalid fiscal combinations now fail at request time with specific `422`s. Adds a public error-code catalog, metadata filters, the RD-ley rates and BIZUM. May 22, 2026 · Breaking Third wave of VeriFactu compliance hardening: invalid fiscal combinations are now rejected at request time with specific 422s, a public error-code catalog is available at docs.beel.es with stable per-code pages, Stripe-style metadata filtering on the invoices list, RD-ley 11/2022 temporary rates (5% IVA + 0.625% equivalence surcharge), BIZUM as a new payment method, and several Stripe Connect refinements. ## What breaks - **Stricter VeriFactu validation rejects previously-accepted invoices** — invoices that combined incompatible options (ISP + equivalence surcharge, OSS + ISP exemption, simplified invoice + IRPF, 0% IVA without reason, etc.) used to pass the request and fail later. They now fail with 422 and a specific code at request time. Re-test integrations that exercise edge-case fiscal combinations. - **`VatPercentage` schema type widened from `integer` to `number`** — all currently allowed values are still whole numbers (0, 4, 5, 10, 21), so wire-level responses do not change. Strongly-typed SDK clients generated from the OpenAPI spec (Java, C#, Go) should regenerate to pick up the new schema type; loose clients (JavaScript, Python without strict typing) need no changes. - **`payment_info.method = BIZUM` may be returned where it previously wasn't** — clients that exhaustively switch on `method` should add a `BIZUM` branch (or a default arm). - **`lines[].iva_rate = 5.00` may now be returned** — same as above for clients enumerating known rates. ## What else changed - **VeriFactu validation pack** — incompatible fiscal combinations now fail with a specific 422 before the billing record is built: simplified invoices combined with cross-border / IRPF / ISP, ISP carrying the equivalence surcharge, OSS regime + ISP exemption, 0% IVA lines without an explicit reason, regimes / exemption articles that are currently unsupported. Each case returns its own error code so you can branch on it. - **Public error-code catalog at `docs.beel.es/errors/{code}`** — every code that an API-key integrator can receive now has a stable, deep-linkable page. The `type` URI in error responses resolves there directly. The catalog covers 199 codes across 8 domains; codes that only surface from the web app are deliberately kept out. - **`metadata[key]=value` filter on `GET /v1/invoices`** — Stripe-style deepObject filtering. Multiple pairs are AND'd together. Up to 50 pairs per request; keys must match `^[A-Za-z0-9_\-.]{1,64}$`. Example: `?metadata[external_order_id]=ORD-42&metadata[tenant]=acme`. - **New 5% VAT rate (RD-ley 11/2022)** — `VatPercentage` now accepts `5` as a valid temporary reduced rate alongside 0, 4, 10 and 21. - **New 0.625% equivalence surcharge** — `EquivalenceSurchargePercentage` adds `0.625`, the surcharge that pairs with 5% VAT under RD-ley 11/2022. Documented allowed pairings: 4 ↔ 0.5, 5 ↔ 0.625, 10 ↔ 1.4, 21 ↔ 5.2. - **BIZUM as a payment method** — `payment_info.method` now accepts `BIZUM`. Returned in responses and accepted on `POST/PUT /v1/invoices`. - **Clearer error when scheduling an ORDINARIA invoice without a recipient identifier** — now returns 422 with a specific, actionable message instead of the previous generic validation error. - **PDF includes the VeriFactu QR consistently** — the downloaded PDF now always carries the VeriFactu QR when the invoice has one (previously a race could ship a PDF without it). - **Stripe Connect refinements** — forward and corrective invoices generated from Stripe now mirror the exact Stripe charge total (no recalculation). Simplified invoices preserve the Stripe customer's name/email instead of falling back to `Consumidor final`. The cross-border alternative-ID gap is closed. ## Endpoints - `GET /v1/invoices` — Added `metadata[key]=value` query parameter (deepObject) for filtering by metadata pairs ## Where to go next - [Error reference](/errors) - [Handling errors guide](/guides/handling-errors) - [Equivalence surcharge](/verifactu/equivalence-surcharge) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # v1.3.0 — contract fixes Idempotency keys accept any string, `country` becomes optional, and webhook URLs must be HTTPS. Jun 10, 2026 · Breaking Contract-correctness wave from an API test pass. Idempotency keys no longer have to be UUIDs, address country becomes optional, webhook endpoints must be HTTPS, and several error responses are now more accurate (correct codes, correct status, and a previously-opaque 500 turned into an actionable 422). ## What breaks - **Webhook endpoints must be HTTPS** — `POST /v1/webhooks` (and updates) now reject `http://` URLs with 422 `WEBHOOK_URL_MUST_BE_HTTPS`. Signed fiscal payloads are never delivered in cleartext. Re-register any non-HTTPS endpoint over HTTPS. - **Customers can't carry both `nif` and `alternative_id`** — sending both on `POST /v1/customers` now returns 422 `ALTERNATIVE_ID_AND_NIF_EXCLUSIVE`. Previously the alternative_id was silently dropped and only the NIF kept. Send exactly one identifier. - **`POST /v1/companies` status changed 404 → 403** — clients branching on 404 `COMPANY_NOT_FOUND` for the multi-NIF-unavailable case must switch to 403 `MULTI_NIF_NOT_ENABLED`. ## What else changed - **`Idempotency-Key` accepts any unique string** — not just a UUID. Any client-generated key matching `^[a-zA-Z0-9_-]{1,255}$` works (e.g. `invoice-order-12345`). UUIDs still work but are no longer required. Previously a non-UUID key was rejected with 422. - **`address.country` is now optional** — `country_code` (ISO 3166-1 alpha-2) is the canonical field. If you omit `country` it defaults to the country name; you only need to send `country_code`. - **`X-Request-Id` response header** — every response now carries `X-Request-Id`, matching `meta.request_id` in the body, so you can correlate logs without parsing the payload. - **`POST /v1/companies` returns a clear 403** — when multi-NIF isn't available on your plan it now responds 403 `MULTI_NIF_NOT_ENABLED` instead of a misleading 404 `COMPANY_NOT_FOUND` on a creation endpoint. - **Series with an unknown format variable now fails cleanly** — `POST /v1/configuration/series` with an unrecognized `{VARIABLE}` returns 422 `SERIES_FORMAT_UNRECOGNIZED_VARS` with the standard error envelope, instead of an opaque empty 500. - **Consistent error code for alternative IDs** — the wire error code is now `ALTERNATIVE_ID_INVALID` (matching the published catalog), not an internal Spanish variant. ## Endpoints - `POST /v1/companies` — Returns 403 MULTI_NIF_NOT_ENABLED (was 404) when multi-NIF is not available on the plan ## Where to go next - [Idempotency guide](/guides/idempotency) - [Error reference](/errors) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # VeriFactu records accepted with errors get their own status: ACCEPTED_WITH_ERRORS A record the AEAT accepted but flagged with errors now reads `ACCEPTED_WITH_ERRORS` instead of `ACCEPTED`, on the invoice, the filter and the webhook. Oct 16, 2026 · Breaking Until now a record the AEAT accepted while reporting errors in it was published as `ACCEPTED`, with an `error_code` alongside. It now has its own value, `ACCEPTED_WITH_ERRORS`, and `ACCEPTED` means accepted without remarks. This applies to records accepted before this change too. ## What else changed - **`verifactu_status=ACCEPTED` returns fewer invoices**: the ones accepted with errors match `ACCEPTED_WITH_ERRORS`. - **`verifactu.status.updated` can carry `ACCEPTED_WITH_ERRORS`** in `new_status` and `previous_status`. The record stands at the AEAT and its QR is valid, but the flagged data must be reviewed. - **`error_code` is now described once, as `VeriFactuErrorCode`.** It is still a string: the AEAT's numeric code (for example `1105`) or a BeeL. code such as `RECIPIENT_VAT_NOT_IN_VIES` when the submission was refused before reaching the AEAT. Generated clients may get a new type name. - **What to do:** if you validate the status against a closed enum, add `ACCEPTED_WITH_ERRORS` and treat any value you do not recognise as unknown, since more may be added. ## Endpoints - `GET /v1/companies/{company_id}/invoices` — `verifactu_status` accepts `ACCEPTED_WITH_ERRORS` - `GET /v1/companies/{company_id}/invoices/{invoice_id}` — `verifactu.submission_status` can be `ACCEPTED_WITH_ERRORS` ## Where to go next - [Submission states](/verifactu/submission-states) - [Accepted with errors](/verifactu/handling-rejections#accepted-with-errors) - [VeriFactu status webhook](/webhook-events/onVeriFactuStatusUpdated) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # VeriFactu is always on in sandbox A company created with a test key is born with VeriFactu on, and its NIF is registered on the first submission. Live is unchanged. Aug 26, 2026 · Improved Creating a company in sandbox is asking for a VeriFactu test bench, so the configuration is now born enabled and the NIF is registered with the provider on the first submission — no explicit step. In Live nothing changes: enabling VeriFactu there is still a deliberate act by the taxpayer. No existing configuration was touched. ## Where to go next - [VeriFactu configuration](/verifactu/getCompanyVeriFactuConfiguration) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # VeriFactu is a fact of the taxpayer, not a flag per invoice Whether an invoice reaches the AEAT is now decided by the NIF's regime at issue time. The per-invoice flag and three response fields are gone. Sep 3, 2026 · Breaking Where an invoice ends up used to be decided by a flag **on the invoice**. It is now decided by the **taxpayer**: if that NIF is under the VeriFactu regime in that mode, **every** invoice of theirs is registered; if it is not, **none** is. The law obliges a person, not a document, and a per-invoice flag let you build a mixed ledger — two invoices from the same NIF on the same day, one registered and one not. The single switch is `PUT /v1/companies/{company_id}/verifactu-configuration`, and it is resolved when the invoice is issued, against the state of the account at that instant. ## What else changed - **Request properties retired.** `options.verifactu_enabled` on invoice create and patch, `verifactu_enabled` on convert-to-invoice and on recurring templates, `verifactu_auto_submit` on a payment connection, and `apply_by_default` on the VeriFactu configuration. Unknown properties are ignored, so **continuing to send them breaks nothing** — they are discarded and the NIF's regime decides. - **Response properties retired — these do stop arriving.** `verifactu_enabled` on a recurring template, `verifactu_auto_submit` on a payment connection, and `apply_by_default` on the configuration. Read `enabled` from `GET /v1/companies/{company_id}/verifactu-configuration` instead: it is now the only switch. - **The invoice's `verifactu` block stays**, `verifactu.enabled` included — but there it is no longer a preference, it is the **record of what was applied**. The `verifactu_enabled` filter on the invoice list keeps working against that record. - **`nif_status` narrows to `ACTIVATED | DEACTIVATED`.** `PENDING` and `ERROR` described an "enabled but not registered yet" state that no longer exists: activating **is** registering the NIF, atomically — either the row ends up `ACTIVATED`, or the call returns the reason and nothing is persisted. If you `switch` on those two values, those branches are now unreachable. - **Two new `422`s on `PUT .../verifactu-configuration`.** `VERIFACTU_REPRESENTATION_REQUIRED` — `enabled: true` in Live without the signed and validated AEAT representation, which is a precondition of registering the NIF. `VERIFACTU_ALWAYS_ON_IN_SANDBOX` — `enabled: false` in sandbox, which is a permanent test bench and cannot be switched off. - **What to do.** Nothing urgent. To tidy up: stop sending the retired request properties, and read the regime from the configuration instead of from the retired response fields. If you ever chose per invoice, that choice no longer exists — it is made once, per NIF and per mode. ## Endpoints - `PUT /v1/companies/{company_id}/verifactu-configuration` — The single switch; two new 422 rejections - `GET /v1/companies/{company_id}/verifactu-configuration` — enabled is the regime of the NIF; apply_by_default is gone - `POST /v1/companies/{company_id}/invoices` — options.verifactu_enabled is ignored ## Where to go next - [VeriFactu configuration](/verifactu/updateCompanyVeriFactuConfiguration) - [Auto-submit policy](/verifactu/auto-submit) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # The VeriFactu records of an invoice, each with its own status `GET …/invoices/{invoice_id}/verifactu-records` lists the registration and, after a void, the cancellation — each with its own `submission_status`, so you can tell whether AEAT accepted the cancellation. Sep 19, 2026 · New The `verifactu` block of an invoice summarises its **registration**. When you void the invoice, `submission_status` moves with the cancellation, but `invoice_hash`, `registration_number` and `registered_at` keep describing the registration record — so the block could not tell you whether AEAT had accepted the cancellation, or refused it and why. The new resource lists every record submitted to AEAT for the invoice, ordered by `registered_at`: the `REGISTRATION` first and, if the invoice was voided, the `VOID` after it. Each carries its own `submission_status`, `registration_number`, `registered_at` and, when AEAT reported something, `error_code` and `error_message`. Nothing changes on the invoice resource: the `verifactu` block keeps the same fields and the same meaning. ## What else changed - **A `VOID` record ends in `VOIDED`, not `ACCEPTED`.** While AEAT has not replied it is `PENDING`; a refused cancellation is `REJECTED`, with `error_code` and `error_message` explaining why. - **`invoice_hash` and `qr_url` travel only on `REGISTRATION` records.** A cancellation has neither. - **Each record's `id` is the `verifactu_registration_id`** of the `verifactu.status.updated` webhook event, so a notification can be matched to the exact record it reports on. - **Voiding while the registration is still `PENDING` is allowed.** The cancellation is sent once the registration is accepted; until then the list shows only the `REGISTRATION` record, and the `VOID` one appears when the cancellation goes out. - **The collection is closed**: no pagination, no `page`/`limit`, the whole set on every response. An invoice never submitted — a draft, or one outside VeriFactu — answers `200` with an empty list. ## Endpoints - `GET /v1/companies/{company_id}/invoices/{invoice_id}/verifactu-records` — Registration and cancellation records, each with its own submission_status ## Where to go next - [List the VeriFactu records of an invoice](/invoices/listCompanyInvoiceVerifactuRecords) - [Did AEAT accept the cancellation?](/verifactu/cancel-and-fix#did-aeat-accept-the-cancellation) - [Submission states](/verifactu/submission-states) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # The VeriFactu status webhook says whether it reports the registration or the cancellation `verifactu.status.updated` now carries `operation`: `REGISTRATION` or `VOID`. AEAT's answer to a cancellation reaches you by webhook without a lookup. Sep 28, 2026 · New `verifactu.status.updated` was already sent when the cancellation record of a voided invoice changed status, but its payload did not say which record it was reporting on: to know whether AEAT had accepted a cancellation you had to match `verifactu_registration_id` against the invoice's VeriFactu records. The payload now includes `operation`, with the same values as the `operation` of those records: `REGISTRATION` for the invoice's registration and `VOID` for its cancellation. ## What else changed - **`operation: VOID` with `new_status: VOIDED`** is AEAT accepting the cancellation. With `REJECTED`, `error_code` and `error_message` explain why. - **A corrected registration is still `REGISTRATION`.** It replaces the invoice's registration, it does not cancel it. - **The field is new and always present;** nothing else in the payload changes, so existing handlers keep working. ## Where to go next - [Did AEAT accept the cancellation?](/verifactu/cancel-and-fix#did-aeat-accept-the-cancellation) - [List the VeriFactu records of an invoice](/invoices/listCompanyInvoiceVerifactuRecords) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # The VeriFactu status webhook reports a new rejection reason and the real previous status `verifactu.status.updated` is also sent when a rejected record is rejected for a different reason, and `previous_status` now carries the status of the record it replaces. Oct 16, 2026 · Improved Two changes to `verifactu.status.updated`. The payload keeps its shape. ## What else changed - **A new reason for a rejection sends a webhook.** While a record stays `REJECTED`, a different `error_code` or public `error_message` now triggers a delivery with `previous_status` and `new_status` both `REJECTED`. Handlers that assume the status always changes should accept this case. - **`previous_status` follows the invoice, not only the record.** It is the status of the invoice's record of the same `operation` just before the change, also when a new submission replaces a rejected one. It is omitted only on the first notification of each `operation`, so the first notification of a cancellation still has no `previous_status`. ## Where to go next - [VeriFactu status webhook](/webhook-events/onVeriFactuStatusUpdated) - [Submission states](/verifactu/submission-states) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Webhook subscriptions report their health, and pause when the endpoint is dead A subscription now says how its endpoint is doing, emails you when it keeps failing, and is paused after 25 failed deliveries over more than 48 hours. Aug 12, 2026 · New Until now a subscription whose endpoint had stopped answering stayed active forever and nobody was told. Each subscription now tracks the deliveries that never got through, tells its owner, and stops trying once the endpoint is clearly gone. A healthy endpoint is unaffected: any successful delivery resets the count, so occasional failures never add up to a pause. ## What else changed - **An email at 5 failed deliveries in a row**, with the last error, one per run of failures. A delivery counts as failed once it is given up on: all 5 attempts used, or rejected with a `4xx` that is not retried. - **A pause at 25 failed deliveries in a row, over a run longer than 48 hours.** Both must hold, so a busy endpoint that fails for an afternoon while you fix it is not paused. The subscription moves to `active: false` with `deactivated_by: beel` and `deactivated_at`, and the owner gets a second email. - **Reactivating a paused subscription runs a test delivery first.** `PATCH` with `active: true` sends a signed test to your URL: a `2xx` turns it back on, anything else answers `422 WEBHOOK_REACTIVATION_REQUIRES_LIVE_ENDPOINT` and it stays paused. A subscription you turned off yourself (`deactivated_by: owner`) reactivates without a test. - **The health is on the subscription**: `consecutive_failures`, `last_error` and `last_error_cause`, cleared together by the first successful delivery. `last_used_at` now means the last delivery that **succeeded**, and is `null` if none ever has. - **Failures carry a stable code.** `failure_cause` on a test result and `last_error_cause` on the subscription take one of `dns`, `connection`, `tls`, `timeout`, `http_client_error`, `http_server_error`, `invalid_url`, `forbidden_target` or `unknown`. Branch on it, never on the wording of `error`, and treat a value you do not know as `unknown`. - **Creating a subscription tests your endpoint.** The `201` carries `test_delivery`, the result of one signed delivery sent while registering. It never blocks the subscription, which exists and is active whatever it says, and it is `null` when the test could not run. - **`408` and `429` are retried**, with the same backoff as a `5xx`, since 6 July. Before that they were treated like any other `4xx` and the delivery was dropped. Answer `429` when you need BeeL. to slow down. ## Endpoints - `POST /v1/accounts/{account_id}/webhooks` — The 201 carries test_delivery - `PATCH /v1/accounts/{account_id}/webhooks/{webhook_id}` — Reactivating a paused subscription requires a passing test delivery - `GET /v1/accounts/{account_id}/webhooks/{webhook_id}` — consecutive_failures, last_error, last_error_cause, deactivated_by, deactivated_at ## Where to go next - [Endpoint health and automatic pause](/webhooks/retries#endpoint-health-and-automatic-pause) - [Update a webhook subscription](/webhooks/patchAccountWebhookSubscription) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # New webhook event: invoice.pdf.generated `invoice.pdf.generated` tells you an invoice's PDF is stored and ready, so you can fetch it instead of polling. Sep 8, 2026 · New If you keep a copy of each invoice PDF, you had no way of knowing when it was ready. Subscribe to `invoice.pdf.generated` and you are told when an invoice's PDF is stored, so you can fetch it. It is the push counterpart to the [PDF download that waits](/changelog#pdf-download-waits): one saves you polling while you wait, the other saves you polling at all. ## What else changed - **For an issued invoice it fires once.** Its PDF is generated a single time and is not modified afterwards: voiding or correcting the invoice sends no new event. A proforma sends it each time its PDF is generated. `data.generation` numbers the stored PDF. - **The payload carries no URL.** A signed download link expires in minutes, sooner than the delivery could be retried. Fetch the PDF from the download endpoint when the event arrives. - **On a managed account it also reaches the managing party**, like `invoice.issued`: the PDF is the fiscal document, and whoever issues on the holder's behalf is who archives it. ## Endpoints - `GET /v1/companies/{company_id}/invoices/{invoice_id}/pdf` — Where to fetch the PDF the event announces ## Where to go next - [invoice.pdf.generated](/webhook-events/onInvoicePdfGenerated) - [Webhook events](/webhooks/events) - [Download an invoice PDF](/invoices/getCompanyInvoicePdf) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # New webhook event: invoice.schedule_failed `invoice.schedule_failed` tells you a scheduled invoice could not be issued, so you find out without opening the dashboard. Sep 2, 2026 · New Scheduled invoices are set from the API, with `PUT /v1/companies/{company_id}/invoices/{invoice_id}/schedule`, so the warning that one failed had to reach the API too: if you integrate, you may never open the dashboard where the notice appears. Subscribe to `invoice.schedule_failed` and you get the failure when it happens, with the reason. ## What else changed - **It fires in Test as well as Live.** You should be able to see in sandbox the failure mode that awaits you in production. - **On a managed account it also reaches the managing party**, like the recurring-invoice pause event: whoever can unblock that NIF is the one who needs to know. ## Endpoints - `PUT /v1/companies/{company_id}/invoices/{invoice_id}/schedule` — Schedules the invoice whose failure this event reports ## Where to go next - [Webhook events](/webhooks/events) - [Create a subscription](/webhooks/createAccountWebhookSubscription) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # A webhook URL on a private network is rejected when you register it Registering or changing a subscription URL that points to a private or internal network address now answers `422 URL_TARGET_NOT_ALLOWED`, instead of creating a subscription that would never receive a delivery. A host that does not resolve yet is still accepted, so you can register before your DNS is live. Aug 17, 2026 · Improved Registering or changing a subscription URL that points to a private or internal network address now answers `422 URL_TARGET_NOT_ALLOWED`, instead of creating a subscription that would never receive a delivery. A host that does not resolve yet is still accepted, so you can register before your DNS is live. ## Where to go next - [URL_TARGET_NOT_ALLOWED](/errors/URL_TARGET_NOT_ALLOWED) - [Create a subscription](/webhooks/createAccountWebhookSubscription) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Webhook retries now span about 3 days A failed webhook delivery is now retried 7 times over about 3 days instead of for about a minute, so a short outage of your endpoint no longer loses events. Sep 24, 2026 · Improved Until now a delivery that failed was retried 5 times in quick succession, and every attempt was over about 75 seconds after the first. An endpoint that was down for a deploy or an afternoon missed the events of that window for good, unless you replayed them. Failed deliveries now follow a fixed schedule with few attempts, spread out: 7 attempts in total, the last one about 3 days after the first. Sandbox deliveries use only the first 3, so testing never leaves an event waiting for days. Nothing changes in what BeeL. sends. Receivers must stay idempotent on `BeeL-Event-Id`, as always: a slow endpoint that processed an attempt but answered too late can still receive the same event again. ## What else changed - **The schedule:** the first attempt right away, then 1 minute, 10 minutes, 1 hour, 6 hours, 24 hours and 36 hours after the previous one. Every attempt is signed afresh and carries the same `BeeL-Event-Id` and `Idempotency-Key`. - **Sandbox:** immediately, then +1 minute and +10 minutes, and no more. - **Deliveries already waiting for a retry when this ships** keep their 5 attempts and move to the new waits, so their last attempt goes out about 7 hours after the first. - **What is retried is unchanged:** network errors, timeouts, `408`, `429` and `5xx`. Any other `4xx` is still not retried. - **A delivery counts as failed later.** The health of a subscription counts a delivery once it has used all its attempts, so the email about an endpoint that stops answering comes no earlier than about 3 days after its first lost event. A `4xx` that is not retried still counts at once. - **Pausing, turning off or deleting a subscription drops its pending retries.** They are not sent if you reactivate it before their turn; they stay in the delivery log for a manual retry. - **For longer outages,** retry from the delivery log or reconcile from the resources, as before. A manual retry has no age limit while the subscription exists. ## Where to go next - [Retry schedule](/webhooks/retries#retry-schedule) - [How long the retries last](/webhooks/retries#how-long-the-retries-last) - [Deduplication](/webhooks/deduplication) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Companies & fiscal profile Create, list, read, update and delete the companies (NIFs) under your account, including the TEST vs PROD creation flow. A **company** is one NIF/CIF under your account, with its own fiscal profile, invoices and series. This page covers the full lifecycle — the order of the calls, what each one commits you to, and where it can fail. The exact fields, types and schemas of every operation live in the [Companies API Reference](/companies/listCompanies). **Creating and listing NIFs hangs off the account** — `/v1/accounts/{account_id}/companies` — because that is where a NIF is born; the `{account_id}` is yours or one you [manage](/multi-nif/managed-accounts). Everything you then do *to* one NIF is addressed by the NIF itself: `/v1/companies/{company_id}/…`. See [Where each identifier goes](/multi-nif#where-each-identifier-goes). ## Create a company `POST /v1/accounts/{account_id}/companies` — requires the **`companies:write`** scope. By default the NIF is also **switched on** in the requested mode, which is what seeds its invoice series (ordinary `F`, simplified `S`, corrective `R`) and its tax defaults, so the company can issue right away — rename or edit them later in the app. Send `activate: false` to create only the NIF profile. ```bash curl -X POST https://app.beel.es/api/v1/accounts/3fa85f64-5717-4562-b3fc-2c963f66afa6/companies \ -H "Authorization: Bearer beel_sk_live_xxx" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 6f8c1e10-3b2a-4c9d-8e7f-1a2b3c4d5e6f" \ -d '{ "nif": "B12345674", "legal_name": "Mi Empresa SL", "entity_type": "LEGAL_ENTITY", "address": { "street": "Calle Mayor", "number": "10", "postal_code": "28001", "city": "Madrid", "province": "Madrid" }, "legal_form": "SL", "legal_representative": { "full_name": "Ada Lovelace", "nif": "12345678Z", "address": { "street": "Calle Mayor", "number": "10", "postal_code": "28001", "city": "Madrid", "province": "Madrid" } }, "trade_name": "Mi Empresa", "default_main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" }, "aeat_environment": "TEST" }' ``` ### The fields that decide the flow The complete request body — every field, its type, whether it is required and its default — is in [Create a company](/companies/createCompany). Four of them change what the call *does*, and are worth understanding before you send it: - **`entity_type`** (`INDIVIDUAL` or `LEGAL_ENTITY`) is **immutable after creation**. It must match the NIF: an individual has a DNI or NIE, an entity a NIF starting with the letter of its legal form; a mismatch answers `422` [`ENTITY_TYPE_INCONSISTENT_WITH_NIF`](/errors/ENTITY_TYPE_INCONSISTENT_WITH_NIF). It is not a label: it decides whether `legal_form` and `legal_representative` are accepted at all. Getting it wrong means deleting the NIF and starting again. - **`aeat_environment`** picks which AEAT environment the NIF is registered against, and with it the whole billing branch — see [The `aeat_environment` field decides the flow](#the-aeat_environment-field-decides-the-flow). - **`activate`** is what separates "a NIF that can invoice" from "a NIF on file". Left at its default the call also seeds the series and tax defaults; `false` creates the profile only, and you switch it on later with the [activations endpoint](#switching-a-nif-on-in-test-or-live). A `numbering` block without an activation is rejected with `422` [`NUMBERING_REQUIRES_ACTIVATION`](/errors/NUMBERING_REQUIRES_ACTIVATION) — there are no series yet to number. - **`default_irpf_rate`** is a declaration, not a default. See the warning below. It must be a rate the company can bear by its NIF: a company (`B…`) declaring 15 % answers `422` [`IRPF_RATE_NOT_FOR_CORPORATE_ISSUER`](/errors/IRPF_RATE_NOT_FOR_CORPORATE_ISSUER) (see [IRPF](/guides/amounts-and-rounding#irpf)). **Never preselect an IRPF rate.** A company created without `default_irpf_rate` withholds nothing *because nobody declared a rate*; a company with `0` withholds nothing *because its owner declared so*. They invoice the same, but only one is a declaration — do not fill the absent case in with a number of your own. **The NIF must exist in the AEAT census — in the sandbox too — and, for an individual, `legal_name` must match it.** AEAT gives the same answer when the NIF is not registered and when an individual's name does not match, so both are `422` [`NIF_VALIDATION_INVALID`](/errors/NIF_VALIDATION_INVALID); one registered as revoked is `422` [`NIF_REVOCADO`](/errors/NIF_REVOCADO). Use your client's real NIF, even to rehearse. ### The `aeat_environment` field decides the flow | Case | Result | |------|--------| | `aeat_environment: "TEST"` | Created immediately, free. Sandbox NIF; invoices reach VeriFactu test. `201` + the company, with every field `GET /v1/companies/{company_id}` returns, plus its `series`. | | `aeat_environment: "PROD"`, account **entitled to Live** — a card on file, or an active paid plan | Created immediately as a production NIF. Real AEAT emission stays blocked until the VeriFactu representation is signed for this NIF. `201` + the company. | | `aeat_environment: "PROD"`, account with **no card on file** | No company is created. `402` [`CHECKOUT_REQUIRED`](/errors/CHECKOUT_REQUIRED), with **no checkout URL**. | | `aeat_environment: "PROD"`, account **unpaid** — a charge failed and its payment retries are exhausted | No company is created. `402` [`PAYMENT_REQUIRED`](/errors/PAYMENT_REQUIRED). Settle the outstanding invoice first. A charge that failed but is still being retried does not block Live. | | `aeat_environment: "PROD"`, account on a **fixed-quota plan still on trial** | No company is created. `402` [`PLAN_ACTIVATION_REQUIRED`](/errors/PLAN_ACTIVATION_REQUIRED): activate the plan you already chose; no card checkout applies, because the quota already includes this NIF. | | Either mode, account on the **API plan with no agreed price** that already has **one** active company | No company is created. `403` [`CONTACT_SALES_REQUIRED`](/errors/CONTACT_SALES_REQUIRED) with `error.details.reason: "SECOND_NIF"` — see [More than one NIF on the API plan](#more-than-one-nif-on-the-api-plan). | **This endpoint never starts a charge.** A [`CHECKOUT_REQUIRED`](/errors/CHECKOUT_REQUIRED) here carries no `checkout_url`: capturing a card is a browser flow, and an API key has no browser to return from. Create the company in `TEST` (or with `activate: false`) and switch it on in Live with the [activations endpoint](#switching-a-nif-on-in-test-or-live), which is the only door that opens a checkout. ### Switching a NIF on in Test or Live `POST /v1/companies/{company_id}/activations` — **`companies:write`**. This is how a NIF that already exists reaches Live: creation only ever switches a NIF on in one mode, so a NIF created in Test — how every provisioned account starts — has no other route. The mode travels in the body and is never taken from the key's environment, so a `beel_sk_test_…` key can switch a NIF on in Live — on purpose: a live key can only be created once the account has Live, so the first activation in Live has to come from a test key (or from the dashboard). **Switching a NIF on in Live is billable, whatever key you use.** A test key cannot create Live invoices, but it can create a Live NIF, and that NIF counts towards your subscription from that moment. ```bash curl -X POST https://app.beel.es/api/v1/companies/550e8400-e29b-41d4-a716-446655440000/activations \ -H "Authorization: Bearer beel_sk_live_xxx" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 6f8c1e10-3b2a-4c9d-8e7f-1a2b3c4d5e6f" \ -d '{ "environment": "PROD", "success_url": "https://your-app.example/billing/return?session={CHECKOUT_SESSION_ID}", "cancel_url": "https://your-app.example/billing" }' ``` It returns `201`. `TEST` is immediate and free. `PROD` is immediate when the account is entitled to Live, and the NIF is added to the existing subscription. Otherwise nothing is switched on and the call answers `402`, with the same three codes as creation: - [`CHECKOUT_REQUIRED`](/errors/CHECKOUT_REQUIRED) — no card on file. When you passed `success_url` and `cancel_url`, `error.details.checkout_url` is the checkout to hand to the account holder. `success_url` may embed Stripe's `{CHECKOUT_SESSION_ID}` placeholder. - [`PAYMENT_REQUIRED`](/errors/PAYMENT_REQUIRED) — unpaid: a charge failed and its payment retries are exhausted. Settle the outstanding invoice first. A charge that failed but is still being retried does not block Live. - [`PLAN_ACTIVATION_REQUIRED`](/errors/PLAN_ACTIVATION_REQUIRED) — a fixed-quota plan still on trial. Activate the plan. On the API plan with no agreed price, switching a NIF on in Live when the account has two or more active companies answers `403` [`CONTACT_SALES_REQUIRED`](/errors/CONTACT_SALES_REQUIRED) with `error.details.reason: "LIVE_WITH_MULTIPLE_NIFS"` instead: nothing is switched on and no checkout is opened. It is answered before any `402`. ### More than one NIF on the API plan The API plan covers **one NIF** self-service. More than one is priced per NIF with sales (see [Pricing](/pricing#custom-pricing)), and until that price is agreed the API routes you there with `403` [`CONTACT_SALES_REQUIRED`](/errors/CONTACT_SALES_REQUIRED). `error.details` carries: | Field | Value | |---|---| | `reason` | `SECOND_NIF` — creating a second company (`TEST` or `PROD`) in an account with exactly one active company. `LIVE_WITH_MULTIPLE_NIFS` — switching a NIF on in Live, by creation in `PROD` or by activation, in an account with two or more active companies. | | `salesUrl` | Where the account holder talks to sales. | ```json { "success": false, "error": { "code": "CONTACT_SALES_REQUIRED", "message": "To add more than one NIF, talk to us: we will prepare a per-NIF price for you.", "details": { "reason": "SECOND_NIF", "salesUrl": "https://beel.es/ventas" } } } ``` Treat it as a referral, not a failure: show the link in `salesUrl`. Once sales sets up the agreed price, **the same request goes through**. It does not apply to accounts with an agreed price, to [managed accounts](/multi-nif/managed-accounts) or the agencies that provision them, or to the Stripe plan and older plans. The call is idempotent: repeating it neither opens a second checkout nor adds a second subscription item, and answers `already_active: true`. It also cancels a pending switch-off (`scheduled_deactivation_cancelled: true`), with nothing charged or credited. Switching a NIF **off** is `DELETE …/activations?environment=TEST` or `…=PROD`; `environment` is required (`400` [`MISSING_PARAMETER`](/errors/MISSING_PARAMETER) without it). In Test it is immediate. In Live it is *scheduled*: the response carries an `effective_at` and the NIF keeps invoicing until then. Nothing is refunded. ### When creation fails, read the code before retrying The status codes and their bodies are on the operation page; what they *mean for your next call* is not: - **`409` [`NIF_ALREADY_REGISTERED`](/errors/NIF_ALREADY_REGISTERED)** is not a dead end. The existing id travels in `error.details.company_id` — switch *that* NIF on instead of creating it again. - **`409` [`NIF_PROD_ALREADY_ACTIVE_IN_ANOTHER_ACCOUNT`](/errors/NIF_PROD_ALREADY_ACTIVE_IN_ANOTHER_ACCOUNT)** is structural: a NIF can only issue in production from one account. No retry fixes it; the other account has to release it first. - **[`NIF_VALIDATION_INVALID`](/errors/NIF_VALIDATION_INVALID)** and **[`NIF_REVOCADO`](/errors/NIF_REVOCADO)** are about the NIF itself, not your request: no retry fixes them. - **`502` [`EXTERNAL_SERVICE_ERROR`](/errors/EXTERNAL_SERVICE_ERROR)** means the AEAT census could not be reached to validate the NIF. Nothing was created; repeat the same request later, with the same `Idempotency-Key`. - **`422` [`POSTAL_CODE_INVALID_ES`](/errors/POSTAL_CODE_INVALID_ES)**: a Spanish postal code, in `address` or in `legal_representative.address`, does not have 5 digits. Nothing was created. Other countries' postal codes are free-form. - **`403` [`CONTACT_SALES_REQUIRED`](/errors/CONTACT_SALES_REQUIRED)** is a referral, not a denial: the API plan without an agreed price covers one NIF. Show `error.details.salesUrl`; once the price is agreed, the same request goes through — see [More than one NIF on the API plan](#more-than-one-nif-on-the-api-plan). - Any other **`403`** never distinguishes "you cannot reach it" from "it does not exist". Do not treat it as a signal that the NIF is free. The company is created with everything you send: `trade_name`, the whole address (floor, door and country included) and the legal representative's. ## List companies `GET /v1/accounts/{account_id}/companies` — requires the **`companies:list`** scope. Returns a **paginated** list of the companies (NIFs) of that account (query params `page`, `limit`, `search`, `include`; primary company first). Always paginated — it scales to thousands of NIFs. An account with no NIF yet returns an empty page, not an error. See [the reference](/companies/listCompanies) for the response schema. ```bash curl https://app.beel.es/api/v1/accounts/3fa85f64-5717-4562-b3fc-2c963f66afa6/companies \ -H "Authorization: Bearer beel_sk_live_xxx" ``` Add `?include=readiness` to get each company's [issuing-readiness](#is-this-nif-ready-to-issue) block in the same call. Each item is a company object — its full shape is in [List companies](/companies/listCompanies). Three of its fields are read wrong often enough to be worth calling out: - **`id` is the `{company_id}`** you put in the path of every later call that touches this NIF. It is the only handle; nothing addresses a company by its `nif` string. - **`environment` is deprecated and cannot be trusted.** A single scalar cannot express a NIF that is switched on in both modes. Read the `in_test` / `in_prod` pair instead. - **`default_irpf_rate` absent is not `default_irpf_rate: 0`.** Absent means nobody ever declared a rate; `0` means someone declared exemption. Do not coalesce one into the other when you render or re-send it. It is read-only here — change it with `PUT /v1/companies/{company_id}/tax-configuration`. **Two independent axes — don't conflate them.** The activation pair (`in_test` / `in_prod`) is the data/billing mode, matching the dashboard's Test/Live switch. AEAT emission capability is a separate axis (`account_state`, `verifactu_status`, and the `readiness` block). A company can bill in Live and still have AEAT emission disabled until its VeriFactu representation is signed. ### Per-company stats `GET /v1/accounts/{account_id}/companies/stats` — **`companies:list`**. Returns invoice aggregates per company (`company_id`, `invoice_count`, `last_invoice_at`), kept separate from the list so the company switcher stays cheap. ## Read a single company `GET /v1/companies/{company_id}` — requires **`companies:read`**. Returns the same company object as above, including VeriFactu status. The NIF in the path is the only source of context: the account that owns it is derived from it, so there is no pair to keep coherent. ### Is this NIF ready to issue? `GET /v1/companies/{company_id}/issuing-readiness` — **`companies:read`**. Returns `ready` plus, when it is `false`, the exact `blockers`, for the environment of your key, and a separate `verifactu` block. How to read it, and each blocker's meaning and fix, is in [Is a NIF ready to invoice?](/multi-nif#is-a-nif-ready-to-invoice); the three VeriFactu ones in detail in [Enabling VeriFactu](/verifactu/enabling-verifactu#what-blocks-issuing). Readiness is per NIF; it does **not** cover the payer account's quota or a specific invoice's payload. ## Update a company `PATCH /v1/companies/{company_id}` — requires **`companies:write`**. Most fields (trade name, address, legal representative, contact details, IBAN, PDF template…) are editable — see [the reference](/companies/patchCompanyById) for the full editable set. The exceptions: - **`nif`, `entity_type` and `legal_form` are immutable.** Sending a different value answers `422` [`IMMUTABLE_NIF`](/errors/IMMUTABLE_NIF), [`IMMUTABLE_ENTITY_TYPE`](/errors/IMMUTABLE_ENTITY_TYPE) or [`IMMUTABLE_LEGAL_FORM`](/errors/IMMUTABLE_LEGAL_FORM), and nothing is written; sending the value it already has is not a change. - **`legal_name`** only changes together with an AEAT census re-validation. For a legal entity the census identifies the company by its NIF alone, so the name you send cannot make it fail; for an `INDIVIDUAL` the name must match the census. If the census cannot be reached, the change is not rejected: the response is `200` with the new name stored, and the check is repeated in the background. - **A Spanish postal code** must have 5 digits, in `address` and in `legal_representative.address` — otherwise `422` [`POSTAL_CODE_INVALID_ES`](/errors/POSTAL_CODE_INVALID_ES). - **Access `VIEW`** over the NIF reads it but cannot change it: a write answers `403` [`COMPANY_READ_ONLY`](/errors/COMPANY_READ_ONLY). ```bash curl -X PATCH https://app.beel.es/api/v1/companies/550e8400-e29b-41d4-a716-446655440000 \ -H "Authorization: Bearer beel_sk_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "trade_name": "Mi Empresa (Madrid)", "address": { "street": "Gran Vía", "number": "1", "postal_code": "28013", "city": "Madrid", "province": "Madrid", "country_code": "ES" } }' ``` ## Delete a company `DELETE /v1/companies/{company_id}` — requires **`companies:write`**. Returns `204`. You **cannot delete your primary company** (`400` [`CANNOT_DELETE_PRIMARY`](/errors/CANNOT_DELETE_PRIMARY)), nor a company that holds invoices in Live. A company that is **switched on in Live** cannot be deleted either: it returns `409` [`COMPANY_ACTIVE_IN_PRODUCTION`](/errors/COMPANY_ACTIVE_IN_PRODUCTION). Leaving Live is a *scheduled* deactivation — the current cycle is charged and served in full — so switch it off first and delete it once the deactivation takes effect. Companies never activated, or active only in Test, are deleted right away. ## Signing the VeriFactu representation A production NIF only reaches the real AEAT once its VeriFactu representation is generated, signed by the NIF's holder and submitted. That flow lives under `/v1/companies/{company_id}/representation`: | Step | Call | Notes | | --- | --- | --- | | Generate | `POST …/representation` | Either key. Needs a complete fiscal identity — for a legal entity, the legal representative's full address too; otherwise [`PROFILE_INCOMPLETE`](/errors/PROFILE_INCOMPLETE), with the missing fields in `error.details`. | | Download | `GET …/representation/document` | Either key. A short-lived `download_url` to the PDF the holder signs. | | Submit the signed copy | `POST …/representation/submit` | **Live key only** — the representation has no test mode (`400` [`SIGNING_ONLY_IN_LIVE`](/errors/SIGNING_ONLY_IN_LIVE) with a test key). `multipart/form-data` with the PDF in `file`. A PDF without a valid signature is `400` [`PDF_SIGNATURE_INVALID`](/errors/PDF_SIGNATURE_INVALID); a file that is not a PDF, `400` [`PDF_INVALID_EXTENSION`](/errors/PDF_INVALID_EXTENSION). | | Status | `GET …/representation` | Never fails: `NOT_STARTED`, `PDF_GENERATED`, `ACTIVE` or `CANCELLED`. `SUBMITTED` is only the acknowledgement of the submit call, and `ERROR` is reserved. | | Cancel | `DELETE …/representation` | Cancels an **active** (signed) representation. Before that there is nothing to cancel, and it answers `400`. | The document authorises BeeL. to submit the NIF's billing records to AEAT on the taxpayer's behalf — this is how BeeL. submits without the taxpayer handing over a digital certificate. The holder (the self-employed person, or the legal representative of a company) signs the PDF electronically with their own certificate, once. Everything else — generating, downloading, uploading and checking the status — is an API call, so a new issuer can be onboarded entirely from your product except for that signature. The holder signs; whoever holds `OPERATE` over the NIF — the holder, or you as its provisioner — uploads the signed copy. See [Generate the representation document](/companies/generateCompanyRepresentation) and [Submit the signed representation document](/companies/submitCompanyRepresentation). ## Related - [Target this company in requests](/multi-nif#where-each-identifier-goes) — put the company `id` in the path: `/v1/companies/{company_id}/…` - [Give teammates access](/multi-nif/members-and-grants) — grant a member `VIEW` or `OPERATE` access to specific companies --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Overview The multi-NIF model in one place — accounts, companies (NIFs), members with grants and managed accounts; which credential acts on what, what needs a live key, and what the errors mean. Your client is a freelancer who also runs an S.L., so they invoice under two tax IDs. An accounting firm (*gestoría*) runs the invoicing of forty clients. Both are the same model, and this page explains it once; every other page in this section links back here. ## The model ```mermaid graph LR A["Your account
account_id"] -->|holds 1..N| C["Company = one NIF
company_id"] A -->|has| M["Members
OWNER · ADMIN · MEMBER"] M -.->|"grant VIEW / OPERATE
(MEMBER only)"| C A -->|"manages, at an access_level"| B["Managed account
provisioned by you"] B -->|holds 1..N| D["Company = one NIF"] ``` Four pieces, in this order: 1. **Account** — who pays and authenticates. It owns the subscription, the API keys, the webhooks and the people. Identified by `account_id`. 2. **Companies** — each NIF/CIF the account invoices under, with its own invoices, customers, products and series, kept apart in Test and Live. Identified by `company_id`. Throughout the docs and the API reference, *Company* always means one NIF. → [Companies](/multi-nif/companies) 3. **Members and grants** — the people with access to the account. An `OWNER` or `ADMIN` reaches every NIF; a `MEMBER` reaches only the NIFs they hold a **grant** on, at `VIEW` or `OPERATE`. → [Members & grants](/multi-nif/members-and-grants), [Invitations](/multi-nif/invitations) 4. **Managed accounts** — separate accounts that *you* provisioned for someone else. You pay for them and hold one `access_level` over each (`NONE`, `VIEW` or `OPERATE`); the holder can claim theirs later. → [Managed accounts](/multi-nif/managed-accounts) **An account is not a NIF: the account is who pays and authenticates, the NIF is who invoices.** A freelancer with one NIF has one account and one company — the distinction only shows up at two. ### Member or managed account? Both give you access to somebody else's NIFs, and they are not interchangeable: - The taxpayer **signs up and pays for themselves**, and wants your help → they [invite you as a member](/multi-nif/invitations) of *their* account. Their account, their bill; you hold a role in it. - **You onboard them by API and you pay** → you provision a [managed account](/multi-nif/managed-accounts). Your bill; they can claim the account later without you losing your access. > **Rules that apply here:** [REC-005 · One chain per NIF, one company per NIF](/rules/records#rec-005) ## Which credential acts on what - **An API key belongs to one account** and is created by an `OWNER` or `ADMIN` of it (a `MEMBER` cannot create keys: `403` [`ACCOUNT_MANAGEMENT_FORBIDDEN`](/errors/ACCOUNT_MANAGEMENT_FORBIDDEN)). It reaches every NIF of that account, plus the NIFs of the accounts it manages, at the `access_level` held over each. - **Grants govern people in the dashboard.** They decide what a `MEMBER` sees when signed in; they never apply to an API key. - **Scopes decide which operations a key may call; access decides where it may write.** A key with `invoices:write` still cannot issue for a NIF you only hold at `VIEW`. The full scope catalog, including the two provisioning scopes, is in [Scopes](/auth/scopes). - **The target is always the id in the path**, never the credential. An API key is stateless and carries no notion of a "current" NIF. ## Test and live keys The base URL is the same; the key prefix picks the environment ([Authentication](/auth)). For everything that belongs to a NIF — invoices, customers, series, readiness, payment connections — a `beel_sk_test_` key works on Test data and a `beel_sk_live_` key on Live data. The account's control plane is different: **members, grants, invitations and your management of an account are not per environment.** A collaborator is the same person with the same grants in Test and Live, so a change there is real whichever key makes it. That is why these writes refuse a test key: | Operation | Test key | Live key | | --- | --- | --- | | Read members, grants and invitations | Yes | Yes | | Invite, revoke an invitation, change a role, remove a member, set or remove a grant | `403` [`LIVE_CREDENTIAL_REQUIRED`](/errors/LIVE_CREDENTIAL_REQUIRED) | Yes | | Provision accounts, issue claim tokens, import accounts, list them, read usage | Yes | Yes | | Change your `access_level` over a managed account, end its management | `403` [`LIVE_CREDENTIAL_REQUIRED`](/errors/LIVE_CREDENTIAL_REQUIRED) | Yes | | Switch a NIF on or off in Test or Live | Yes — the mode travels in the body | Yes | | Submit a signed VeriFactu representation | `400` [`SIGNING_ONLY_IN_LIVE`](/errors/SIGNING_ONLY_IN_LIVE) | Yes | | Hand ownership of the account over | `403` [`OPERATION_REQUIRES_SESSION`](/errors/OPERATION_REQUIRES_SESSION) | `403` [`OPERATION_REQUIRES_SESSION`](/errors/OPERATION_REQUIRES_SESSION) | **Handing ownership over is dashboard-only.** No API key can do it, a live one included, so a leaked key can never take the account. See [Hand over ownership](/multi-nif/members-and-grants#hand-over-ownership). ## Two identifiers | | What it is | The call that returns it | | --- | --- | --- | | **`account_id`** | The account: subscription, API keys, members, webhooks. | `GET /v1/me/identity` → `data.account_id` | | **`company_id`** | One NIF. | `GET /v1/accounts/{account_id}/companies` → `data.companies[].id` | **`company_id` is a UUID, never the tax number itself.** It is the `id` the companies endpoint returns — `550e8400-e29b-41d4-a716-446655440000`, not `B12345674`. Sending a NIF where a `company_id` is expected returns `400`. ```bash # 1. Which account is this key? curl https://app.beel.es/api/v1/me/identity \ -H "Authorization: Bearer beel_sk_live_xxx" # 2. Which NIFs does it hold? curl https://app.beel.es/api/v1/accounts/3fa85f64-5717-4562-b3fc-2c963f66afa6/companies \ -H "Authorization: Bearer beel_sk_live_xxx" ``` ## Where each identifier goes Both identifiers travel **in the path**. Which one you use depends on whether the thing you are touching belongs to a NIF or to the account. **`{company_id}` — everything that belongs to one NIF**, both configuring it and operating on it: ```text /v1/companies/{company_id}/invoices /v1/companies/{company_id}/customers /v1/companies/{company_id}/products /v1/companies/{company_id}/series /v1/companies/{company_id}/tax-configuration ``` The account that owns the NIF is derived from it, so there is no pair to keep coherent. **`{account_id}` — everything that belongs to the account**: its list of NIFs, members, invitations, the accounts it manages, webhooks and request logs. ```text /v1/accounts/{account_id}/companies /v1/accounts/{account_id}/members /v1/accounts/{account_id}/webhooks ``` **Migrating from the flat routes?** If you integrated against `/v1/invoices`, `/v1/customers`, `/v1/products` or `/v1/configuration/series` — routes with no `company_id` — those pick the NIF from a `BeeL-Active-Company` request header. They are **deprecated**: they answer with `Deprecation` and `Sunset` headers and stop working on the date the `Sunset` header announces. Move the NIF out of the header and into the path; the behaviour is otherwise identical. ## When it does not add up | When | Error | Status | |---|---|---| | The key lacks a scope. `error.details.missing_scopes` names them, comma-separated. | [`INSUFFICIENT_SCOPE`](/errors/INSUFFICIENT_SCOPE) | `403` | | The `{account_id}` is not yours to reach — the same answer as *does not exist*, so existence is never disclosed. | [`ACCOUNT_NOT_ACCESSIBLE`](/errors/ACCOUNT_NOT_ACCESSIBLE) | `403` | | The same, for the `{company_id}`. Today it is also the answer to a **write** under `/v1/companies/{company_id}/…` when you only hold `VIEW` over that NIF; reads still work. | [`ACTIVE_COMPANY_NOT_ACCESSIBLE`](/errors/ACTIVE_COMPANY_NOT_ACCESSIBLE) | `403` | | A write on an account-scoped route while you hold `VIEW` — for example adding a NIF to an account you manage at `VIEW`. | [`COMPANY_READ_ONLY`](/errors/COMPANY_READ_ONLY) | `403` | | Members and invitations need `OWNER` or `ADMIN` of that account. A provisioner is neither on the accounts it manages. | [`MEMBER_MANAGEMENT_FORBIDDEN`](/errors/MEMBER_MANAGEMENT_FORBIDDEN) | `403` | | Account settings (API keys, webhooks) need `OWNER` or `ADMIN` of that account. | [`ACCOUNT_MANAGEMENT_FORBIDDEN`](/errors/ACCOUNT_MANAGEMENT_FORBIDDEN) | `403` | | A control-plane write made with a `beel_sk_test_` key. See [Test and live keys](#test-and-live-keys). | [`LIVE_CREDENTIAL_REQUIRED`](/errors/LIVE_CREDENTIAL_REQUIRED) | `403` | | Handing ownership over. Dashboard only. | [`OPERATION_REQUIRES_SESSION`](/errors/OPERATION_REQUIRES_SESSION) | `403` | | A second NIF, or switching a NIF on in Live with two or more, on the API plan with no agreed price. `error.details.salesUrl` is where to agree it; then the same request goes through. See [More than one NIF on the API plan](/multi-nif/companies#more-than-one-nif-on-the-api-plan). | [`CONTACT_SALES_REQUIRED`](/errors/CONTACT_SALES_REQUIRED) | `403` | | Provisioning without the managed-accounts capability, which BeeL. enables on request. | [`FEATURE_NOT_AVAILABLE`](/errors/FEATURE_NOT_AVAILABLE) | `403` | | A member grant names a NIF of a different account — including one of the accounts you manage. | [`GRANT_COMPANY_NOT_IN_ACCOUNT`](/errors/GRANT_COMPANY_NOT_IN_ACCOUNT) | `422` | | Only on the deprecated flat routes: several NIFs and no `BeeL-Active-Company` header. It cannot happen once the NIF is in the path. | [`ACTIVE_COMPANY_REQUIRED`](/errors/ACTIVE_COMPANY_REQUIRED) | `403` | **Treat both read-only answers the same way.** A write you are not allowed to make with `VIEW` access comes back as [`COMPANY_READ_ONLY`](/errors/COMPANY_READ_ONLY) or, on NIF routes, [`ACTIVE_COMPANY_NOT_ACCESSIBLE`](/errors/ACTIVE_COMPANY_NOT_ACCESSIBLE). Neither is fixed by retrying: raise the access, or read instead. ## Is a NIF ready to invoice? ```bash curl https://app.beel.es/api/v1/companies/550e8400-e29b-41d4-a716-446655440000/issuing-readiness \ -H "Authorization: Bearer beel_sk_live_xxx" ``` ```json { "success": true, "data": { "ready": true, "blockers": [], "verifactu": { "ready": false, "blockers": ["NIF_NOT_REGISTERED"] } } } ``` `ready` is `true` only when `blockers` is empty. Two things the answer depends on: - **The environment of your key.** A `beel_sk_test_` key asks about Test, a `beel_sk_live_` key about Live, so the same NIF can be ready in one and not in the other — a NIF provisioned in Test is `ready` with a test key and reports `COMPANY_NOT_ACTIVATED` with a live one until you switch it on there. - **Which question you ask.** `ready` / `blockers` say whether the NIF can issue. `verifactu.ready` / `verifactu.blockers` say whether its invoices would pass VeriFactu registration — a separate question. A Live NIF can be `ready: true` while `verifactu.blockers` still lists what AEAT registration needs. | Blocker | What it means | How to clear it | |---|---|---| | `COMPANY_HAS_NO_NIF` | The company has no tax identification number on file. | Set the NIF on the company. | | `SERIES_DEFAULT_NOT_FOUND` | No default invoice series exists for the environment. | Switch the company on in that environment (it creates the default series), or mark an existing series as default. | | `PROFILE_INCOMPLETE` | The company's fiscal identity is not complete enough to write an invoice header (entity type, legal name or fiscal address). | Complete the entity type, legal name and fiscal address on the company. | | `COMPANY_NOT_ACTIVATED` | The company is not activated in the environment you are calling, and it issues without Veri*Factu. | Activate the company in that environment. | | `ENV_MISMATCH` | The NIF is not switched on in the environment you are calling, and its invoices go to VeriFactu there. | Activate the company in that environment. | | `NIF_NOT_REGISTERED` | The NIF is not registered with AEAT for Veri*Factu. | Complete the Veri*Factu configuration for the NIF. | | `NIF_REPRESENTATION_REQUIRED` | A signed fiscal representation from the account holder is missing. | Generate the representation, have the holder sign it, and submit it. | Add `?include=readiness` to `GET /v1/accounts/{account_id}/companies` to get the same answer for every NIF in one call. See [Get the issuing readiness of a company](/companies/getCompanyIssuingReadiness). ## Related - [Companies](/multi-nif/companies) — create, switch on, update and delete NIFs; the VeriFactu representation - [Payment connections](/multi-nif/payment-connections) — Connect Stripe per NIF, and turn charges into invoices - [Members & grants](/multi-nif/members-and-grants) — roles, per-NIF access, and handing ownership over - [Invitations](/multi-nif/invitations) — add people to the account with a role and initial grants - [Managed accounts](/multi-nif/managed-accounts) — build an accounting-firm or platform integration: provision, claim, operate their invoicing --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Invitations Invite a person to the account by copy-link or email, assign a role and initial grants, and revoke pending invitations. To add a person to an account you create an **invitation** — its own resource, separate from [members](/multi-nif/members-and-grants). It is a single-use, expiring token that carries the target role and, for a `MEMBER`, the initial company grants. The person becomes a member **only when they accept**; a revoked or expired invitation never produces one. Invitations hang off the account — `/v1/accounts/{account_id}/invitations` — and require **OWNER or ADMIN** plus **`members:read`** / **`members:write`**. **Creating and revoking need your live key.** Accepting an invitation grants real access in Test and Live alike, so both writes answer `403` [`LIVE_CREDENTIAL_REQUIRED`](/errors/LIVE_CREDENTIAL_REQUIRED) with a `beel_sk_test_` key. Listing and reading work with either key. See [Test and live keys](/multi-nif#test-and-live-keys). ## Invite a person `POST /v1/accounts/{account_id}/invitations` — **`members:write`**, live key. Full field list and types: [Invite a person to the account](/invitations/createAccountInvitation). ```bash curl -X POST https://app.beel.es/api/v1/accounts/3fa85f64-5717-4562-b3fc-2c963f66afa6/invitations \ -H "Authorization: Bearer beel_sk_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "invited_email": "colleague@example.com", "account_role": "MEMBER", "send_email": false, "grants": [ { "company_id": "550e8400-e29b-41d4-a716-446655440000", "access_level": "OPERATE" } ] }' ``` The `201` carries `invitation_id`, `expires_at`, `token` and `invitation_url`. An invitation expires 7 days after it is created. Things about the body that are easy to get wrong: - **`OWNER` cannot be invited.** `account_role` accepts `ADMIN` or `MEMBER`; `OWNER` is `422` [`OWNER_ROLE_NOT_ASSIGNABLE`](/errors/OWNER_ROLE_NOT_ASSIGNABLE) whoever asks. Ownership only moves by [handover from the dashboard](/multi-nif/members-and-grants#hand-over-ownership). - **Send `grants` explicitly.** `[]` invites somebody with no NIF access yet; grant it after they accept. An explicit `null` is rejected with `422` [`VALIDATION_ERROR`](/errors/VALIDATION_ERROR) — the API will not guess whether you meant "none" or "forgot". - **Grants only make sense for `account_role: "MEMBER"`.** An `ADMIN` reaches every NIF implicitly; sending grants with one is `422` [`GRANTS_ONLY_FOR_MEMBER`](/errors/GRANTS_ONLY_FOR_MEMBER). A grant naming a NIF outside the account is `422` [`GRANT_COMPANY_NOT_IN_ACCOUNT`](/errors/GRANT_COMPANY_NOT_IN_ACCOUNT). - **One pending invitation per email.** Inviting an email that already has a `PENDING` invitation replaces it: the new one is created and the old one becomes `REVOKED`, so its link stops working. Inviting someone who is already a member is `409` [`MEMBER_ALREADY_IN_ACCOUNT`](/errors/MEMBER_ALREADY_IN_ACCOUNT). **`token` and `invitation_url` are shown once and never again.** Not by the list endpoint, not by the get. Capture them from the `201` and deliver the link; lose them and your only option is to revoke the invitation and issue a new one. ### Copy-link or email - **Copy-link (default, `send_email: false`)** — you get a ready-to-share `invitation_url` plus the raw `token`, and deliver it however you like: your own email, chat, in-app. Full control over the message and the branding. - **Email (`send_email: true`)** — BeeL. also sends the invitation email for you. You still receive the token and URL in the response, so you can follow up yourself. Both mint the same single-use token; `invitation_url` is just that token wrapped in the acceptance link for the current environment, so you never assemble it by hand. ### Acceptance happens outside the API The invitee opens the link and accepts on BeeL. — setting a password if they are new, and accepting BeeL.'s terms and privacy policy. There is **no public endpoint for you to call**: acceptance is a session action on BeeL.'s side, the same way a provisioned account is [claimed](/multi-nif/managed-accounts#hand-the-account-over-claim-tokens). You observe the result, you do not drive it: the invitation flips to `ACCEPTED` and the person shows up in `GET /v1/accounts/{account_id}/members` with the grants the invitation carried. ## Track and revoke `GET /v1/accounts/{account_id}/invitations` — **`members:read`**, paginated with `page` and `limit`. Every invitation stays readable for its whole life: | `status` | Meaning | |----------|---------| | `PENDING` | Active and not yet expired. Revocable. | | `ACCEPTED` | The invitee accepted; they are now a member. | | `REVOKED` | Cancelled before acceptance, by you or by a newer invitation to the same email. | | `EXPIRED` | Passed its `expires_at` unaccepted. | **`ACCEPTED`, `REVOKED` and `EXPIRED` invitations are not deleted.** The record is the audit trail of who was ever granted access to the account's fiscal data — revoking one does not erase it. So a `404` from the get means exactly one thing: no invitation with that id exists in this account. `DELETE /v1/accounts/{account_id}/invitations/{invitation_id}` — **`members:write`**, live key, `204`. Only a `PENDING` invitation can be revoked; one already accepted, revoked or expired returns `404` [`PENDING_INVITATION_NOT_FOUND`](/errors/PENDING_INVITATION_NOT_FOUND) rather than disclosing which of the three it is. See [Revoke a member invitation](/invitations/deleteAccountInvitation). ## Related - [Members & grants](/multi-nif/members-and-grants) — what the role and the access level each decide, once they are in - [The model](/multi-nif#member-or-managed-account) — member or managed account: which one you need --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Managed accounts Build an accounting-firm or platform integration — provision accounts for your clients, hand them over with claim tokens, operate their invoicing and receive their events. A **managed account** is a separate account that a **provisioner** — an accounting firm (*gestoría*), an agency or a fleet operator — creates and pays for on behalf of its holder. You keep one **access level** over each account and can operate its invoicing without the holder ever touching the API. How managed accounts fit next to members and grants is in the [Overview](/multi-nif#the-model). **Before you start.** - **Scopes.** Tick **`accounts:write`** (provision, claim tokens, imports, access level, end management) and **`accounts:read`** (list, get, usage) when you create the key. They are never part of the default key; an `OWNER` or `ADMIN` can add them. See [Scopes](/auth/scopes). - **Capability.** Your account also needs the managed-accounts capability, which BeeL. enables on request. Until then these endpoints answer `403` [`FEATURE_NOT_AVAILABLE`](/errors/FEATURE_NOT_AVAILABLE). Every result is scoped to you: you only ever see accounts you provisioned. ## Build an accounting-firm integration [#build-a-gestoría-integration] The whole flow, in order. Each step links to the section that explains it; rehearse it with a `beel_sk_test_` key, then repeat the Live steps with your `beel_sk_live_` key. In Test a provisioned NIF can issue from the start: the representation and switching VeriFactu on (steps 5 and 6) only apply in Live. ### Get two keys A test key and a live key, both with `accounts:read` and `accounts:write`, plus what you need to operate for your clients: `companies:read`, `companies:write`, `configuration:write`, `customers:write`, `invoices:write`, `webhooks:write`. Some writes only work with the live one — the list is in [Test and live keys](/multi-nif#test-and-live-keys). ### Provision each client One `POST /v1/accounts` with a `tax_profile` and `access_level: "OPERATE"` creates the account and its NIF, switched on in Test with its default series, and returns the `company_id` you invoice against. → [Provision an account](#provision-an-account). Many clients at once: → [Onboard many accounts from a file](#onboard-many-accounts-from-a-file). ### Hand the account over (optional) Deliver the `claim_url` so the holder takes ownership of their account; you keep your access. → [Claim tokens](#hand-the-account-over-claim-tokens) ### Add NIFs and switch them on in Live A second NIF for the same client is `POST /v1/accounts/{account_id}/companies` ([Create a company](/multi-nif/companies#create-a-company)). Going live is `POST /v1/companies/{company_id}/activations` with `"environment": "PROD"` ([Switching a NIF on](/multi-nif/companies#switching-a-nif-on-in-test-or-live)). Every NIF switched on in Live is billed to you. The one-NIF limit of the self-service API plan ([`CONTACT_SALES_REQUIRED`](/errors/CONTACT_SALES_REQUIRED)) does not apply to managed accounts or to the agency that provisions them. ### Get the representation signed (Live only) Generate the VeriFactu representation, have the holder sign it, and upload the signed PDF with the live key. Test does not need it. → [Signing the VeriFactu representation](/multi-nif/companies#signing-the-verifactu-representation) ### Switch VeriFactu on in Live Once the representation is `ACTIVE` (you receive `representation.signed`), send `PUT /v1/companies/{company_id}/verifactu-configuration` with `{ "enabled": true }` and the live key. In Live VeriFactu starts off for every NIF, and this call is what registers it with AEAT: without it its invoices are not submitted. In Test it is already on. → [Put the NIF under the regime](/verifactu/enabling-verifactu#put-the-nif-under-the-regime) ### Confirm it can issue `GET /v1/companies/{company_id}/issuing-readiness` with the **live** key: `ready` says whether it can issue in Live, and `verifactu.ready` whether AEAT registration will go through. → [Is a NIF ready to invoice?](/multi-nif#is-a-nif-ready-to-invoice) ### Issue its invoices Create the invoice under their `company_id` and issue it. → [Issue invoices from a managed account](#issue-invoices-from-a-managed-account) ### Receive their events One subscription on **your** account, with `account_relationship: "managed"`. → [Receive their webhooks](#receive-their-webhooks) ## The lifecycle ```mermaid sequenceDiagram autonumber participant You as Provisioner participant API as BeeL. API participant Holder as Account holder You->>API: POST /v1/accounts (with tax_profile) API-->>You: 201 account_id, company_id, claim_token — NIF on in Test opt a second NIF You->>API: POST /v1/accounts/{account_id}/companies end You->>API: POST /v1/companies/{company_id}/activations (PROD) You->>API: POST /v1/companies/{company_id}/representation Holder->>Holder: signs the representation PDF You->>API: POST …/representation/submit (live key) You->>API: PUT /v1/companies/{company_id}/verifactu-configuration {enabled: true} (live key) You->>API: GET /v1/companies/{company_id}/issuing-readiness You->>API: POST /v1/companies/{company_id}/invoices, then …/issue Holder->>API: claims the account (claim_url) You->>API: DELETE /v1/accounts/{account_id}/management (live key) ``` ## Access levels Your access over a managed account is one of three `access_level` values: | access_level | What the holder can do | |---|---| | `NONE` | Cover their subscription. No access to their data. This is the default. | | `VIEW` | Read their invoices, customers, products, series and fiscal data. | | `OPERATE` | Everything in VIEW, plus creating and editing them. Issuing on their behalf additionally requires a signed fiscal representation from the account holder. | ### Which one do you actually need? The level is cheap to lower and, after the claim, impossible to raise — so the choice is really "what is the most I will ever need from this account?", asked once, up front. - **`OPERATE`** is for platforms that *operate* the holder's invoicing: fleets that run their riders' invoicing, accounting firms that manage it for clients who never log in. It is the only level that lets you create invoices, customers and payment connections under their NIF. Take it whenever issuing is part of your product, even if you do not issue on day one. - **`VIEW`** is for platforms that *report on* an account they set up: dashboards, reconciliation, "your invoices" screens. You see the data and the readiness state but cannot change anything, so an integration bug can never emit a fiscal document under someone else's NIF. A write answers `403` — see [When it does not add up](/multi-nif#when-it-does-not-add-up). - **`NONE`** is for a relationship that is over in practice but not on paper — you provisioned the account, you still pay for it, and you no longer want access to its data. If you also want to stop paying, what you want is [ending the management](#end-your-management-of-an-account), not `NONE`. **Access level never affects billing.** Whoever provisioned an account pays for its subscription regardless of the level they keep over it — including `NONE` — and regardless of whether the holder has claimed it. ## Marketplaces: one managed account per partner A marketplace whose partners — professionals, sellers — each have their own NIF fits this model: one managed account per partner, provisioned and paid for by you, with `OPERATE` access. - **Each partner is the issuer.** Its invoices carry its NIF and fiscal data, come from its own [series](/guides/series-and-numbering) with its own numbering, and go to AEAT under its NIF, with its own chain of records. Nothing is shared between partners. - **You provision the account and pay for it.** The partner never needs to log in. Hand it over later with a [claim token](#hand-the-account-over-claim-tokens) if it ever wants its own access. - **One step needs the partner:** signing its [VeriFactu representation](/multi-nif/companies#signing-the-verifactu-representation), once, before its invoices reach the real AEAT. - **You issue from your backend** with [Create an invoice](/invoices/createCompanyInvoice) on the partner's `company_id`, typically when your own payment flow confirms the charge — see [Issue invoices from a managed account](#issue-invoices-from-a-managed-account). One limit to know before you design around it: - **Stripe Connect Express is not connected partner by partner.** BeeL.'s Stripe integration connects a Stripe account that authorises BeeL. itself, one account per NIF; it does not read the connected accounts of your own Connect platform. With Express, issue through the API as above — see [Stripe Connect Express and Standard](/stripe/edge-cases-and-limits#what-about-stripe-connect-express-vs-standard). Pricing is per NIF: see [Pricing](/pricing#api-plan). ## Provision an account `POST /v1/accounts` — **`accounts:write`**, either key. Include a `tax_profile` and the account comes back **ready to invoice**: its NIF, its default invoice series (ordinary `F`, simplified `S`, corrective `R`) and its VeriFactu configuration are set up in the same request, switched on in Test, and the response carries the `company_id` you put in the path of every call that invoices for them. ```bash curl -X POST https://app.beel.es/api/v1/accounts \ -H "Authorization: Bearer beel_sk_test_xxx" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 6f8c1e10-3b2a-4c9d-8e7f-1a2b3c4d5e6f" \ -d '{ "email": "cliente@example.com", "display_name": "Asesoría Cliente SL", "external_ref": "your-ref-0042", "language": "es", "access_level": "OPERATE", "tax_profile": { "nif": "B12345674", "legal_name": "Asesoría Cliente SL", "entity_type": "LEGAL_ENTITY", "address": { "street": "Calle Mayor", "number": "10", "postal_code": "28001", "city": "Madrid", "province": "Madrid" } } }' ``` The full field list, with types and defaults, is in [Provision an account](/accounts/provisionAccount). The fields that decide the shape of the whole relationship: - **`display_name`** is required. - **`access_level`** picks how much you can do afterwards, and it is the one choice you cannot fully undo: once the holder claims the account, only *they* can raise it. Omit it and you get `NONE`. See [Access levels](#access-levels). - **`external_ref`** is your own id for the account, and its idempotency key: re-sending the same one returns **`201` with the same account** (not `409`) — even if the `email` differs, in which case the new email is ignored. Pick something stable in *your* system — a customer id, not a timestamp. - **`tax_profile`** takes the same fields as [creating a NIF](/multi-nif/companies#create-a-company), with the same rules: the NIF must be registered in the AEAT census, in the sandbox too (for an individual, with a matching `legal_name`), and `default_irpf_rate` is a declaration you only send when the holder made it ([why](/multi-nif/companies#the-fields-that-decide-the-flow)). It is **required when `access_level` is `OPERATE`** — operating someone's invoicing needs a NIF to issue under, so omitting it is `422` [`VALIDATION_ERROR`](/errors/VALIDATION_ERROR). For exact response idempotency on network retries — the same body, the same claim token, no second email — also send an `Idempotency-Key` header: a repeat with the same key within 24 hours returns the cached response with `Idempotency-Replay: true`. ### Response ```json { "success": true, "data": { "person_id": "9f8c1e10-3b2a-4c9d-8e7f-1a2b3c4d5e6f", "account_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "status": "PROVISIONED", "claim_token": "claim_one_time_secret", "claim_url": "https://app.beel.es/reclamar?token=claim_one_time_secret", "company_id": "550e8400-e29b-41d4-a716-446655440000" } } ``` What the shape does not tell you: - **`claim_token` is shown once**, so capture it here. `claim_url` is the same token wrapped in the link for the current environment. See [Claim tokens](#hand-the-account-over-claim-tokens). - **An absent `claim_token` is not an error — read `status`.** With `CLAIMED` or `ACTIVE` the holder already took ownership, so what they need is a password reset, not another claim link. With `claim_link_already_issued: true` you resent the `external_ref` of an unclaimed account whose earlier link is still valid: that link keeps working, and no new one or email is issued. - **Every account is born with one company, and its `company_id` is in the response.** Without a `tax_profile` that company has no NIF yet: its holder registers it on claim, and until then its [issuing readiness](/multi-nif/companies#is-this-nif-ready-to-issue) reports `COMPANY_HAS_NO_NIF`. `company_id` is `null` only when you resend an `external_ref` whose account now holds two or more companies — find them with [List its NIFs](#list-its-nifs). A `409` means the email already belongs to a BeeL. account that this request can neither reuse (same `external_ref`) nor reactivate: | What it means for you | Error | Status | |---|---|---| | You did manage this account and ended it, but its holder has already claimed it. It is theirs now — ask them to grant you access; provisioning cannot take it back. | [`PROVISIONING_ACCOUNT_CLAIMED`](/errors/PROVISIONING_ACCOUNT_CLAIMED) | `409` | | The email belongs to an account you never managed, one someone else manages, or one whose management someone else ended. Use a different email or contact support. | [`PROVISIONING_EMAIL_ALREADY_REGISTERED`](/errors/PROVISIONING_EMAIL_ALREADY_REGISTERED) | `409` | With a `tax_profile`, the NIF is validated against the AEAT census before anything is created. If the census cannot be reached, the call answers `502` [`EXTERNAL_SERVICE_ERROR`](/errors/EXTERNAL_SERVICE_ERROR) and nothing is stored: repeat the same request later, with the same `Idempotency-Key`. The account keeps the country of the `tax_profile` address. ## Onboard many accounts from a file A portfolio arrives as a spreadsheet, so there is a file import. Download the template with [`GET /v1/templates/account-import`](/customers/downloadAccountImportTemplate): `;`-separated, UTF-8 with a byte order mark, one account per row. A file holds up to 100 rows and 5 MB; a larger portfolio goes in several passes. **Preview first.** It writes nothing and bills nothing, and tells you per row whether the NIF is in the census, whether its `external_ref` already exists and whether it would be switched on in Live: ```bash curl -X POST https://app.beel.es/api/v1/accounts/imports/preview \ -H "Authorization: Bearer beel_sk_live_xxx" \ -F "accounts_file=@accounts.csv" ``` Read `statistics.live_activations_pending` before importing: every NIF switched on in Live is billed to you, and this is the only place to see the total beforehand. **Then import** the same file. It requires an `Idempotency-Key` (`400` [`IDEMPOTENCY_KEY_REQUIRED`](/errors/IDEMPOTENCY_KEY_REQUIRED) without one): ```bash curl -X POST https://app.beel.es/api/v1/accounts/imports \ -H "Authorization: Bearer beel_sk_live_xxx" \ -H "Idempotency-Key: 0b6c3f4e-8f1a-4d7e-9a2b-5c6d7e8f9a0b" \ -F "accounts_file=@accounts.csv" ``` - Each new row becomes an `OPERATE` account with its NIF switched on in Test and in Live. Its `claim_token` and `claim_url` come back in this response and nowhere else. A row that already exists keeps a claim link that is still valid: it comes back with `claim_token` `null` and `claim_link_already_issued: true`. - It is **not atomic**: a bad row is reported and the good ones stay. - It is **safe to re-run** with the same file: rows are matched by `external_ref`, so fixing a bad row and uploading again creates only what is missing. - An optional `customers_file` (the customer import template) is applied to every account of the import. Row statuses, options and every field: [Preview an import of managed accounts](/accounts/previewAccountImport) and [Import managed accounts from a file](/accounts/createAccountImport). ## Hand the account over: claim tokens The `claim_url` you got at provisioning is how the holder takes ownership of their account. **Claiming is done by the holder on BeeL., not by you**: there is no public *claim* endpoint. They open the link, set a password if they are new, and accept BeeL.'s terms, privacy policy and a billing mandate that names your organisation as the payer. You learn it from the `account.claimed` [event](/webhooks/events), or by polling [Get one](#get-one). - **A claim token lasts 30 days**, and only the last one issued is live: issuing a new one kills the previous link. - **To resend the claim**, issue a fresh token. Re-provisioning with the same `external_ref` returns one only when the account is unclaimed and has no valid link left (expired, or never issued); a link that is still valid is kept, never revoked. - **Once the holder has claimed**, there is nothing left to claim: the call answers `409` [`PROVISIONING_ACCOUNT_CLAIMED`](/errors/PROVISIONING_ACCOUNT_CLAIMED). ```bash curl -X POST https://app.beel.es/api/v1/accounts/3fa85f64-5717-4562-b3fc-2c963f66afa6/claim-tokens \ -H "Authorization: Bearer beel_sk_test_xxx" \ -H "Content-Type: application/json" \ -d '{}' ``` The `201` carries `claim_token`, `claim_url` and `expires_at`. See [Issue a claim token](/accounts/createAccountClaimToken). ### Account status `status` on the account tells you where it stands: ```text PROVISIONED → CLAIMED → ACTIVE ``` - **`PROVISIONED`** — created, not claimed yet. - **`CLAIMED`** — the holder took ownership, but the account has no NIF yet. It appears for an account provisioned without a `tax_profile`, until its holder registers a NIF: the company it was born with does not count while it has no NIF. The list filter `status=CLAIMED` returns these accounts. - **`ACTIVE`** — claimed, with a NIF. An account provisioned **with** a `tax_profile` already has its NIF, so claiming takes it straight from `PROVISIONED` to `ACTIVE`. ### What claiming changes for you - **You keep your access and the bill.** Claiming makes the holder the owner of *their* account; it does not evict you, and your `access_level` survives untouched. - **You can no longer raise your own access.** Before the claim you set it freely; after it, only the holder can raise it (`403` [`MANAGED_SCOPE_ELEVATION_REQUIRES_OWNER`](/errors/MANAGED_SCOPE_ELEVATION_REQUIRES_OWNER)). You may still keep it or lower it. If you will ever need `OPERATE`, take it before you hand the link over. - **Reactivation stops being possible.** See [End your management](#end-your-management-of-an-account). ## Track the accounts you provisioned ### List `GET /v1/accounts` — **`accounts:read`**. Newest first, cursor-paginated, only the accounts you provisioned. Filter by `status`, or look one up by your own `external_ref`. ```bash curl "https://app.beel.es/api/v1/accounts?status=ACTIVE&limit=50" \ -H "Authorization: Bearer beel_sk_live_xxx" ``` - **Look accounts up by your own `external_ref`**, not by email. It returns 0..1 accounts, and an `external_ref` you never used returns an empty list rather than an error — so the same call answers "do I already have this client?" safely. - **Follow `data.next_cursor` until it comes back `null`.** A portfolio that grows between two calls will not skip or repeat rows the way an offset would. Filters and fields: [List provisioned accounts](/accounts/listAccounts). ### Get one `GET /v1/accounts/{account_id}` — **`accounts:read`**. The authoritative `status`, `access_level` and claim state of one account. An account you did not provision, whose management you ended, or that does not exist answers `403` [`PROVISIONING_ACCOUNT_NOT_ACCESSIBLE`](/errors/PROVISIONING_ACCOUNT_NOT_ACCESSIBLE). ### List its NIFs `GET /v1/accounts/{account_id}/companies` — **`companies:list`**, and an `access_level` other than `NONE`. `POST /v1/accounts` returns `company_id` once; this is how you get it back, and the only way to reach a NIF the holder registered later. ## Issue invoices from a managed account With **`OPERATE`** access, put the managed NIF's `company_id` in the path. In Test you can issue right away; in Live, real AEAT submission under the holder's NIF requires their signed [VeriFactu representation](/multi-nif/companies#signing-the-verifactu-representation) and [VeriFactu switched on](/verifactu/enabling-verifactu#put-the-nif-under-the-regime) for the NIF first. ```bash curl -X POST https://app.beel.es/api/v1/companies/550e8400-e29b-41d4-a716-446655440000/invoices \ -H "Authorization: Bearer beel_sk_test_xxx" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "Cliente Final SL", "nif": "B87654323", "address": { "street": "Calle Mayor", "number": "10", "postal_code": "28001", "city": "Madrid", "province": "Madrid" } }, "lines": [ { "description": "Monthly service fee", "quantity": 1, "unit_price": 100, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" } } ] }' ``` This creates a **draft**. Issue it — which numbers it and, where VeriFactu applies, submits it under their NIF — with the `id` from the response: ```bash curl -X POST https://app.beel.es/api/v1/companies/550e8400-e29b-41d4-a716-446655440000/invoices/7c9e6679-7425-40de-944b-e07fc1f90ae7/issue \ -H "Authorization: Bearer beel_sk_test_xxx" ``` Or do both in one call with `"options": { "issue_directly": true }` in the body. Customers are created the same way, under the same NIF: `POST /v1/companies/{company_id}/customers`. See [Create an invoice](/invoices/createCompanyInvoice) and [Issue an invoice](/invoices/issueCompanyInvoice). In the BeeL. dashboard, an account you provision and pay for always opens in Live, with no Test/Live switch. Its Test invoices and customers are reachable through the API: use your `beel_sk_test_` key on its `company_id`. ## Receive their webhooks Events of the accounts you manage reach you through a subscription on **your own** account — `POST /v1/accounts/{your_account_id}/webhooks` — with `"account_relationship": "managed"` (only theirs) or `"all"` (yours and theirs). It defaults to `own`. Three events exist only for provisioners: `account.claimed`, `company.created` and `representation.signed` (see [Available events](/webhooks/events#available-events)). Only accounts whose data you can see send events: one you hold at `NONE` sends none. Each delivered event carries `account_id`, `account_external_ref` and `account_relationship`, so you can route it to the right client. See [Webhooks](/webhooks) and [Events](/webhooks/events#envelope-structure). A subscription belongs to the environment of the key that created it, for managed accounts too: one created with a `beel_sk_test_` key receives only Test events, and one created with a `beel_sk_live_` key only Live events. To receive both, create one subscription with each key; `livemode` on each event tells you which one it came from. You cannot manage members, invitations or webhooks *inside* a managed account ([`MEMBER_MANAGEMENT_FORBIDDEN`](/errors/MEMBER_MANAGEMENT_FORBIDDEN) / [`ACCOUNT_MANAGEMENT_FORBIDDEN`](/errors/ACCOUNT_MANAGEMENT_FORBIDDEN)): those belong to its holder. ## Connect a payment provider (white-label) With `OPERATE` access you also connect **Stripe** to each managed NIF white-label — the holder authorizes from your own portal and charges are auto-invoiced under the correct NIF. See [Connect Stripe](/multi-nif/payment-connections) for the flow, and [Stripe](/stripe) for how connected charges become invoices. ## Change your access level `PATCH /v1/accounts/{account_id}/access-level` — **`accounts:write`**, **live key** (`403` [`LIVE_CREDENTIAL_REQUIRED`](/errors/LIVE_CREDENTIAL_REQUIRED) with a test key: it acts on an account that may already be invoicing). Set `access_level` to `NONE`, `VIEW` or `OPERATE`. Returns `204`. ```bash curl -X PATCH https://app.beel.es/api/v1/accounts/3fa85f64-5717-4562-b3fc-2c963f66afa6/access-level \ -H "Authorization: Bearer beel_sk_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "access_level": "VIEW" }' ``` An account you do not manage, or that does not exist, answers `403` [`ACCOUNT_NOT_ACCESSIBLE`](/errors/ACCOUNT_NOT_ACCESSIBLE). Raising the level after the holder has claimed the account answers `403` [`MANAGED_SCOPE_ELEVATION_REQUIRES_OWNER`](/errors/MANAGED_SCOPE_ELEVATION_REQUIRES_OWNER). ## End your management of an account `DELETE /v1/accounts/{account_id}/management` — **`accounts:write`**, **live key** (`403` [`LIVE_CREDENTIAL_REQUIRED`](/errors/LIVE_CREDENTIAL_REQUIRED) with a test key). Returns `204`. You lose access to the account at once and its NIFs stop counting towards your billable usage. Nothing is deleted or anonymised: the holder keeps the account, its NIFs and its invoices, and becomes responsible for their own subscription. ```bash curl -X DELETE https://app.beel.es/api/v1/accounts/3fa85f64-5717-4562-b3fc-2c963f66afa6/management \ -H "Authorization: Bearer beel_sk_live_xxx" ``` **Reversible only while the account stays unclaimed.** Provisioning the same email again brings the same account back — same holder, NIFs and invoices — under the `external_ref` and `access_level` of the new request. Only the manager who ended the relationship can do that. Once the holder has claimed it, provisioning answers `409` [`PROVISIONING_ACCOUNT_CLAIMED`](/errors/PROVISIONING_ACCOUNT_CLAIMED): getting the relationship back then needs their consent, not just their email address. ## Provisioning usage [`GET /v1/accounts/{account_id}/usage`](/accounts/getAccountUsage) — **`accounts:read`**, with **your own** `account_id` (from `GET /v1/me/identity`). Usage belongs to the provisioner, so any other id answers `404` [`PROVISIONING_ACCOUNT_NOT_ACCESSIBLE`](/errors/PROVISIONING_ACCOUNT_NOT_ACCESSIBLE). ```bash curl https://app.beel.es/api/v1/accounts/3fa85f64-5717-4562-b3fc-2c963f66afa6/usage \ -H "Authorization: Bearer beel_sk_live_xxx" ``` **Read `nifs` as "billable units", not as "real NIFs".** The unit that is billed is the *provisioned account*: every account you provision counts as one, including the empty and unclaimed ones, so `nifs` normally equals `provisioned_accounts` and only diverges when an account holds more than one NIF. An account you provisioned and forgot about is still on the bill until you [end your management of it](#end-your-management-of-an-account). ## Related - [Multi-NIF overview](/multi-nif) — member or managed account: which one you need - [Companies](/multi-nif/companies) — create and switch on the NIFs you provision - [Connect Stripe](/multi-nif/payment-connections) — white-label payment connections - [Scopes](/auth/scopes) — what the provisioning key needs --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Members & grants Account roles (owner/admin/member), per-company grants with an access level (view/operate), and handing over ownership. **Members** are the people with access to an account. Each member has one **account role**; a `MEMBER` additionally has per-company **grants** that decide which NIFs they can see and operate. Where members sit in the model, and when you want a managed account instead, is in the [Overview](/multi-nif#the-model). Every path on this page hangs off the account — `/v1/accounts/{account_id}/members/…` — because a membership belongs to the account, not to a NIF. All of them require **OWNER or ADMIN** of that account (`403` [`MEMBER_MANAGEMENT_FORBIDDEN`](/errors/MEMBER_MANAGEMENT_FORBIDDEN) otherwise), plus the **`members:read`** or **`members:write`** scope. **Changing people needs your live key.** Members and grants are shared between Test and Live, so every write on this page made with a `beel_sk_test_` key answers `403` [`LIVE_CREDENTIAL_REQUIRED`](/errors/LIVE_CREDENTIAL_REQUIRED). Reading works with either key. See [Test and live keys](/multi-nif#test-and-live-keys). ## Two independent axes Role and access are not the same question, and confusing them is the usual mistake: - **Account role** — *who administers the account*. Billing, API keys, inviting people. - **Access level** — *how much someone can do with one NIF*. Read, or read and write. | account_role | Administers | Reaches | |---|---|---| | `OWNER` | Full control: billing, API keys, members, and handing ownership over. Exactly one per account. | Every NIF, implicitly. | | `ADMIN` | Everything an OWNER can do except handing ownership over. | Every NIF, implicitly. | | `MEMBER` | Nothing. No billing, no keys, no member management. | Only the NIFs granted to them, at the level of each grant. | `OWNER` and `ADMIN` reach **every** NIF of the account implicitly. Only a `MEMBER` is scoped NIF by NIF, through grants, at one of these levels: | access_level | What the holder can do | |---|---| | `VIEW` | Read their invoices, customers, products, series and fiscal data. | | `OPERATE` | Everything in VIEW, plus creating and editing them. Issuing on their behalf additionally requires a signed fiscal representation from the account holder. | A grant takes `VIEW` or `OPERATE`. `NONE` only exists for [managed accounts](/multi-nif/managed-accounts#access-levels): a grant that grants nothing is not a grant, so you remove access by deleting the grant, not by downgrading it. Grants govern people who use the dashboard. API keys are created by an `OWNER` or `ADMIN` and act with that reach; a `MEMBER` cannot create keys. **`OWNER`/`ADMIN` cannot receive grants.** They already reach everything, so their grant list is always empty. Grants apply to `MEMBER`s only — trying otherwise is `422` [`GRANTS_ONLY_FOR_MEMBER`](/errors/GRANTS_ONLY_FOR_MEMBER). ## Who is in the account `GET /v1/accounts/{account_id}/members` lists them; `GET …/members/{member_id}` returns one, in the same shape. Fields and types: [List account members](/members/listAccountMembers). ```bash curl https://app.beel.es/api/v1/accounts/3fa85f64-5717-4562-b3fc-2c963f66afa6/members \ -H "Authorization: Bearer beel_sk_live_xxx" ``` Two ids come back and they are not interchangeable: - **`member_id`** is the handle for every call on this page. It identifies this person *in this account*. - **`person_id`** is the stable identity of the human, the same across every account they belong to. Use it to recognise the same person across the accounts you manage — you never pass it to an endpoint. Each member also carries a `permissions` block (`can_change_role`, `assignable_roles`, `can_remove`, `can_transfer_ownership`, `can_edit_grants`). Drive your UI from it instead of re-implementing the role policy; the API enforces the same rules regardless of what you render. ## Grant a member access to one NIF `PUT /v1/accounts/{account_id}/members/{member_id}/grants/{company_id}` — **`members:write`**, live key. The company is in the path, so the body carries only the level. Returns `200` with the grant: ```bash curl -X PUT \ https://app.beel.es/api/v1/accounts/3fa85f64-5717-4562-b3fc-2c963f66afa6/members/6f8c1e10-3b2a-4c9d-8e7f-1a2b3c4d5e6f/grants/550e8400-e29b-41d4-a716-446655440000 \ -H "Authorization: Bearer beel_sk_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "access_level": "OPERATE" }' ``` **One call touches one NIF.** This `PUT` creates the grant or changes its level, and leaves the member's other grants exactly as they were. To set up access to three NIFs you make three calls — there is no endpoint that replaces the whole set at once, so a concurrent edit by a colleague can never be silently wiped by your request. Revoking is the mirror image — `DELETE` on the same path, `204`: ```bash curl -X DELETE \ https://app.beel.es/api/v1/accounts/3fa85f64-5717-4562-b3fc-2c963f66afa6/members/6f8c1e10-3b2a-4c9d-8e7f-1a2b3c4d5e6f/grants/550e8400-e29b-41d4-a716-446655440000 \ -H "Authorization: Bearer beel_sk_live_xxx" ``` `GET …/members/{member_id}/grants` lists what a member currently holds — empty for `OWNER`/`ADMIN`. See [Grant a member access to a company](/members/putAccountMemberGrant) and [Revoke a member's access](/members/deleteAccountMemberGrant). | When | Error | Status | |---|---|---| | The target is an `OWNER` or `ADMIN`. | [`GRANTS_ONLY_FOR_MEMBER`](/errors/GRANTS_ONLY_FOR_MEMBER) | `422` | | The NIF hangs off another account — including one you manage. | [`GRANT_COMPANY_NOT_IN_ACCOUNT`](/errors/GRANT_COMPANY_NOT_IN_ACCOUNT) | `422` | | `access_level` is `NONE` or anything other than `VIEW` / `OPERATE`. | [`VALIDATION_ERROR`](/errors/VALIDATION_ERROR) | `422` | ## Change a member's role `PATCH /v1/accounts/{account_id}/members/{member_id}` — **`members:write`**, live key, body `{ "account_role": "ADMIN" }`. See [Change a member's role](/members/patchAccountMember). The only assignable roles are `ADMIN` and `MEMBER`. `OWNER` is never accepted here — it returns `422` [`OWNER_ROLE_NOT_ASSIGNABLE`](/errors/OWNER_ROLE_NOT_ASSIGNABLE), because ownership moves only through the handover below (from the dashboard), never by setting a role. Promoting a `MEMBER` to `ADMIN` makes their grants irrelevant — they now reach every NIF implicitly. Demoting back to `MEMBER` restores whatever grants they had, so check them after the change. **The last OWNER cannot be demoted**, and `DELETE …/members/{member_id}` cannot remove them either: the account always keeps exactly one (`422` [`LAST_OWNER_PROTECTED`](/errors/LAST_OWNER_PROTECTED)). To step down, hand ownership over first. ## Hand over ownership `PUT /v1/accounts/{account_id}/owner` is **dashboard-only**. No API key can hand an account over, a live one included: the call answers `403` [`OPERATION_REQUIRES_SESSION`](/errors/OPERATION_REQUIRES_SESSION), so a leaked key can never take the account. The current `OWNER` does it from **Settings → Members**; the member becomes `OWNER` and the caller drops to `ADMIN`. An `ADMIN` who tries gets `403` [`OWNER_ROLE_RESERVED`](/errors/OWNER_ROLE_RESERVED). Repeating it once that member already owns the account returns the same `204`, so a retry after a timeout is safe. See [Set the account owner](/members/putAccountOwner). **Provisioning accounts for others?** You do not hand them over with this call: the holder takes ownership by redeeming a [claim token](/multi-nif/managed-accounts#hand-the-account-over-claim-tokens). ## Related - [Invite a new member](/multi-nif/invitations) — add people to the account by copy-link or email, with initial grants - [Scopes reference](/auth/scopes) — the exact scopes for members and companies --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Connect Stripe Connect Stripe per company (NIF) so its payments auto-generate invoices under the right NIF — for the companies you own and, white-label, for the managed accounts you provision. Connect **Stripe** to a **company (NIF)** and every payment on that account auto-generates an invoice under that exact NIF, registered with AEAT when VeriFactu is enabled for it — no manual step. In the multi-NIF model the connection is **per company**, never per account: each NIF has its own Stripe account, its own invoices, its own numbering. Two audiences, one API: - **Your own companies** — connect Stripe to any NIF your account owns. - **Managed companies** — a provisioner (agency, accounting firm or fleet) connects Stripe **white-label** to a NIF it [manages](/multi-nif/managed-accounts), so the holder authorizes from *your* portal and never leaves it. This page covers **managing the connection** (connect · list · configure · disconnect) and its payment events. What a payment then produces — the Fiscal Mirror, taxes, numbering, VeriFactu submission — lives in the [Stripe → invoices](/stripe) section. ## Endpoints Four operations manage a connection, and every one of them hangs off the company, so the NIF is always explicit: - [List a NIF's connections](/payment-connections/listCompanyPaymentConnections) — `GET /v1/companies/{company_id}/payment-connections` - [Start a connection (OAuth)](/payment-connections/initiatePaymentConnection) — `POST /v1/companies/{company_id}/payment-connections/authorizations` - [Update its settings](/payment-connections/updateCompanyPaymentConnection) — `PATCH /v1/companies/{company_id}/payment-connections/{connection_id}` - [Disconnect](/payment-connections/disconnectCompanyPaymentConnection) — `DELETE /v1/companies/{company_id}/payment-connections/{connection_id}` Each reference page carries the scope it requires and its full schemas. **The `{company_id}` in the path is the only source of context** — the account that owns the NIF is derived from it, whether that is your own account or one you [provisioned](/multi-nif/managed-accounts). A NIF you do not reach returns `403`, the same answer a non-existent one gets. **`{connection_id}` is the connection's UUID**, as returned by the list endpoint — not a provider slug. A NIF can hold several connections of the same provider, so the slug alone does not name one; a connection of another NIF answers `404`, exactly like one that does not exist. The `provider` slug is still what you send in the **body** when starting a connection: currently only **`stripe`** (Stripe Connect) is operative. All four work for a NIF you **own or manage**; acting on a NIF you neither own nor manage returns `403`. `start` exists for the **white-label** flow — connecting a NIF you [manage](/multi-nif/managed-accounts) from your own portal — see [Connecting a managed NIF](#connecting-a-managed-nif). ## Connecting a managed NIF Provisioners connect Stripe **by API, white-label** — the holder authorizes from *your* portal and comes back to it. Two steps: **1. Start the connection.** Send the `provider` slug in the body, and optionally a `return_url` (absolute `https://`) to send the holder back to your portal after authorizing: ```bash curl -X POST https://app.beel.es/api/v1/companies/550e8400-e29b-41d4-a716-446655440000/payment-connections/authorizations \ -H "Authorization: Bearer beel_sk_live_xxx" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "provider": "stripe", "return_url": "https://your-portal.example.com/connections/stripe/return" }' ``` The connection itself only exists once the holder authorizes, which is why opening the authorization is a sibling sub-resource and not a `POST` on the collection. Response — an `authorization_url` you redirect the holder to: ```json { "success": true, "data": { "authorization_url": "https://connect.stripe.com/oauth/authorize?..." } } ``` **2. The holder authorizes.** They approve on Stripe; BeeL's callback finalizes the connection and redirects to your `return_url` with query params appended — on success `status=success`, `provider`, `company_id`, `connection_id` and `account` (the provider account id, e.g. `acct_…`); on error `status=error`, `provider` and `message` (an error code). Omit `return_url` and the callback lands on BeeL's default integrations screen. A `return_url` that is not an absolute `https://` URL is rejected with `422` [`VALIDATION_ERROR`](/errors/VALIDATION_ERROR), and a `provider` BeeL. does not connect with `422` [`PROVIDER_NOT_SUPPORTED`](/errors/PROVIDER_NOT_SUPPORTED). The connection is **sealed under the NIF's holder**, so auto-invoicing runs under the correct NIF — not under your provisioner account. `start` requires that you **own** the NIF or manage it at **`OPERATE`**. A NIF you neither own nor manage — or manage only at `VIEW` — returns `403` [`ACTIVE_COMPANY_NOT_ACCESSIBLE`](/errors/ACTIVE_COMPANY_NOT_ACCESSIBLE) and no connection is initiated; its holder must connect it from the BeeL. app. **The NIF must be switched on in the mode of your key** (`beel_sk_test_*` → Test, `beel_sk_live_*` → Live). Otherwise `start` returns `400` [`COMPANY_NOT_ACTIVATED_IN_ENVIRONMENT`](/errors/COMPANY_NOT_ACTIVATED_IN_ENVIRONMENT) and no `authorization_url`: activation is what creates the invoice series and tax configuration, so without it every incoming charge would be skipped instead of invoiced. Test and Live activations are independent — see [switching a NIF on](/multi-nif/companies#switching-a-nif-on-in-test-or-live). ## Checking status ```bash curl https://app.beel.es/api/v1/companies/550e8400-e29b-41d4-a716-446655440000/payment-connections \ -H "Authorization: Bearer beel_sk_live_xxx" ``` Each connection comes back with its status and its auto-invoicing settings — [its fields are in the reference](/payment-connections/listCompanyPaymentConnections). For the question you are usually asking ("did this provisioned NIF finish connecting?"), read `status`: a NIF whose holder opened the authorization but never approved it has **no connection at all**, not a connection in a pending state. An empty list is the normal answer while you wait. ## Configuring the connection ```bash curl -X PATCH https://app.beel.es/api/v1/companies/550e8400-e29b-41d4-a716-446655440000/payment-connections/7c3e1a90-5d2b-4f18-9a64-0b1c2d3e4f50 \ -H "Authorization: Bearer beel_sk_live_xxx" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "auto_invoice_enabled": true, "event_source": "PAYMENTS" }' ``` [Update a connection](/payment-connections/updateCompanyPaymentConnection) changes the settings that decide what BeeL. does with each incoming charge: auto-invoicing, which family of Stripe events it acts on (`event_source`), customer creation, email delivery, tax-inclusive pricing, series and filters. A field you omit keeps its value — except `filter_config`, which **replaces the whole object** when sent. What each setting does is in [Connection settings](/stripe/connection-settings). `simplificada_threshold` is deprecated: it is still accepted and returned, but it no longer affects the invoice type. ## Disconnecting ```bash curl -X DELETE https://app.beel.es/api/v1/companies/550e8400-e29b-41d4-a716-446655440000/payment-connections/7c3e1a90-5d2b-4f18-9a64-0b1c2d3e4f50 \ -H "Authorization: Bearer beel_sk_live_xxx" ``` The connection moves to `DISCONNECTED` and auto-invoicing **stops**: BeeL. no longer processes that account's charges. Already-issued invoices are **not** affected. The authorization is not withdrawn on Stripe's side — remove BeeL. from the connected account in Stripe if you want that too. A connection id that the NIF does not hold gets `404`. ## Payment events A connection records every charge it receives as a **payment event**, whether or not it produced an invoice. This is the audit trail for a NIF's takings, and the place to recover a charge that failed to invoice. Seven operations, all hanging off the same `/v1/companies/{company_id}` prefix so the NIF stays explicit: - [List the events of a connection](/payment-events/listCompanyPaymentEvents) — `GET .../payment-connections/{connection_id}/events` - [Read one event](/payment-events/getCompanyPaymentEvent) — `GET .../payment-connections/{connection_id}/events/{event_id}` - [Retry processing an event](/payment-events/retryCompanyPaymentEvent) — `POST .../payment-connections/{connection_id}/events/{event_id}/retry` - [Draft an invoice from an event](/payment-events/generateCompanyPaymentEventDraft) — `POST .../payment-connections/{connection_id}/events/{event_id}/draft` - [Mark an event as resolved](/payment-events/resolveCompanyPaymentEvent) — `POST .../payment-connections/{connection_id}/events/{event_id}/resolve` - [Discard an event](/payment-events/discardCompanyPaymentEvent) — `POST .../payment-connections/{connection_id}/events/{event_id}/discard` - [Restore a discarded event](/payment-events/restoreCompanyPaymentEvent) — `POST .../payment-connections/{connection_id}/events/{event_id}/restore` ### What an event tells you [The event object](/payment-events/getCompanyPaymentEvent) reports three separate things, and telling them apart is what makes the endpoint usable: - **What the provider said** — the charge, its fee, the net, who paid, and the provider's own ids. This is reconciliation material: match it against Stripe's own dashboard, never against the invoice. - **What BeeL. did with it** — whether an invoice came out, and if not, why. A failure is classified as well as described, so you can route on the category instead of parsing a message. - **What you can do next** — `needs_action`, plus the flags below. **Check `retry_available`, `draft_available` and `discard_available` before calling.** They tell you which actions the event supports; calling one it doesn't returns `400`. ### Recovering a charge that did not invoice - **`retry`** re-runs the normal processing. Use it when the failure was transient — for example the NIF had no default series at the time and now does. - **`draft`** creates a draft invoice from the event's data (`201`), for you to review and issue with `POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`. Use it when automatic processing cannot succeed but the charge is genuine. ```bash # Find the events still waiting on you. curl "https://app.beel.es/api/v1/companies/550e8400-e29b-41d4-a716-446655440000/payment-connections/7c3e1a90-5d2b-4f18-9a64-0b1c2d3e4f50/events" \ -H "Authorization: Bearer beel_sk_live_xxx" # Draft an invoice from one of them. curl -X POST "https://app.beel.es/api/v1/companies/550e8400-e29b-41d4-a716-446655440000/payment-connections/7c3e1a90-5d2b-4f18-9a64-0b1c2d3e4f50/events/8ee6b023-c4e5-482e-93ca-dc66da2f9cb5/draft" \ -H "Authorization: Bearer beel_sk_live_xxx" \ -H "Idempotency-Key: $(uuidgen)" ``` ### Closing an event without an invoice Not every event that needs action should end in a BeeL. invoice: - **`resolve`** marks it as handled outside BeeL. — for example, you invoiced that charge with another tool. It leaves the events that need action without generating anything, and it is terminal: a resolved event cannot be retried. Only `FAILED`, `SKIPPED` or `RECEIVED` events qualify. - **`discard`** takes it out of the default list. It stays in the audit trail, and **`restore`** brings it back. An event already linked to an issued invoice, or being processed, cannot be discarded. Both act on **the whole payment**, not just the event you name: the sale, its failed attempts and its refunds are resolved or discarded together, and `restore` undoes exactly the discard that took them out. The response carries the event you named. ### The life of a charge ```mermaid sequenceDiagram autonumber participant Payer as Payer participant Stripe as Stripe participant BeeL. as BeeL participant You as Your integration Payer->>Stripe: pays the connected NIF Stripe->>BeeL: charge notification BeeL->>BeeL: records a payment event alt the NIF can issue BeeL->>BeeL: issues the invoice and submits it to AEAT BeeL-->>You: webhook invoice.issued BeeL-->>You: webhook verifactu.status.updated else something blocks it BeeL->>BeeL: event kept with needs_action true You->>BeeL: GET .../events to find it You->>BeeL: POST .../events/{event_id}/retry or /draft BeeL-->>You: 201 draft invoice to review and issue end ``` ## Related - [What a payment generates](/stripe) — fiscal Mirror, taxes, numbering, supported events and VeriFactu submission - [Managed accounts](/multi-nif/managed-accounts) — provision and operate NIFs as an agency or fleet — the context for white-label connections - [Connection settings](/stripe/connection-settings) — per-connection options: series, auto-invoicing, fiscal limits - [API reference](/payment-connections/initiatePaymentConnection) — full request/response schemas for every connection endpoint --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # How taxes are applied The Fiscal Mirror rule — BeeL. reflects the Stripe charge exactly, with a clean fallback when Stripe Tax isn't enabled. When BeeL. generates an invoice from a Stripe payment, it does not recalculate taxes. It **reflects the Stripe charge exactly** — total, breakdown, currency, everything. This is the *Fiscal Mirror* rule. This page is the practical version of that contract; the full mechanics live in [Data conversion](/stripe/data-conversion). ## At a glance | | | |---|---| | **Tax breakdown source** | Stripe (when Stripe Tax is enabled) → your account defaults (otherwise) | | **Does BeeL. recalculate** | Never. The invoice total = the Stripe charge total | | **IRPF on Stripe invoices** | Always **0**, regardless of your default IRPF setting | | **Where to override the fallback** | Settings > Integrations > Stripe (per-connection inclusivity flag) | | **Where to set your account default** | Settings > Taxes (used only when Stripe Tax is off) | ## How it works ### When Stripe Tax is enabled Every Stripe charge carries `tax_amounts[]` per line with rate, amount, and inclusivity. BeeL. reads those and emits the invoice with **the exact same numbers** — your account-level tax defaults are not consulted. Example: Stripe Tax says `21 % IVA, inclusive, on 121 EUR` → BeeL. emits a line with `base 100.00 €`, `IVA 21.00 €`, `total 121.00 €`. ### When Stripe Tax is NOT enabled The charge has no breakdown — just a total. BeeL. falls back to your defaults: 1. The connection's "Prices include tax" setting (override per Stripe integration) 2. Your **default tax** (IVA / IGIC / IPSI) at the rate configured in Settings > Taxes It then decomposes the Stripe total as **inclusive of that rate**. The decomposition is exact — no residual rounding. Example: Stripe charges `121 €`, your default is IVA 21 % inclusive → BeeL. emits `base 100.00 €`, `IVA 21.00 €`, `total 121.00 €`. ## IRPF is always 0 on Stripe invoices This is a BeeL. rule, not a statement about who must withhold. A withholding would make the invoice total differ from the Stripe charge, which Fiscal Mirror does not allow, so BeeL. never applies your default professional IRPF to a Stripe payment. If a customer withholds IRPF from what they pay you, a Stripe-generated invoice will not reflect it: issue that invoice through the [Invoicing API](/invoices/createCompanyInvoice) instead. ## Charges at 0 % [#charges-at-0] A line Stripe charges at 0 % becomes an exempt or non-taxable line, and an invoice needs the reason. Stripe's `taxability_reason` says whether it knows it; when your main tax is IVA, BeeL. completes what Stripe leaves open with the **default exemption reason** you declared in [**Settings > Taxes**](https://app.beel.es/ajustes/impuestos). | What Stripe reports on the 0 % line | What BeeL. does | |---|---| | No reason | Uses your default exemption reason. Without one, the charge waits in **Needs attention** with the reason "0 % rate requires an exemption reason": declare it and retry the event | | `product_exempt`, `product_exempt_holiday` | Uses your default reason if it is an exemption. Otherwise the same wait | | `not_subject_to_tax` | Uses your default reason if it is a non-subject one. Otherwise the same wait | | `not_available` — a **manual tax rate** at 0 %, such as the one some platforms create by default | Treated as a charge with no reason **when the buyer is in the IVA territory**; see below. Otherwise `UNSUPPORTED_STRIPE_TAX_TREATMENT` | | `zero_rated`, `reverse_charge`, `not_supported` | For a buyer in the Canary Islands, Ceuta, Melilla or outside the EU, BeeL. applies the 0 % treatments in [Sales outside the territory where IVA applies](/stripe/data-conversion#sales-outside-the-iva-territory) when their conditions hold, and waits as `TAX_TREATMENT_NEEDS_DATA` when it cannot tell. Otherwise `UNSUPPORTED_STRIPE_TAX_TREATMENT` | | `customer_exempt`, `not_collecting`, or a reason BeeL. does not know | `UNSUPPORTED_STRIPE_TAX_TREATMENT`: BeeL. does not reflect these treatments | **The buyer is in the IVA territory** when the buyer's country is Spain **and** the postal code (five digits) is in the peninsula or the Balearic Islands. A postal code starting with 35 or 38 (Canary Islands), 51 (Ceuta) or 52 (Melilla), a buyer from another country, or a payment with no postal code is outside it. A manual 0 % rate does not say why there is no tax, so BeeL. only takes your declared reason for it where the sale carries IVA. A charge that waits as `UNSUPPORTED_STRIPE_TAX_TREATMENT` is not retried and has no draft: issue that invoice through the [Invoicing API](/invoices/createCompanyInvoice), or correct the tax in Stripe. If you create a manual 0 % rate in Stripe for sales to Spanish customers, declare your default exemption reason in BeeL. first; without it, those charges wait in **Needs attention**. ## Equivalence surcharge [#recargo-de-equivalencia] If your account has the equivalence surcharge (*recargo de equivalencia*) configured and the Stripe charge maps to a B2B retailer (mapping has the right flag), BeeL. applies the surcharge automatically as part of the line classification. See [Equivalence surcharge](/verifactu/equivalence-surcharge). It only ever lands on a **standard (F1)** invoice: a simplified one cannot carry the surcharge ([`SIMPLIFICADA_FORBIDS_SURCHARGE`](/errors/SIMPLIFICADA_FORBIDS_SURCHARGE)), so a retailer in that regime needs a payment that resolves to F1 — with NIF and address on the Stripe customer. ## Where to change settings ### Connection-level (per Stripe integration) 1. Go to [**Settings > Integrations > Stripe**](https://app.beel.es/ajustes/integraciones?provider=stripe&settings=true) 2. Edit **Prices include tax** — controls the inclusivity flag used in the fallback path 3. Save ### Account-level (default tax) 1. Go to [**Settings > Taxes**](https://app.beel.es/ajustes/impuestos) 2. Choose your **main tax** (IVA, IGIC, or IPSI) and the standard rate 3. Save Account-level defaults are used **only when Stripe Tax doesn't expose a breakdown** — when Stripe Tax is on, your defaults are bypassed. Changes to either set of settings apply to **new invoices only**. Already-issued invoices are immutable once their VeriFactu submission is in flight. ## Worked example Imagine your Stripe customer pays **100 EUR**: ### Case A — Stripe Tax enabled (21 % inclusive) Stripe says: line of 100 EUR base + 21 EUR IVA = 121 EUR total. Customer paid 121 EUR. | Field | Value | |---|---| | Taxable base | 100.00 € | | IVA (21 %) | 21.00 € | | IRPF | 0 € | | **Total** | **121.00 €** | ### Case B — Stripe Tax disabled, your default is IVA 21 % inclusive Stripe says: total of 100 EUR. Customer paid 100 EUR. BeeL. decomposes inclusively: | Field | Value | |---|---| | Taxable base | 82.64 € | | IVA (21 %) | 17.36 € | | IRPF | 0 € | | **Total** | **100.00 €** | ### Case C — Stripe Tax disabled, your default is IVA 21 % **exclusive** Stripe says: total of 100 EUR. You turned **Prices include tax** off on the connection. BeeL. treats the 100 EUR as the base and **adds** the IVA on top: | Field | Value | |---|---| | Taxable base | 100.00 € | | IVA (21 %) | 21.00 € | | IRPF | 0 € | | **Total** | **121.00 €** | The customer paid 100 EUR but the invoice total is 121 EUR — a divergence. **Only use the exclusive mode when your Stripe prices are net** (rare in B2C). Otherwise leave **Prices include tax** on. ## FAQ ### Does BeeL. use Stripe's tax rates? **Yes**, when Stripe Tax is enabled. BeeL. copies Stripe's breakdown verbatim — that's the Fiscal Mirror rule. ### What happens if I change my default IVA rate? It only matters when Stripe Tax is **disabled** on that connection. With Stripe Tax enabled, BeeL. uses Stripe's rate, not yours. Either way, the change applies to new invoices only. ### Can I have different taxes per Stripe customer? The per-connection settings apply uniformly. For genuinely per-customer tax behaviour, enable Stripe Tax (which lets you configure tax codes per product / per customer) — BeeL. will reflect Stripe's decision. ### What about IGIC / IPSI? If your default tax is IGIC or IPSI, BeeL. uses it in the fallback path. With Stripe Tax enabled, BeeL. uses whatever rate Stripe sends — make sure your Stripe Tax registrations match your invoicing reality. ## Related - [Data conversion](/stripe/data-conversion) — full Fiscal Mirror specification - [Generated invoices](/stripe/generated-invoices) — F1 vs F2 decision based on amount and customer data - [VeriFactu submission](/stripe/verifactu-submission) — when the resulting invoice goes to AEAT --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Configure proforma invoices in Stripe Set up Stripe invoices as proforma so your customers only receive the invoice issued through BeeL. ## At a glance | | | |---|---| | **Why do this** | So your customers don't receive two invoices (one from Stripe and one from BeeL) | | **What you do** | Mark Stripe invoices as "PROFORMA" and disable their emails | | **Consequence** | Your customers won't see invoices in the Stripe portal — the invoices issued through BeeL. are in BeeL. | | **Time** | 5 minutes | --- ## Why is this necessary? When you connect Stripe with BeeL, there are **two systems generating documents**: - **Stripe** generates its own receipts and invoices. They are not issued through BeeL.: they carry no number from your BeeL. series, no billing record and no VeriFactu QR - **BeeL.** issues the invoice for the payment under your NIF, with its number, billing record and QR If you don't do anything, your customer may receive two documents and not know which one is the invoice. Marking Stripe's as proforma avoids that. **Current limitation:** by disabling Stripe invoices, your customers won't be able to view them in the Stripe Customer Portal. It is the way to avoid two documents for the same payment. We're working to improve this. --- ## Step by step ### Add a "PROFORMA" prefix to Stripe invoices In the [Stripe Dashboard](https://dashboard.stripe.com), navigate to **Settings > Billing > Invoice template**. In the **Prefix** field, type `PROFORMA-` and save. Stripe invoices will now be numbered `PROFORMA-0001`, `PROFORMA-0002`… making it clear they're not fiscal documents. ### Add an informational note Still in **Invoice template**, find the **Footer** or **Memo** field and add: > This document is for information only and is not an invoice. The invoice for this payment is issued separately. ### Disable Stripe invoice emails Go to **Settings > Billing > Emails** and disable **Email invoices and receipts to customers** so your customers only receive invoices from BeeL. If you want Stripe to keep sending **payment receipts** (payment confirmation), keep receipts enabled and only disable invoices. ### Disable invoices in the Customer Portal If you use the Stripe Customer Portal, go to **Settings > Billing > Customer portal**. Under **Invoice history**, disable visibility and save. --- ## Result With this configuration: - Your customers **only receive the invoice issued through BeeL.** - Stripe invoices are marked as **PROFORMA** for your internal use - **No duplicates** or confusion ## Related - [Stripe overview](/stripe) — how the integration works end to end - [How taxes are applied](/stripe/configuracion-impuestos) — the Fiscal Mirror rule - [Connection settings](/stripe/connection-settings) — auto-send and the other per-connection options --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Connection settings Per-connection settings that affect how BeeL. processes Stripe payments — fiscal limits, customer creation, email delivery. Each Stripe connection has its own configuration. You can have a strict production connection, a permissive staging connection, and a third one for a different revenue stream — all on the same BeeL. account. This page lists every setting that affects how BeeL. turns a Stripe payment into an invoice. **Dashboard or API.** Configure them at **Settings → Integrations → Stripe → pick connection**, or programmatically: [List payment connections](/payment-connections/listCompanyPaymentConnections) returns each connection with its settings, and [Update a payment connection](/payment-connections/updateCompanyPaymentConnection) changes them. Settings this page describes that are not in those operations are dashboard-only. ## At a glance | | | |---|---| | **Where to configure** | Settings → Integrations → Stripe → pick connection | | **Independent per connection** | Yes — multiple Stripe accounts can have different settings | | **Changes affect** | Only new invoices; already-issued invoices are immutable | | **Most-tuned settings** | Auto-create customer, auto-send via email | ## Fiscal limits ### Simplified threshold [#simplified-threshold-deprecated] The highest amount, VAT included, at which a charge whose customer has no full fiscal data is invoiced as a simplified invoice (F2). | | | |---|---| | **API field** | `simplificada_threshold` | | **Default** | 400 € | | **Range accepted** | 0.01 € to 3,000 € | | **Effect** | Above it, a charge without full fiscal data is saved as a draft instead of a simplified invoice | The invoice type depends on the customer's data first and on the threshold second: - **Customer with a NIF (or foreign identifier), a name and a complete address** — standard invoice, at any amount. - **Customer with a NIF or identifier but no name or no address** — BeeL. saves a standard draft with the identifier, at any amount, for you to complete. It is never issued as a simplified invoice, which would drop the identifier. - **Customer without an identifier** — simplified invoice up to the threshold. Above it, BeeL. saves a draft (and, on Live connections, emails you); it appears in **Needs attention** (*Necesita atención* in the dashboard) for you to complete and issue. See [Charges that cannot be invoiced automatically](/stripe/generated-invoices#charges-that-cannot-be-invoiced-automatically). The default is the general limit for a simplified invoice. A higher value, up to 3,000 €, is your statement that your activity is one of those listed in article 4.2 of RD 1619/2012 (retail sales, hospitality and the rest of the list): [SIM-002 · Above 400 €, a simplified invoice needs an art. 4.2 activity](/rules/simplified#sim-002). A simplified invoice generated from a payment **never identifies its recipient**: it keeps the name, email and address the payment carries, but not the NIF or `alternative_id`, and it is not linked to the customer. It is the same rule as for invoices you create through the API — see [Simplified vs standard](/verifactu/simplified-vs-standard). That is why it is only used for a customer without an identifier. The full F1/F2 decision tree is in [Generated invoices](/stripe/generated-invoices#forward-invoices-standard-vs-simplified). ### Prices include tax When Stripe Tax is **not enabled** on the connection, BeeL. needs to know whether the Stripe charge amount already includes IVA. | | | |---|---| | **Default** | On (charges are inclusive) | | **On** | BeeL. treats the charge total as inclusive: `base = total / (1 + rate/100)` | | **Off** | BeeL. treats the charge total as the base and adds IVA on top — the resulting invoice total is **larger** than what Stripe charged | When Stripe Tax IS enabled, this setting is ignored (Stripe's breakdown wins). See [Data conversion](/stripe/data-conversion). **Turn this off only if your Stripe prices are net.** Most B2C prices in Stripe are tax-inclusive; turning it off on inclusive prices produces invoices whose total exceeds what the customer paid. ## VeriFactu submission There is no per-connection VeriFactu setting. Whether a Stripe-generated invoice reaches AEAT is decided by the issuing NIF, like any other invoice — see [VeriFactu submission for Stripe invoices](/stripe/verifactu-submission). ## Customer management ### Auto-create customer | | | |---|---| | **Default** | On | | **Effect when on** | BeeL. stores a mapping for each new Stripe customer and auto-links to a managed customer when NIFs match | | **Effect when off** | Invoices are issued with the buyer's data inline; nothing is stored for re-use | See [Customer mappings](/stripe/customer-mappings). ## Invoice delivery ### Auto-invoicing | | | |---|---| | **Default** | On in Test mode. **Off in Live mode**: you switch it on yourself | | **Effect when on** | Payment-success events generate invoices | | **Effect when off** | Events are received but no invoice is created (useful for staging, migration, or pause windows) | A Live connection starts with auto-invoicing off, because every charge it invoices produces a real invoice. Until you switch it on, no charge is invoiced and nothing warns you. Switch it on in the dashboard or with `auto_invoice_enabled` ([Update a payment connection](/payment-connections/updateCompanyPaymentConnection)). Charges received before that are not invoiced on their own: [retry them](/stripe/edge-cases-and-limits#retrying-a-stripe-event) once it is on. Disconnecting and reconnecting the account keeps the value you chose. When off, events are recorded as skipped without asking for attention, and can be retried once you turn auto-invoicing back on — see [Edge cases and limits](/stripe/edge-cases-and-limits#retrying-a-stripe-event). API field: `auto_invoice_enabled`. ### Event source A Stripe account sends every event to the same webhook endpoint, but you may only want one family of them invoiced. API field: `event_source`. | Value | What gets invoiced | |---|---| | `BOTH` (default) | Charges and Stripe Invoices. A charge that arrives through both families is invoiced once | | `PAYMENTS` | Charges, from `payment_intent.*` and `checkout.session.*`. `invoice.*` events are ignored | | `INVOICES` | Stripe Billing documents, from `invoice.*`. `payment_intent.*` and `checkout.session.*` events are ignored | Events outside the chosen family are recorded as skipped on purpose and need no attention. Refunds, disputes and credit notes are acted on under every value, because Stripe does not always report a correction through the family the charge came in; a correction whose charge was never invoiced is recorded as skipped and needs no action either. Changing the value affects events that arrive from then on; events already recorded keep their outcome. ### Auto-send via email | | | |---|---| | **Default** | On in Test mode, off in Live mode | | **Effect when on** | Generated invoices are automatically emailed to the customer (using the email from the Stripe payload) | | **Effect when off** | Invoices are generated but NOT auto-emailed | You can always send an issued invoice manually later — that path goes through the public Invoicing API. ## Refund mapping (not configurable) The `refund.reason` and `credit_note.reason` from Stripe are mapped to AEAT R1–R5 codes by a fixed rule, not a per-connection setting — see [Generated invoices > Mapping Stripe's reason](/stripe/generated-invoices#mapping-stripes-reason-to-r1r5). ## What changes when you flip a setting | Setting changed | Affects next Stripe event? | Affects existing invoices? | |---|---|---| | Simplified threshold | Yes | No | | Auto-create customer | Yes | No (existing mappings stay as they are) | | Auto-invoicing | Yes | No | | Auto-send via email | Yes | No (already-sent emails are not re-sent) | | Prices include tax | Yes (fallback path only) | No | ## Related - [Generated invoices](/stripe/generated-invoices) — how settings affect the F1/F2 + R1–R5 decisions - [Customer mappings](/stripe/customer-mappings) — auto-create / linked vs ad-hoc - [VeriFactu submission](/stripe/verifactu-submission) — why there is no per-connection switch - [How taxes are applied](/stripe/configuracion-impuestos) — the Fiscal Mirror rule --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Customer mappings How BeeL. matches Stripe customers to BeeL. customers, auto-creates ad-hoc records, and handles missing fiscal data. Every Stripe payment carries some hint about who paid (customer ID, email, billing details). BeeL. turns that into a *customer mapping* — a stored link between the Stripe-side customer and the BeeL-side customer (or to an ad-hoc record when no BeeL. customer exists yet). The mapping is what lets BeeL. issue a properly-identified invoice on every subsequent payment from the same buyer. **Mappings are built and maintained automatically.** They are not user-editable today and there is no public API to create, link, or unlink them. Their content is derived from what Stripe sends on each payment, plus your **auto-create customer** connection setting. The integration points that *are* yours to control live in [Connection settings](/stripe/connection-settings). **Recent improvements (May 2026)** — if you previously hit any of these, they're fixed: - Mappings now persist on the **first** webhook delivery, including the auto-create path. Previously some flows skipped the mapping write, so the *second* payment from the same buyer was treated as new. - The mapping is updated **atomically**. Two concurrent webhook deliveries for the same Stripe customer can no longer race to create duplicate mappings. - Country **no longer defaults to `ES`**. If Stripe sends a foreign address (or no country at all), the mapping stores what Stripe actually sent. - The Stripe charge total is now mirrored on **both** forwards and corrective invoices. Refunds that previously wouldn't reconcile because the credit note total drifted from the original charge now match exactly. - Simplified (F2) invoices issued from Stripe **preserve the customer's name and email** from the Stripe payload instead of defaulting everyone to *Consumidor final*. ## Two kinds of mapping A mapping is either: - **Linked** — tied to a managed customer in your BeeL. account. Future invoices use the managed customer's current data (address, legal name). - **Ad-hoc** — a stand-alone snapshot of the buyer's data extracted from Stripe. Future invoices reuse the snapshot without creating a BeeL. customer. Both are valid sources for an invoice's `recipient`. Whether a mapping ends up linked or ad-hoc depends on what Stripe sent and on auto-linking (below) — you don't choose at mapping time. ## What happens on every Stripe payment ```text event arrives │ ▼ 1. Read the connection's "auto-create customer" setting │ ├─ off → No mapping work. Invoice issued with the │ buyer's data inline (nothing stored). │ └─ on ▼ 2. Look up a mapping for this Stripe customer (by Stripe customer ID and/or email). │ ├─ found │ ├─ linked → recipient = the linked managed customer │ └─ ad-hoc → recipient = the stored snapshot │ └─ not found ▼ 3. Build a snapshot from the Stripe payload: – customer.name, email, address – customer.tax_ids[0].value as NIF (if Spanish format) 4. Persist a new ad-hoc mapping with that snapshot 5. recipient = the new snapshot ``` After step 5, the next payment from the same Stripe customer will hit step 2 and reuse the mapping — no re-extraction. ## How persistence works A mapping is uniquely identified by the pair *(your Stripe connection, the Stripe customer ID)*. When a webhook arrives and **auto-create customer** is on, BeeL. updates the mapping atomically: - If no mapping exists for that Stripe customer, it's created — either linked to a managed customer (if one matches the NIF the payload carries) or as ad-hoc with the snapshot extracted from the payload. - If a mapping already exists, the mapping row itself isn't rewritten: the link target and the ad-hoc snapshot stay as they were captured the first time. So the **mapping** is stable across webhooks. **But the data behind it is not always stable** — and that distinction matters: - For a **linked** mapping, every subsequent webhook re-runs the upsert against the managed customer's own record. If Stripe sent updated fiscal data, the **managed customer** is updated to match — *Stripe wins* over what you have in BeeL. If you need to preserve a manual edit on a managed customer, turn off **auto-create customer** for that connection. - For an **ad-hoc** mapping, the snapshot is captured once at creation and never refreshed by a later webhook. If Stripe later collects a NIF or corrects the address, the existing ad-hoc mapping keeps the old data — see [When the recipient ends up incomplete](#when-the-recipient-ends-up-incomplete). ## When BeeL. auto-links to a managed customer When **auto-create customer** is on and the Stripe payload carries a valid Spanish NIF, BeeL. looks up your managed customers by that NIF: - **A match exists** → the mapping is created linked to the existing managed customer (no duplicate created), and the managed customer's fiscal data is **refreshed with what Stripe sent** under the *Stripe wins* policy. - **No match** and Stripe sent a complete address → BeeL. creates a brand-new managed customer from the Stripe payload and links the mapping to it. - **No match** and the address is incomplete → no managed customer is created or updated; the mapping is created as **ad-hoc** with the snapshot. If the payload has no valid NIF (foreign buyer with only `alternative_id`, or no tax data at all), the mapping is always ad-hoc — no auto-link, no managed customer. ## Ad-hoc fields When a mapping is created as ad-hoc, BeeL. stores a snapshot of the buyer's data from the Stripe payload. The fields and their sources: | Snapshot field | Source | |---|---| | Legal name | See [Where the name and address come from](/stripe/data-conversion#customer-fiscal-data) | | NIF | `customer.tax_ids[0].value` (if Spanish format) | | Email | `customer.email` | | Phone | `customer.phone` | | Street, number, postal code, city, province, country, country code | See [Where the name and address come from](/stripe/data-conversion#customer-fiscal-data) | This snapshot is the **source for the auto-emitted invoice's recipient block** whenever the mapping is ad-hoc (no managed customer linked). It is populated only when the mapping is first created — once it exists, future webhooks never overwrite it (see [How persistence works](#how-persistence-works)). ## When the recipient ends up incomplete Two common reasons: ### 1. Stripe didn't send a customer Some payment flows (Stripe Terminal, payment links without customer collection) don't attach a `customer.*` block. BeeL. falls back to `charge.billing_details` (name, email, address). When there is no Stripe customer ID at all, **no mapping is created** — the payment is just one-off — and the invoice falls to F2 (simplified), populating the recipient with whatever name/email Stripe sent and otherwise defaulting to *Consumidor final*. See [Generated invoices](/stripe/generated-invoices). ### 2. No NIF on the Stripe customer Stripe lets you collect tax IDs (`customer.tax_ids`) but it's opt-in. Without a NIF, BeeL. cannot issue an identified invoice: up to the connection's [simplified threshold](/stripe/connection-settings#simplified-threshold-deprecated) the payment gets a simplified invoice, which never carries the NIF, and above it BeeL. saves a draft and the charge lands in the **Needs attention** inbox (*Necesita atención* in the dashboard) for you to complete (see [Edge cases and limits](/stripe/edge-cases-and-limits#necesita-atención--inbox-of-skipped-events)). With a NIF, a name and a complete address, the invoice is always a standard one; a NIF without a name or address is saved as a standard draft, at any amount. **Fix:** enable Stripe Tax's "collect tax IDs" or use Checkout's tax-collection options. As soon as the **next** payment from the same buyer carries `tax_ids`, the lookup at step 2 above still finds the existing mapping — but because mappings are frozen at creation time, that new NIF won't propagate into the old mapping. For payments that originated under the old (NIF-less) mapping, the operational path is to fix the buyer's setup in Stripe so any *future* customer ID gets a fresh, properly-built mapping on first use. **Country is no longer assumed to be Spain.** If Stripe sends no country, BeeL. stores whatever Stripe actually sent (including empty) — and the invoice path adapts based on the real data. ## Connection settings that affect mappings | Setting | Default | Effect | |---|---|---| | **Auto-create customer** | On | Persist a mapping on every new buyer. Turning off keeps invoices flowing but stores no mapping. | You change it in [Connection settings](/stripe/connection-settings). ### Pitfall: turning auto-create off mid-stream The flag only gates **new** mappings. If you turn **auto-create customer** off after the integration has been running: - Existing mappings keep resolving normally. Every payment from a Stripe customer that BeeL. has already seen will reuse its mapping and issue the invoice as usual. - Payments from a *new* Stripe customer ID won't create a mapping. The recipient is built inline from the Stripe payload and the [Stripe event](/stripe/supported-events) lands in the **Needs attention** inbox so you can review it. Turning the flag back on does not retroactively persist mappings for events processed while it was off. ## Related - [Connection settings](/stripe/connection-settings) — the toggles you control - [Data conversion](/stripe/data-conversion) — how the resolved customer maps into the invoice - [Generated invoices](/stripe/generated-invoices) — F1/F2 decision based on fiscal data - [Edge cases and limits](/stripe/edge-cases-and-limits) — what BeeL. does when fiscal data is missing --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Data conversion — Stripe → BeeL The Fiscal Mirror rule, how amounts and taxes are mapped, why IRPF is always 0, the silent sanitization BeeL. applies to inbound payloads, and how the forward and corrective emitters split responsibilities. When BeeL. generates an invoice from a Stripe event, it does not recalculate the operation — it **reflects the Stripe charge exactly**. This is the Fiscal Mirror rule and it's the single most important thing to understand about the integration. This page covers it in detail and documents every conversion BeeL. applies — including the **silent sanitization** of inbound recipient fields and the **split between the forward and rectificativa emitters** that route Stripe events to the right kind of invoice. ## The Fiscal Mirror rule ```text A Stripe charge is the fiscal truth. BeeL's job is to translate it into a registro de facturación, not to second-guess its tax breakdown. ``` In practice: - If Stripe charged 121 €, BeeL's invoice total is **121.00 €** (never 120.99 €, never 121.05 €). - If Stripe Tax says the operation is 100 € base + 21 € IVA, BeeL's invoice carries those exact numbers. - If Stripe Tax doesn't expose a breakdown, BeeL. decomposes the charge using **your configured default IVA rate** treating the total as inclusive. The decomposition is exact (no residual rounding). The only thing BeeL. never copies from Stripe is the **VeriFactu metadata** (classification, exemption, regime) — those depend on legal context Stripe doesn't model. BeeL. infers them from your settings + the customer's geography. **There is no "we recalculate taxes for you" mode.** Fiscal Mirror is the only behaviour — the invoice total always equals the Stripe charge total. ## Field-by-field mapping ### Amounts and currency | Stripe field | BeeL. invoice field | Conversion | |---|---|---| | `payment_intent.amount_received` (cents) | `total` (EUR) | Divide by 100 | | `charge.amount` (cents) | Fallback when `amount_received` is absent | Divide by 100 | | `invoice.amount_paid` (cents, Stripe Billing) | Fallback for `invoice.paid` events | Divide by 100 | | `currency` | Validated; must be `eur` | Other currencies are rejected at processing time | | `metadata.external_payment_id` | `metadata.external_payment_id` | The PaymentIntent id (`pi_…`); for a charge without a PaymentIntent, the Charge id (`ch_…`); for a Stripe invoice paid outside Stripe, the payment record id (`pr_…`) | ### Customer fiscal data The resolved customer comes from [Customer mappings](/stripe/customer-mappings). The conversion of fields: | Stripe source | BeeL. invoice field | |---|---| | `customer.email` → fallback `charge.billing_details.email` | `recipient.email` | | The name (see below) | `recipient.legal_name` | | The tax ID collected by Stripe (customer, Checkout session or invoice), or the NIF in the payment's metadata | `recipient.nif` (if Spanish) or `recipient.alternative_id.number` | | `address.line1` / `line2` | `recipient.address.street` | | `address.postal_code` | `recipient.address.postal_code` | | `address.city` | `recipient.address.city` | | `address.country` (ISO-2) | `recipient.address.country` (full name — the API's address block carries the country name, not the ISO code) | **Where the name and address come from** depends on how the buyer's NIF arrived: - **NIF collected by Stripe** (the tax IDs of the customer, of the Checkout session or of the Stripe invoice): the name is the one on that same object, and the address is that object's, completed only from addresses the buyer declared (Checkout session, customer, Stripe invoice) in the same country and tax territory. Nothing comes from the card, not even the country; without a declared country, the one the tax ID type implies is used. If that object has no name, or no address can be found, the charge is saved as a standard draft to complete — see [Generated invoices](/stripe/generated-invoices#charges-that-cannot-be-invoiced-automatically). - **NIF in the payment's metadata** (WooCommerce and similar): the name is `metadata.customer_name`, then `charge.billing_details.name`, and the billing details of the payment count as a declared address. - **No NIF**: the name is the card's (`charge.billing_details.name`) when the payment carries one, then the Checkout session's, the Stripe invoice's, the customer's and `metadata.customer_name`. The address comes whole from one source: the card's, then the Checkout session's, the customer's and the Stripe invoice's. When the payment is a Stripe invoice (`invoice.paid`) without a NIF collected by Stripe and neither the Stripe invoice nor the Stripe customer carries an address country, BeeL. reads it from the **billing address of the charge that paid the invoice**. It is used last: any address the invoice or customer carries wins, and the charge only supplies the country when the chosen address has none. This way `invoice.paid` and the payment event of the same charge see the same buyer, and the country decides how the sale is taxed. **Country no longer defaults to "ES".** If Stripe sends no country, BeeL. leaves it empty — and may fall back to a simplified invoice (up to the connection's simplified threshold) or a draft (above it, or when the buyer has a NIF) if F1 requirements aren't met. (Prior behaviour silently set ES, which masked malformed payloads.) ### Tax breakdown — Stripe Tax enabled When you have **Stripe Tax** active, every charge carries `tax_amounts[]` per line with the rate and inclusivity flag. BeeL. reads these and pre-populates each invoice line: ```text Stripe says: line { amount: 12100, tax_amounts: [{ amount: 2100, inclusive: true, rate: 21.00 }] } BeeL emits (BeeL invoice line): { "unit_price": 100, "taxable_base": 100, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" }, "line_total": 121 } ``` The user's default tax configuration is **not consulted** when Stripe exposes a breakdown — your Stripe Tax setup wins. ### Tax breakdown — Stripe Tax NOT enabled When `tax_amounts[]` is empty (simple PaymentIntents, manual Stripe Invoices without Tax), BeeL. falls back to your account configuration: 1. Read the connection's tax-inclusive pricing setting (per integration) 2. Read your **default tax configuration** (Settings > Taxes): main tax (IVA / IGIC / IPSI) and standard rate 3. Treat the Stripe total as inclusive of that rate 4. Decompose: `base = total / (1 + rate/100)`, `tax = total - base` Example: Stripe charges 121.00 €, your default is IVA 21 %, inclusive → BeeL. emits `base: 100.00, IVA: 21.00`. This decomposition is exact; we don't round to "round" base values. If your IVA rate is 10 % and Stripe charged 121.00 €, the base is `110.00` and the IVA is `11.00`. ### Shipping charged without VAT Shipping is part of the sale it delivers, so Spanish law taxes it at the sale's rate (art. 78.Dos.1º LIVA). When Stripe charged shipping with no tax rate and no taxability reason, on a sale that does carry VAT, BeeL. invoices the shipping as an ancillary cost: - The shipping amount Stripe charged is read as **tax-inclusive** at the sale's VAT rate, so the invoice total is still exactly what Stripe charged. - If the sale mixes several rates, the shipping is split between them in proportion to each rate's base. - The share that belongs to an exempt or non-taxable part of the sale goes out exempt, with that part's own exemption reason and no tax. - Tips and discounts are not part of that split. ### Coupons and discounts (Stripe Billing) A Stripe Invoice paid with a coupon is invoiced for what was **charged**, not for the gross line. The sale line keeps its full price and the discount goes on a separate line with a negative quantity, so sale minus discount equals the amount Stripe collected. The discount line carries its share of the tax too, so the invoice's total tax is the tax Stripe calculated on the discounted amount. A credit note on a discounted invoice credits the discounted amount as well — see [Generated invoices](/stripe/generated-invoices#credit-notes-stripe-billing). ### IRPF — always 0 on Stripe lines Every line BeeL. emits from a Stripe webhook has **`irpf_rate: 0`** (the API field) regardless of your default IRPF configuration. Why: this is a BeeL. rule, not a statement about who must withhold. If BeeL. applied your default professional IRPF (e.g. 15 %), the invoice total would diverge from the Stripe charge — violating Fiscal Mirror. If a customer withholds IRPF from what they pay you, **don't issue that invoice through Stripe** — issue it through the [Invoicing API](/invoices/createCompanyInvoice) with your usual settings. ### VeriFactu classification BeeL. infers each line's `exemption_reason` (or leaves it unset for the default S1) based on the customer's geography. The full mapping lives in [Tax classification](/verifactu/tax-classification); a Stripe-specific summary: | Customer country | Resulting `exemption_reason` | `main_tax.type` | |---|---|---| | Spain (peninsula or Balearic) | *omitted* (S1) | `IVA` | | Canary Islands (resolved from address) | *omitted*, unless the sale qualifies for one of the 0 % treatments below | `IGIC` if configured, else `IVA` | | Ceuta / Melilla | *omitted*, unless the sale qualifies for one of the 0 % treatments below | `IPSI` if configured, else `IVA` | | EU B2B (VIES VAT-ID on `tax_ids`) | `EXENTA_ART_25` (goods) or `NO_SUJETA_LOCALIZACION` (services) | `IVA` | | EU B2C | *omitted* — origin IVA, or the destination rate with `regime_key: "17"` (if OSS enabled) | `IVA` | | Non-EU | `EXENTA_ART_21` + `regime_key: "02"` (goods shipped there) or `NO_SUJETA_LOCALIZACION` (services to a business); see below | `IVA` | #### Sales outside the territory where IVA applies [#sales-outside-the-iva-territory] For a buyer in the Canary Islands, Ceuta, Melilla or outside the European Union, BeeL. needs to know whether each line is **goods or a service**. It reads it from the **Stripe tax code of the product** (`txcd_…`), or, when the product has none, from the default tax code of your Stripe Tax settings. Whether the line is a subscription does not count. - **Goods shipped to the buyer's territory** — an export exempt under article 21 (`EXENTA_ART_21`, regime key `02`). It needs a shipping address in that same territory: [TAX-024 · A sale of goods to a buyer outside the territory where IVA applies is an export exempt under article 21](/rules/taxes#tax-024). - **An electronically supplied service to a business in the Canary Islands, Ceuta or Melilla**, at 0 % with a Stripe reason — not subject (`NO_SUJETA_LOCALIZACION`, regime key `08`): [TAX-023 · A software or electronic service sold to a business in the Canary Islands, Ceuta or Melilla is not subject to IVA](/rules/taxes#tax-023). - **A service to a business outside the EU** — not subject (`NO_SUJETA_LOCALIZACION`, regime key `01`). When BeeL. cannot tell — a product without a tax code and no account default, an ambiguous code, goods mixed with services, a service to a private individual, goods without a shipping address in the buyer's territory, among others — the charge waits in **Needs attention** as `TAX_TREATMENT_NEEDS_DATA`. Fix the tax code, the shipping address or the buyer's data in Stripe and retry the event; no draft is offered. The full conditions are in the two rules above. ## What BeeL. never modifies - The Stripe charge total — invoice total = Stripe total, always - The currency — must be EUR; we don't convert - The Stripe payment identity (`pi_…`, or `ch_…` / `pr_…` as described above) — kept as `metadata.external_payment_id` - The Stripe customer ID — kept on the customer mapping for future matching ## Reconciling discrepancies If you spot a Stripe charge whose generated invoice has a different total, it's almost always one of: 1. **A refund happened between charge and invoice generation** — check for a sibling corrective 2. **The event was retried after a configuration change** — the retry applied the new configuration 3. **Tax inclusivity flipped** between Stripe Tax and the connection override — check the connection's tax-inclusive pricing toggle For genuine mismatches that none of these explain, write to [it@beel.es](mailto:it@beel.es) with the Stripe event ID and the BeeL. invoice number. ## Silent sanitization Before building the invoice, BeeL. checks a few fields of the Stripe payload and **trims or annotates the ones that would otherwise make the invoice fail**. Every modification is recorded with the resulting invoice, so the change can be audited. | Field | Limit / rule | What happens when violated | |---|---|---| | `recipient.legal_name` | Max **120** UTF-16 code units, as VeriFactu counts them (an emoji takes two) | Truncated to fit | | `recipient.email` | Max **255 chars** | Truncated to fit. If the email is so long that the address can't be preserved, BeeL. prefers to issue the invoice **without an email** rather than persist a malformed one | | `recipient.nif` (Spanish context only) | Must match Spanish DNI/NIE/CIF shape **and** pass the control-digit check | The NIF itself is **not modified**. The invoice is rejected when it is issued, and the event waits in **Necesita atención** | | `recipient.country_code` (ISO 3166-1 alpha-2) | Must be a recognised code | An unrecognised code falls back to the **non-EU branch** for tax classification; the invoice is not aborted | **The email-drop case is surprising.** When the supplied address is so long that even `@domain` exceeds 255 chars, BeeL. prefers to issue the invoice **without an email** rather than persist a malformed one (whose automatic send would then fail without telling anyone). The dropped value's original length is preserved in the warning so you can correlate the event. The Spanish-context check for the NIF treats a payload with **no country at all** as Spain (BeeL's default) — so a missing `country_code` still triggers NIF validation, but a foreign `country_code` skips it. ### Where the warnings end up Every modification is recorded with the resulting invoice. Those records are not exposed through the public API today — write to [it@beel.es](mailto:it@beel.es) with the invoice number if you need to trace a specific transformation. A NIF warning means the invoice was created as a **draft** (or left in **Needs attention**, *Necesita atención* in the dashboard, depending on the flow) and will be **rejected at issuance** with [`NIF_INVALID_CONTROL_DIGIT`](/errors/NIF_INVALID_CONTROL_DIGIT) / `NIF_INVALID_FORMAT`. See [Customer mappings](/stripe/customer-mappings) for how the recipient is resolved and the Necesita atención section in [Edge cases and limits](/stripe/edge-cases-and-limits#necesita-atención--inbox-of-skipped-events) for what to do next. ## Forward vs corrective routing [#forward-vs-rectificativa-routing] Stripe events fan out into **two distinct routes**, picked by the type of event: - **Forward route** — issues a brand-new F1 / F2 (forward invoice) with a fresh number against the resolved series. - **Corrective route** — looks up the original BeeL. invoice via the Stripe payment identifier and issues an R1 / R4 / R5 corrective invoice (*factura rectificativa*) that mirrors the original's fiscal shape. | Stripe event | Channel | Route | Result | |---|---|---|---| | `payment_intent.succeeded` | Connect | Forward | New F1 / F2 | | `checkout.session.completed` | Connect & Subscription | Forward | New F1 / F2 | | `invoice.payment_succeeded` / `invoice.paid` | Subscription / Connect | Forward | New F1 / F2 | | `refund.updated` | Connect | Corrective | R1 / R4 / R5 against the original | | `credit_note.created` | Connect | Corrective | R1 / R4 / R5 against the original | The full list of supported events lives in [Supported events](/stripe/supported-events); this page only documents how each is routed. ### What each route takes from where - A **forward** invoice resolves its recipient from the Stripe payment (optionally creating the customer mapping), picks F1 or F2 as described in [Generated invoices](/stripe/generated-invoices#forward-invoices-standard-vs-simplified), and takes the next number of the series. - A **corrective** **never resolves a recipient** of its own: it copies the recipient of the original invoice. The Stripe reason is mapped to a rectification code, and the tax-inclusive mode and IVA rate are taken from the original, so the corrective nets against it exactly. ### What happens when the corrective arrives first [#what-happens-when-the-rectificativa-arrives-first] Stripe does not guarantee event ordering. A `refund.updated` can land before BeeL. has seen the `payment_intent.succeeded` that produced the original invoice. In that case the event waits with reason `REFUND_ORIGINAL_NOT_FOUND` and BeeL. retries it automatically — up to 8 times, about a day in all; once the payment arrives and creates the original, the next retry of the refund produces its rectificativa. See the Necesita atención section in [Edge cases and limits](/stripe/edge-cases-and-limits#necesita-atención--inbox-of-skipped-events). ### Idempotency on both sides Both routes deduplicate by the Stripe identifier of what they invoice: - A forward invoice is deduplicated by the Stripe payment: processing the same `payment_intent.succeeded` again always resolves to the same invoice, even when two deliveries race each other. - A corrective is deduplicated by the Stripe refund or credit-note ID: processing the same `re_...` or `cn_...` again always resolves to the same corrective. The practical guarantee is: **retrying any Stripe event always yields the same BeeL. invoice**, never a duplicate. ## Related - [Generated invoices](/stripe/generated-invoices) — F1/F2 decision and series resolution - [Customer mappings](/stripe/customer-mappings) — how the recipient is resolved and how to correct a bad NIF before retrying - [Supported events](/stripe/supported-events) — every event and what it produces - [Edge cases and limits](/stripe/edge-cases-and-limits#necesita-atención--inbox-of-skipped-events) — how skipped events surface and how to retry them - [VeriFactu submission](/stripe/verifactu-submission) — when the resulting invoice goes to AEAT --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Edge cases and limits Every reason BeeL. can skip a Stripe event, how to retry one, and the known limits of the integration. When a Stripe event produces no invoice, BeeL. records the reason on the event so you can audit it. This page lists every scenario, how to clear it, and what you can do to recover (retry the event, generate a draft, mark it resolved). ## Needs attention — inbox of skipped events [#necesita-atención--inbox-of-skipped-events] BeeL. doesn't discard Stripe events silently. Every event it receives is recorded; if it can't be turned into an invoice, it keeps the event with the reason instead of discarding it. The dashboard's **Needs attention** panel (*Necesita atención* in the dashboard) lists the events you can actually act on — the rest stay in the event log for visibility, but don't ask for action. Two kinds of reason decide whether an event goes to the panel: 1. **Checks on the event itself** — environment, currency and amount. They are checked first, in a fixed order, and the first one that fails decides the reason. 2. **Reasons found while building the invoice** — missing configuration, incomplete fiscal data, or a filter you configured. Only reasons that require your action show up in the panel. Events that need none (the second event of a pair Stripe always sends, unsupported event types, events already invoiced) are in the event log but stay out of the panel. ### Checks on the event itself These checks are evaluated in this exact order — the first match wins. | Check | What it checks | Skip reason | |---|---|---| | Livemode mismatch | The Stripe event's `livemode` flag doesn't match the connection's environment (sandbox vs live) | `LIVEMODE_MISMATCH` | | Unsupported currency | The event currency isn't EUR (current single supported currency) | `UNSUPPORTED_CURRENCY` | | Amount zero or negative | The payment_intent / charge / invoice / refund has `amount ≤ 0` | `AMOUNT_ZERO_OR_NEGATIVE` | ### Other reasons that surface in Needs attention [#other-reasons-that-surface-in-necesita-atención] These reasons also land in the panel, because you have a concrete action to take: | Skip reason | Triggered when | |---|---| | `CONNECTION_DISCONNECTED` | The Stripe connection has been deauthorised; events keep arriving but produce no invoice | | `AMOUNT_REQUIRES_FISCAL_DATA` | Legacy: events recorded before charges above 3,000 € without NIF / address were saved as drafts automatically. **Generate draft** is offered | | `RECTIFICATIVA_OUT_OF_PERIOD` | A refund/credit note targets an original outside the rectificative window | | `REFUND_ORIGINAL_NOT_FOUND` | A refund arrived but BeeL. can't find the original payment (often out-of-order delivery) | | `SIMPLIFIED_INVOICE_NOT_ALLOWED` | The sale cannot go on a simplified invoice (for example a service to a buyer outside Spain) and the buyer's address is incomplete. **Generate draft** is offered | | 0 % rate requires an exemption reason | Stripe charged a line at 0 % and neither Stripe nor your default exemption reason says why. Declare the reason and retry; no draft is offered | | `UNSUPPORTED_STRIPE_TAX_TREATMENT` | Stripe reports a treatment BeeL. does not reflect (customer exempt, not collecting, a reverse charge or zero rate outside the cases BeeL. invoices, or a manual 0 % rate for a buyer outside the IVA territory). Not retryable, no draft | | `TAX_TREATMENT_NEEDS_DATA` | A sale to a buyer in the Canary Islands, Ceuta, Melilla or outside the EU that BeeL. cannot classify with the data Stripe sent: no or ambiguous product tax code, goods mixed with services, a service to a private individual, goods without a shipping address in the buyer's territory. Retryable, no draft | | `TAX_CHARGED_TO_NON_TAXABLE_RECIPIENT` | Stripe charged tax to a buyer whose purchase is not subject to Spanish IVA. Retryable once the country or the tax rate is corrected | | `RECTIFICATIVA_EXCHANGE_MANUAL_CORRECTION` | A refund or credit note on a charge whose simplified invoice was exchanged, when BeeL. cannot correct the exchange invoice on its own. No draft | | `MISSING_DEFAULT_SERIES` | No default series is configured for the resolved document type | | `FILTER_AMOUNT_REJECTED`, `FILTER_CUSTOMER_REJECTED`, `FILTER_DESCRIPTION_REJECTED`, `FILTER_CATEGORY_REJECTED` | A filter rule **you configured** rejected the event — visible in the panel for review, but won't trigger an email | ### Charges saved as a draft Some charges are not skipped: BeeL. saves them as a **draft** invoice, emails the issuer (Live connections only), and lists the draft in **Needs attention**. Open the draft, complete it and issue it. Retrying the original event is not needed. | Cause | What to do | |---|---| | The customer has a NIF but no name or no address, at any amount | Complete the recipient's name and address and issue | | The charge is above the connection's [simplified threshold](/stripe/connection-settings#simplified-threshold-deprecated) and the customer has no NIF | Complete the recipient (name, NIF or foreign identifier, address) and issue | | The AEAT definitively rejected the buyer's NIF | Correct the NIF or the name and issue; the invoice is never downgraded to a simplified one | See [Charges that cannot be invoiced automatically](/stripe/generated-invoices#charges-that-cannot-be-invoiced-automatically). ### What to do, by reason - **`LIVEMODE_MISMATCH`** — someone hit your test webhook with a live event (or vice versa). Reconfigure the Stripe webhook endpoint so the right connection receives the right environment. - **`UNSUPPORTED_CURRENCY`** — BeeL. is EUR-only today. Switch the Stripe price to EUR, or route non-EUR charges through a separate Stripe account that doesn't feed BeeL. - **`AMOUNT_ZERO_OR_NEGATIVE`** — typically $0 authorisations confused with charges, internal vouchers, or full-refund chains. Review the original charge in Stripe; if it's legitimately zero, mark the event resolved. - **`AMOUNT_REQUIRES_FISCAL_DATA`** — only on events recorded before charges above 3,000 € without a NIF / address were saved as drafts automatically (see [Charges that cannot be invoiced automatically](/stripe/generated-invoices#charges-that-cannot-be-invoiced-automatically)). **Generate a draft** from the event: it comes out as a standard invoice with the recipient left for you to complete, and cannot be issued until the recipient has a NIF (or a foreign identifier) and an address. Retrying doesn't help — it reads the recipient from the same Stripe payment again. - **`SIMPLIFIED_INVOICE_NOT_ALLOWED`** — **generate a draft** and complete the buyer's street, city, postal code and country; to avoid it next time, make Checkout collect the full billing address. See [Buyers outside Spain](/stripe/generated-invoices#buyers-outside-spain). - **0 % rate requires an exemption reason** — declare your default exemption reason in Settings > Taxes, then retry the event. See [Charges at 0 %](/stripe/configuracion-impuestos#charges-at-0). - **`UNSUPPORTED_STRIPE_TAX_TREATMENT`** — issue the invoice through the Invoicing API, or correct the tax in Stripe. A manual 0 % rate is only invoiced automatically for buyers in the peninsula or the Balearic Islands. - **`TAX_TREATMENT_NEEDS_DATA`** — give the product a Stripe tax code (or set a default one in your Stripe Tax settings), collect the shipping address or the buyer's tax ID, and retry the event. See [Sales outside the territory where IVA applies](/stripe/data-conversion#sales-outside-the-iva-territory). - **`TAX_CHARGED_TO_NON_TAXABLE_RECIPIENT`** — correct the buyer's country or the tax rate in Stripe, then retry the event. - **`RECTIFICATIVA_EXCHANGE_MANUAL_CORRECTION`** — issue the corrective by hand or contact support. See [Refunds on a charge whose simplified invoice was exchanged](/stripe/generated-invoices#refunds-on-a-charge-whose-simplified-invoice-was-exchanged). - **`CONNECTION_DISCONNECTED`** — reconnect the integration from the dashboard, then retry any events that arrived while disconnected. - **`MISSING_DEFAULT_SERIES`** — set a default series for the resolved document type (standard / simplified / rectificative) and retry the event. - **`REFUND_ORIGINAL_NOT_FOUND`** — usually out-of-order delivery; BeeL. retries the event automatically up to 8 times, 10 minutes after the first failure and doubling each time, never more than 6 hours apart — about a day in all. If it persists, the original was issued by a different connection or before BeeL. was connected — handle the refund manually. - **`FILTER_*`** — the event matched a filter you configured. Either widen the filter and retry the event, or mark it resolved if the rejection was intentional. ### Retrying from Needs attention [#retrying-from-necesita-atención] Once you've fixed the underlying cause (e.g. set a NIF on the customer, reconnected the integration, configured a default series), retry the event from the dashboard: BeeL. processes it as if Stripe had just delivered it — there's no need to ask Stripe to resend. For reasons where a retry would always give the same result (`AMOUNT_ZERO_OR_NEGATIVE`, `UNSUPPORTED_CURRENCY`, `CONNECTION_DISCONNECTED` while still disconnected), the dashboard offers **Mark resolved** instead of **Generate draft / Retry**: the event stays recorded, and you sign it off by hand. `AMOUNT_REQUIRES_FISCAL_DATA` can't be retried either, but it does offer **Generate draft**. **Where to find it.** The panel lives in **Dashboard → Stripe → Needs attention** (*Necesita atención*). Each row links to the originating event in the event log and to the related [customer mapping](/stripe/customer-mappings) (when there is one) so you can fix it and retry without leaving the page. ## When BeeL. skips an event The reasons fall in three buckets — permanent (no invoice will ever come from this event), configuration (fix a setting and retry), and data (fix the source and retry). ### Permanent — no action needed | Scenario | Notes | |---|---| | Event type not supported | BeeL. only listens to a curated set — see [Supported events](/stripe/supported-events) | | The other event of a pair | Some Stripe events arrive in pairs (e.g. `charge.succeeded` + `payment_intent.succeeded`); BeeL. invoices only one of them, so the charge is not invoiced twice | | Duplicate payment already invoiced | Working as intended — the charge already has its invoice | | Dispute won | `charge.dispute.closed` in your favour — the charge and its invoice stand, and the review item opened by the dispute closes on its own | | Dispute on a charge BeeL. did not invoice | A dispute opened or lost on a charge with no invoice from BeeL. (for example, one paid before you switched auto-invoicing on) has nothing to correct, so it is not an incident | | Credit note voided before it produced a corrective | Nothing was declared, so there is nothing to undo | ### Configuration — fix a setting and retry | Scenario | What to do | |---|---| | Stripe connection was deauthorized | Reconnect the integration from the dashboard | | Auto-invoicing is off on the connection (the default of a Live connection) | Toggle on; retry the events you want to backfill | | No default series exists for the resolved document type | Set a default series for standard / simplified / rectificative | ### Data — fix the source and retry | Scenario | What to do | |---|---| | Payment amount ≤ 0 € | No invoice for free or negative charges — investigate the Stripe charge | | Currency ≠ EUR | Either bill in EUR or invoice those charges manually | | Amount above the connection's simplified threshold and no NIF, or a NIF without a name or address | BeeL. saves a draft and, on Live connections, emails you: complete the recipient in BeeL. and issue it; collect tax IDs and the billing address in Stripe to avoid it next time | | Refund / credit note with no matching original BeeL. invoice | Wait for the original payment webhook (often out-of-order), or invoice manually | | Refund amount > original payment amount | Inspect Stripe — usually a data anomaly | | Refund on an already-voided invoice | Chain is terminated — no further correctives | | Webhook arrived for the wrong environment (live on test or vice versa) | Verify the webhook endpoint configuration in Stripe | The event's `failure_reason` — in the dashboard event log and in the [events list of the API](#option-2--from-the-api) — names which scenario triggered. Use the dashboard event log to inspect the raw payload. ## Inspecting skipped events Every Stripe event lands in the log visible at **Dashboard > Developers > Stripe events**. Each row shows: - The Stripe `event.id` and `type` - The processing outcome (processed / skipped / failed) - The skip reason (when applicable) - The full raw payload (one click) Most operational debugging starts here. ## Reading the outcome of an event [#event-outcome] Each event returned by [the events list](/payment-events/listCompanyPaymentEvents) and [the event detail](/payment-events/getCompanyPaymentEvent) carries an `outcome`: what the event means for its payment. Branch on it instead of deriving it from `status` and `failure_reason`. | `outcome` | Meaning | |---|---| | `INVOICED` | An invoice was generated from the event (`invoice_id` is set) | | `IN_PROGRESS` | The payment can still change: the event is being processed or retried, or the payer has yet to pay | | `NOT_INVOICED` | Closed without an invoice and with nothing for you to do, for example a zero-amount payment | | `RESOLVED` | Marked as resolved outside BeeL. | | `INCIDENT` | Needs your action; `needs_action` is `true` | | `NO_CHANGE` | The event does not change the tax position of the payment: a failed payment attempt, a refund that did not complete, an event type BeeL. does not handle, or a dispute settled in your favour | `INCIDENT` takes precedence over the rest, then `INVOICED`. ## Retrying a Stripe event When you need to reprocess an event (e.g. you fixed a configuration bug and want to backfill the invoices), you have two options. ### Option 1 — From the dashboard Open the event row, click **Reprocess**. BeeL. processes the event as if it had just arrived, producing an invoice (or a skip reason, as the first time). ### Option 2 — From the API The public API exposes the payment events of a connection, and both recovery levers, under the company that owns the connection: | Endpoint | What it does | |---|---| | `GET /v1/companies/{company_id}/payment-connections/{connection_id}/events` | Lists the events of the connection, most recent first — audit which charges produced an invoice and which didn't | | `POST .../events/{event_id}/retry` | Reprocesses an event whose automatic invoicing didn't complete, applying the NIF's **current** configuration. Only retryable states qualify, and the retry budget is finite: otherwise `400` [`EVENT_INVALID_STATUS_FOR_RETRY`](/errors/EVENT_INVALID_STATUS_FOR_RETRY) or `400` [`EVENT_MAX_RETRIES_EXCEEDED`](/errors/EVENT_MAX_RETRIES_EXCEEDED) | | `POST .../events/{event_id}/draft` | Builds a **draft** invoice from an event that couldn't be invoiced automatically, with the same recipient resolution and tax treatment the automatic flow would have used, so you can review it before issuing. `400` [`EVENT_INVALID_STATUS_FOR_DRAFT`](/errors/EVENT_INVALID_STATUS_FOR_DRAFT) if the event was already invoiced; `422` if invoicing rules reject the resulting document | Both `POST`s accept an `Idempotency-Key` header. Your key's account must own or manage the NIF, otherwise `403`. **A retry never invoices a charge twice.** Only an event that did not produce its invoice can be retried, and a charge that already has an invoice resolves to that same invoice — see [Data conversion > Idempotency on both sides](/stripe/data-conversion#idempotency-on-both-sides). ## Out-of-order delivery Stripe doesn't guarantee event ordering. The most common ordering issue is a refund arriving before the original payment. BeeL. retries such an event automatically up to 8 times, starting 10 minutes apart and doubling, never more than 6 hours apart — about a day in all; after that it stays failed for manual handling. If you see persistent "refund original not found", check whether the original was issued by a different connection or before BeeL. was connected — in either case the refund needs manual handling. ## Hard limits | Limit | Value | Notes | |---|---|---| | Currency | EUR only | Payments in other currencies are skipped | | Connections per account | 10 | Soft cap; raise via support | | Webhook timeout | 10 seconds per event | Standard Stripe timeout | | Retry budget for transient failures | Follows Stripe's default schedule | Up to 3 days | | Event log retention | 90 days for processed events; indefinite for events that still need attention | Older entries are archived | ## Known limitations | Item | Status | |---|---| | Disputes (`charge.dispute.*`) | Never corrected automatically. An open dispute, and a lost one, on a charge BeeL. invoiced surface as a review item; you decide whether the invoice needs a corrective and issue it yourself — see [Supported events](/stripe/supported-events#events-that-raise-a-review-item) | | Multi-currency invoices | EUR only; payments in other currencies are skipped | | Partial captures | Treated as the captured amount (BeeL. doesn't see the authorisation total) | | Subscription proration credits | Translated to a credit note → corrective, same as any other credit note | | Stripe Tax disabled | BeeL. falls back to your configured default IVA — invoice may not match what the customer expects | ## What about Stripe Connect Express vs Standard? BeeL. connects a Stripe account through Stripe Connect's authorisation flow (OAuth): the account's owner authorises BeeL., and every charge on that account is invoiced under the one NIF it was connected to. A Stripe account can be connected to a single NIF across BeeL. Once an account has payments recorded under a NIF, it cannot be connected to another NIF, even after it is disconnected: the authorisation fails with `OAUTH_ACCOUNT_HAS_HISTORY_IN_OTHER_COMPANY` (`409`) and the way forward is to connect a different Stripe account to the other NIF. Without recorded payments, the account can be moved after disconnecting it from the first NIF. What that means for a platform that runs **its own** Connect integration: - **Your platform account** can be connected like any other Stripe account, but then every charge on it is invoiced under that one NIF — yours. - **Your Express connected accounts** are not something BeeL. reads: BeeL. does not receive their events, and cannot route each one's charges to a different NIF. So a marketplace on Connect Express whose partners each invoice under their own NIF uses the API instead: one [managed account](/multi-nif/managed-accounts#marketplaces-one-managed-account-per-partner) per partner, and an invoice on that partner's `company_id` when your own Stripe webhook confirms the charge. ## When to write to support Open a ticket at [it@beel.es](mailto:it@beel.es) for: - Persistent processing errors on a specific event ID - Genuine total mismatches between Stripe and BeeL. that aren't explained by refunds or inclusivity toggles - VeriFactu rejection codes you can't decipher (we'll cross-check with AEAT) Include the **Stripe event ID** and the **BeeL. invoice number** (if one was created). ## Related - [Supported events](/stripe/supported-events) — the full event catalogue - [Generated invoices](/stripe/generated-invoices) — what each event produces - [Customer mappings](/stripe/customer-mappings) — when fiscal data is missing --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # What invoice gets generated How BeeL. decides between standard and simplified, how it picks a rectification code (R1–R5), and which series is used. Every Stripe event that produces an invoice goes through the same few decisions. The result is one of: a **standard** invoice (`type: STANDARD`), a **simplified** invoice (`type: SIMPLIFIED`), or a **corrective** (`type: CORRECTIVE` with a `rectification_code` R1–R5). If you're new to which AEAT codes map to which API values, [Invoice types](/verifactu/invoice-types) is the canonical translation page. ## Forward invoices: STANDARD vs SIMPLIFIED When BeeL. receives a payment success event (`payment_intent.succeeded`, `invoice.paid`, etc.), it creates one invoice. The type depends first on the customer's data and then on the connection's [simplified threshold](/stripe/connection-settings#simplified-threshold-deprecated) (default 400 €). A buyer with a NIF (or foreign identifier), a name and a complete address always gets a standard invoice, at any amount. ```text Stripe payment received │ ▼ Does the customer have an identifier (NIF or foreign id)? │ │ Yes No │ │ ▼ ▼ Name and address? Amount ≤ connection's │ │ simplified threshold? Yes No │ │ │ │ Yes No ▼ ▼ │ │ STANDARD Draft saved — ▼ ▼ (any amount) issuer notified SIMPLIFIED Draft saved — (without issuer notified the NIF) ``` ### Standard whenever the buyer is identified A simplified invoice never identifies its recipient: it keeps the customer's name, email and address, not the NIF or `alternative_id`, and it is not linked to the customer. A buyer who supplies a NIF is therefore never invoiced as `SIMPLIFIED`: with a name and address the invoice is `STANDARD`, whatever the amount, and without them it is saved as a draft (below). Without an identifier, a charge up to the connection's threshold gives a `SIMPLIFIED` invoice and a larger one is saved as a draft. **The threshold is the connection's.** It defaults to 400 €, the general limit for a simplified invoice, and goes up to 3,000 €. Raising it is your statement that your activity is one of those listed in article 4.2 of RD 1619/2012: [SIM-002 · Above 400 €, a simplified invoice needs an art. 4.2 activity](/rules/simplified#sim-002). See [Connection settings](/stripe/connection-settings#simplified-threshold-deprecated). ### What "fiscal data" means BeeL. checks the resolved customer (after [customer mapping](/stripe/customer-mappings)) for: - `nif` (Spanish) **or** `alternative_id` (foreign), AND - A complete address ### Buyers outside Spain For a buyer outside Spain, BeeL. takes the identifier from the Stripe tax ID when there is one, and otherwise derives one from the payment. What completes the recipient is therefore the **address**: street, city, postal code and country. A checkout that only collects country and postal code gives an incomplete address. That matters when the sale cannot be documented on a simplified invoice: intra-EU supplies of goods (`EXENTA_ART_25`) and operations not subject by place of supply (`NO_SUJETA_LOCALIZACION`) — see [Simplified vs standard](/verifactu/simplified-vs-standard#on-the-f2-path) and [Data conversion](/stripe/data-conversion#verifactu-classification) for which buyers get them. With an incomplete address the charge waits in **Needs attention** as `SIMPLIFIED_INVOICE_NOT_ALLOWED`. [Generate a draft](/payment-events/generateCompanyPaymentEventDraft) to get a standard invoice with the recipient left for you to complete, then issue it. Retrying does not help: it reads the same Stripe payment again. To invoice these charges on their own, set the billing address collection of your Checkout to required. A buyer whose tax ID Stripe collected but who has no name or no address is identified, so the charge is saved as a standard draft instead, at any amount — see [Charges that cannot be invoiced automatically](#charges-that-cannot-be-invoiced-automatically). A sale to a buyer outside Spain that a simplified invoice can document, such as an EU consumer under the OSS regime, is still issued as simplified. ### Charges that cannot be invoiced automatically A charge that cannot be invoiced on its own is not dropped and does not wait as a skipped event: BeeL. saves it as a **draft** and emails the issuer (Live connections only), and the draft appears in **Needs attention** (*Necesita atención* in the dashboard). The draft is `STANDARD` with the recipient left for you to complete. Three cases do this: - **A NIF without a name or an address.** The buyer is identified, so the invoice must be standard; it is saved with the NIF and the recipient's name or address left for you to complete, at any amount. Issuing it before that is rejected and does not consume a number. - **Above the connection's simplified threshold without an identifier.** A simplified invoice is not allowed above that amount, so the charge is saved as a draft. Fill in the NIF (or foreign identifier), name and address, then issue it. - **NIF rejected by the AEAT.** When the AEAT definitively rejects the buyer's NIF, the invoice is not issued and is never downgraded to a simplified one. Correct the NIF or the name, then issue the draft. Retrying the event does not help, because a retry reads the recipient from the same Stripe payment again. To avoid the case for future charges, collect tax IDs and the billing address in Stripe. ## Forward invoices: numbering BeeL. resolves the invoice **series** at issuance time: 1. Look up your **default series** for the resolved document type (standard or simplified) 2. Allocate the next number on that series If you delete the default for standard or simplified invoices, the next Stripe webhook that needs it waits as `MISSING_DEFAULT_SERIES` until you set a new default and retry it. A charge from an identified buyer is never moved to your simplified series to get around a missing standard series, because the simplified invoice would drop the NIF. **You need at least two default series in each environment**: one for `STANDARD` invoices and one for `SIMPLIFIED`. Plus one for `CORRECTIVE` if you process refunds. ## Corrective invoices: refunds and credit notes Refunds and credit notes produce a corrective in BeeL. | Stripe event | BeeL `rectification_type` | `rectification_code` source | |---|---|---| | `refund.created` / `refund.updated` (once the refund has succeeded) | `TOTAL` if this refund matches the full payment, `PARTIAL` otherwise | Derived from `refund.reason` | | `credit_note.created` | `TOTAL` if this note credits the full payment, `PARTIAL` otherwise | Derived from `credit_note.reason` | `rectification_code` is an enum on the API request (`R1`/`R2`/`R3`/`R4`/`R5`) — the same names AEAT uses. See [Corrective invoices](/verifactu/corrective-invoices) for the canonical R1–R5 reference. ### Mapping Stripe's reason to R1–R5 The mapping is **fixed** — not configurable per connection. It depends on **two inputs**: the original invoice's `type` and the Stripe reason value. **Rule 1 — Original was `SIMPLIFIED`:** | Condition | BeeL `rectification_code` | |---|---| | Any refund or credit note on a `SIMPLIFIED` | **`R5`** (always) | `R5` is the only valid corrective code for a simplified original, per VeriFactu spec (Art. 80.1–80.2 LIVA). The Stripe reason value is ignored on simplified originals. **Rule 2 — Original was `STANDARD` (or a previous corrective):** | Stripe `reason` value | BeeL `rectification_code` | |---|---| | `duplicate` | **`R4`** (resto de causas — duplicate charge is a non-error correction) | | `fraudulent` | **`R4`** (resto de causas) | | `requested_by_customer` | **`R1`** (most common — customer asked for the refund) | | `order_change` | `R1` | | `product_unsatisfactory` | `R1` | | `expired_uncaptured_charge` | `R1` | | Anything else, blank, or `null` | `R1` (default fallback) | `R2` and `R3` are not auto-emitted from Stripe events — they need explicit fiscal context (insolvency, bad debt) that Stripe doesn't model. Issue those manually via the [corrective invoice endpoint](/invoices/createCompanyCorrectiveInvoice) when applicable. ### Multiple refunds on the same payment A single Stripe charge can receive **multiple partial refunds** over time. Each refund produces its own corrective in BeeL: ```text Original payment: 121 € → Invoice INV-2026/00042 (type: STANDARD, ACCEPTED) Refund #1 (re_abc): -40 € → RECTIF-2026/00012 (type: CORRECTIVE, rectification_code: R1, PARTIAL) Refund #2 (re_def): -30 € → RECTIF-2026/00013 (type: CORRECTIVE, rectification_code: R1, PARTIAL) Refund #3 (re_ghi): -51 € → RECTIF-2026/00014 (type: CORRECTIVE, rectification_code: R1, PARTIAL — sums to full refund) ``` Each refund is deduplicated by its own Stripe refund ID (`re_…`), not by the payment intent. So multiple refunds on the same payment cannot collide. If a **single refund equals the full payment amount**, BeeL. emits a `TOTAL` corrective (the original moves to `VOIDED`). If a sequence of partial refunds eventually sums to the full amount, each one is still `PARTIAL` — BeeL. doesn't retro-promote the chain to `TOTAL`. ### The corrective is for exactly what was refunded A corrective's total is always the exact amount Stripe returned, to the cent. BeeL. scales the original's tax-inclusive amounts down to the refund, so base plus tax adds up to the refunded amount: refunding 21.00 € of a 121.00 € invoice declares −21.00 €, never −21.01 €. When the split leaves a cent over, it goes to the tax of the line with the most tax, never to an exempt line. ### Credit notes (Stripe Billing) `credit_note.created` is Stripe Billing's native primitive for crediting a customer (subscription downgrades, prorations, manual credits). Some specifics: - The mapping table above applies the same way — `credit_note.reason` runs through the same R1–R4 / R5 rules - With a coupon on the Stripe Invoice, the corrective credits what the note actually credits — the discounted amount, not the gross line - A credit note against a Stripe Invoice that was never paid produces no corrective, because no BeeL. invoice was ever issued for it - Voiding a credit note in Stripe does not undo the corrective it produced; see [Supported events](/stripe/supported-events#events-that-raise-a-review-item) - Each credit note is deduplicated by its Stripe credit note ID (`cn_…`) ### Finding the original invoice For a refund or credit note, BeeL. needs the original BeeL. invoice to link the corrective to: 1. Identify the Stripe charge the refund or credit note belongs to 2. Look up the BeeL. invoice issued for that charge 3. Build the corrective referencing it If the original isn't found, the event is retried later. Possible causes: - The refund arrived **before** the original payment webhook (out-of-order delivery) — BeeL. retries on a backoff - The original was issued outside BeeL (legacy data, ad-hoc) — manual handling required - The connection that processed the original was deleted — relink and retry the event ### Refunds on a charge whose simplified invoice was exchanged When the simplified invoice of a charge has been [exchanged for a standard one](/verifactu/simplified-vs-standard#upgrading-an-f2-to-f1-the-canje-case), a refund or credit note on that charge corrects the standard invoice of the exchange with `R1`, not the voided simplified invoice. If that standard invoice replaces several charges, the refund of one of them is `PARTIAL`. The four-year window counts from the simplified invoice of that charge. See [SIM-007 · Exchanging a simplified invoice for a full one](/rules/simplified#sim-007). BeeL. does not issue the corrective, and the event waits in **Needs attention** as `RECTIFICATIVA_EXCHANGE_MANUAL_CORRECTION`, when the exchange invoice was registered with VERI\*FACTU, or when it replaces several charges and carries more than one tax group. Correct it by hand or contact support. ### Multi-currency note Stripe refunds and credit notes can in principle be denominated in any currency. BeeL. only processes EUR — non-EUR refunds are skipped the same way non-EUR payments are. ## What can't be generated | Scenario | Outcome | Why | |---|---|---| | Partial refund on a `SIMPLIFIED` original | Corrective with `rectification_code: R5`, `rectification_type: PARTIAL` | Allowed; `SIMPLIFIED`'s only valid code is `R5` | | Refund larger than the original | Skipped | Likely data error in Stripe; investigate | | Refund on an already-voided invoice | Skipped | `TOTAL` correctives are terminal | | Currency ≠ EUR | Skipped | BeeL. only emits EUR-denominated invoices | | Amount = 0 € | Skipped | No invoice generated for free transactions | The full skip list is in [Edge cases and limits](/stripe/edge-cases-and-limits). ## Finding generated invoices Invoices BeeL. generates from Stripe carry **system metadata** you can filter the invoice list by — most usefully `external_customer_id` (the Stripe `cus_…`) and `external_payment_id` (the PaymentIntent id `pi_…`; `ch_…` for a charge without a PaymentIntent; `pr_…` for a Stripe invoice paid outside Stripe). To pull a customer's invoice history in one call: ```bash curl -g "https://app.beel.es/api/v1/companies/{company_id}/invoices?metadata[external_customer_id]=cus_ULGk8bzIr88aag" \ -H "Authorization: Bearer $BEEL_API_KEY" ``` The `-g` flag tells `curl` not to treat `[ ]` as glob characters; SDKs encode them automatically. `external_customer_id` is present whenever the payment carried a customer — flows with no customer (Terminal, payment links without customer collection; see [When the recipient ends up incomplete](/stripe/customer-mappings#when-the-recipient-ends-up-incomplete)) won't have it. The complete list of system keys, query rules and limits lives in [Filtering by metadata](/guides/filtering-by-metadata). ## Related - [Invoice types](/verifactu/invoice-types) — the canonical `type` ↔ AEAT (F1/F2/R*) mapping - [Supported events](/stripe/supported-events) — which events produce an invoice - [Data conversion](/stripe/data-conversion) — how line items, taxes and totals get mapped - [Customer mappings](/stripe/customer-mappings) — how the recipient is resolved - [Corrective invoices](/verifactu/corrective-invoices) — R1–R5 fundamentals - [Filtering by metadata](/guides/filtering-by-metadata) — find generated invoices by Stripe customer or payment id --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Overview Connect your Stripe account with BeeL. to issue an invoice automatically for every payment. ## At a glance | | | |---|---| | **What it does** | Issues an invoice in BeeL. every time you receive a payment in Stripe | | **How it connects** | Via [Stripe Connect](https://stripe.com/connect) (OAuth) | | **What you need** | A Stripe account and an active BeeL. subscription | | **What you should know** | Stripe's own invoices are not issued through BeeL.: turn them into proformas so your customers receive one invoice | --- ## How does it work? BeeL. connects to your Stripe account using **Stripe Connect**. This means you authorize BeeL. to receive notifications about your payments, without sharing your API keys or sensitive data. ### The flow is simple 1. **Your customer pays** in Stripe (subscription, one-time payment, anything) 2. **Stripe notifies BeeL** automatically via a webhook 3. **BeeL. issues the invoice**, mirroring the Stripe charge exactly — see [Data conversion](/stripe/data-conversion) 4. **BeeL. submits its billing record to AEAT** (VeriFactu) if it is enabled for the NIF 5. **Your customer receives the invoice** by email (if enabled) You don't have to do anything per payment. Just connect and configure once. **Refunds and credit notes** generate corrective invoices automatically. BeeL. maps Stripe's reason to one of R1–R5 — see [Generated invoices](/stripe/generated-invoices). --- ## What does this mean for my customers? This is important and we want to be transparent: **Stripe invoices and BeeL. invoices are different things.** Stripe generates its own payment documents; they are not issued through BeeL., so they carry no number from your BeeL. series, no billing record and no VeriFactu QR. To avoid confusion, we recommend **configuring Stripe invoices as proforma** and disabling their invoicing emails. That way your customers only receive the invoice issued through BeeL. The downside is that **your customers won't be able to see invoices in the Stripe portal**. This is a current limitation — the invoices issued through BeeL. are in BeeL., not in Stripe. We're working to improve this experience. --- ## Initial setup 1. Go to [**Settings > Integrations**](https://app.beel.es/ajustes/integraciones) in BeeL 2. Click **Connect** on the Stripe card 3. Authorize the connection with your Stripe account (Stripe Connect opens) 4. [Open the Stripe configuration](https://app.beel.es/ajustes/integraciones?provider=stripe&settings=true) and choose your invoice series, whether to send emails, etc. 5. **In Live mode, switch on auto-invoicing** for the connection. A Live connection starts with it off, so charges are not invoiced until you do — see [Connection settings](/stripe/connection-settings#auto-invoicing). In Test mode it starts on. Once auto-invoicing is on, every payment generates an invoice automatically. A payment whose data is not enough to invoice it waits in **Needs attention** with the reason — see [Edge cases and limits](/stripe/edge-cases-and-limits). **Managing several NIFs (agencies & fleets)?** Connect Stripe **per NIF over the API** — white-label, from your own portal — instead of the dashboard flow above. Each company (owned or [managed](/multi-nif/managed-accounts)) gets its own connection so charges are auto-invoiced under the right NIF. See [**Connect Stripe**](/multi-nif/payment-connections) for the connect · list · disconnect endpoints. --- ## Setup guides How to disable Stripe invoices so your customers receive one invoice per payment. Fiscal Mirror rule — BeeL. reflects Stripe's tax breakdown exactly, with a clean fallback when Stripe Tax isn't enabled. Every per-connection setting — auto-invoicing, customer creation, email delivery. ## How it works Which events BeeL. listens to, which create invoices, and which are explicitly ignored. The F1 vs F2 decision tree, the refund → R1–R5 mapping, and series resolution. Field-by-field mapping from Stripe payload to BeeL. invoice, with the Fiscal Mirror rule explained. How BeeL. matches Stripe customers to BeeL. customers and creates ad-hoc records when needed. Why AEAT submission is decided by the issuing NIF, not by the connection. ## Operations Every skip reason, how to retry a failed event, and the known limits of the integration. --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Supported Stripe events Every Stripe event BeeL. listens to, what BeeL. does with each, and which ones are explicitly ignored. BeeL. subscribes to a curated subset of Stripe events. Some create invoices, some only update connection metadata, and many are explicitly ignored to keep the event log clean. This page is the canonical list — if an event isn't here, BeeL. drops it with a typed reason. ## At a glance | | | |---|---| | **Events that create invoices** | `payment_intent.succeeded`, `checkout.session.completed`, `invoice.paid` | | **Events that create correctives** | `refund.created` / `refund.updated` (once the refund has succeeded), `credit_note.created` | | **Events that raise a review item** | `charge.dispute.created`, `charge.dispute.closed` (lost), `credit_note.voided` (after its corrective was issued); disputes on charges BeeL. did not invoice are excluded | | **Events that update the connection** | `account.application.deauthorized`, `account.updated` | | **Events explicitly ignored** | `charge.succeeded`, `payment_intent.payment_failed`, `credit_note.updated` | | **Deduplication** | Stripe `event.id` per account — same event is processed at most once | Which of these a connection acts on also depends on its **event source** (`PAYMENTS`, `INVOICES` or `BOTH`) — see [Connection settings](/stripe/connection-settings#event-source). ## Events that create invoices | Stripe event | What BeeL. does | Notes | |---|---|---| | `payment_intent.succeeded` | Issues a standard or simplified invoice (forward) | The default success event for one-off payments | | `checkout.session.completed` | Issues a standard or simplified invoice (forward) | Triggered after a Checkout flow completes | | `invoice.paid` | Issues a standard or simplified invoice (forward) | Fired when a Stripe Invoice (Billing) is paid, including one marked as paid outside Stripe (for example, a bank transfer) | All three produce a `forward` invoice in BeeL. When the same charge arrives through more than one of them, it is invoiced once. See [Generated invoices](/stripe/generated-invoices) for the type-decision rules (F1 vs F2). **`invoice.payment_succeeded` is not one of them.** On a connected account, a paid Stripe Invoice is invoiced from `invoice.paid`; `invoice.payment_succeeded` is recorded as an unsupported event type. ## Events that create correctives | Stripe event | What BeeL. does | Notes | |---|---|---| | `refund.created` | Issues a corrective referencing the original invoice, as soon as the refund has succeeded | A card refund is already `succeeded` when it is created, so the corrective is issued immediately | | `refund.updated` | Issues the corrective when the refund moves to `succeeded` | Covers asynchronous payment methods, where the refund starts as `pending` | | `credit_note.created` | Issues a corrective referencing the original invoice | Stripe Billing's native credit note | A refund produces **one** corrective whichever of its events arrives first, and a refund that is also settled by a credit note is not corrected twice. Stripe's `reason` is mapped to an R1–R5 code — see [Generated invoices](/stripe/generated-invoices#mapping-stripes-reason-to-r1r5). BeeL. looks up the original invoice by the Stripe charge the refund or credit note belongs to. If the original isn't found (yet — possible due to event ordering), the event is retried. A credit note issued against a Stripe Invoice that was never paid produces no corrective: there is no BeeL. invoice to correct. ## Events that raise a review item These never issue anything on their own. They link the Stripe object to the charge and its invoice, and put the event in front of you, because the fiscal outcome is your decision. | Stripe event | What BeeL. does | |---|---| | `charge.dispute.created` | Records the dispute against the charge and its invoice, and opens a manual-review item | | `charge.dispute.closed` | Closes the review item opened by `charge.dispute.created`. If you **won** the dispute, the charge and its invoice stand and nothing else is asked of you. If you **lost** it, the money went back to the payer and a single review item remains: decide whether the invoice needs a corrective, and issue it yourself | | `credit_note.voided` | If the credit note had already produced a corrective, opens a review item: that corrective is already numbered and submitted, and voiding the note in Stripe does not undo it. If it had produced nothing, the event is ignored | Each dispute leaves one review item, even when Stripe delivers the closing event before the opening one. A dispute on a charge that BeeL. did not invoice (for example, one paid before you switched auto-invoicing on) is recorded but not raised as a review item: there is no invoice to correct. In the payments list with `charges_only=true`, the opening and the closing of a dispute are one row, the one with its outcome. ## Events that update the connection | Stripe event | What BeeL. does | |---|---| | `account.application.deauthorized` | Marks the connection as disconnected; subsequent events are recorded but not processed | | `account.updated` (with restrictions) | Marks the connection as in error until the restriction is lifted | You don't need to do anything when these fire — the dashboard surfaces the connection state and you can reconnect from there. ## Events explicitly ignored These arrive but BeeL. records them as skipped on purpose: | Stripe event | Why | |---|---| | `charge.succeeded` | Same payment as `payment_intent.succeeded`, which is the one that invoices; processing both would double-issue. | | `payment_intent.payment_failed` | A failed payment has nothing to invoice | | `credit_note.updated` | Changes that matter reach BeeL. as `credit_note.voided` | | `invoice.created`, `invoice.finalized`, `invoice.updated`, `invoice.sent` | The Stripe Invoice is still waiting for payment; it is invoiced when `invoice.paid` arrives | | Events outside the connection's [event source](/stripe/connection-settings#event-source) | Deliberately ignored; they need no attention | | Anything else | Not in BeeL's supported set | See [Edge cases](/stripe/edge-cases-and-limits) for what to do when an event you expected to produce an invoice was skipped. ## Deduplication Stripe sends events at least once. BeeL. deduplicates by Stripe's `event.id`: - The first delivery is recorded and processed. - Subsequent deliveries with the same event ID return `HTTP 200 OK` immediately — no reprocessing. If you need to **reprocess** an event (e.g. a fix shipped after a previous failure), see [Edge cases > Retrying an event](/stripe/edge-cases-and-limits#retrying-a-stripe-event). ## What about the Stripe webhook signature? BeeL. verifies every webhook with HMAC-SHA256 against the connection's signing secret. Unsigned or mis-signed requests are rejected before they're recorded. ## Related - [Generated invoices](/stripe/generated-invoices) — what each event produces - [Data conversion](/stripe/data-conversion) — how the Stripe payload becomes invoice fields - [Edge cases and limits](/stripe/edge-cases-and-limits) — what gets skipped and how to retry it --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # VeriFactu submission for Stripe invoices Stripe-generated invoices follow the same VeriFactu rule as any other — decided by the NIF, not by the connection. Stripe-generated invoices follow the same VeriFactu rule as any other invoice: whether one reaches AEAT is decided by the **issuing NIF's** regime at issue time, not by the connection that produced it. There is no Stripe-specific gate and no per-connection switch. This page covers what is specific to Stripe; the rule itself is in [Auto-submit policy](/verifactu/auto-submit). ## At a glance | | | |---|---| | **What decides submission** | The issuing NIF's VeriFactu configuration — `enabled`, and `nif_status: ACTIVATED` | | **Per-connection control** | None. A connection cannot opt its invoices in or out | | **Submission state on the invoice** | Nested `verifactu` object — `verifactu.enabled` and `verifactu.submission_status` | ## There is no Stripe-specific gate If the NIF that issues is under the regime, every invoice it issues is registered — including the ones a Stripe charge produced. If it is not, none is. Connecting a second Stripe account for a different revenue stream does not change that: both accounts issue under the same NIF and land on the same side of the axis. An invoice from a NIF outside the regime is still **issued locally**, with `verifactu.enabled: false` and no `submission_status`, no hash and no QR. To find them over the API, list invoices with `?verifactu_enabled=false`; no value of `verifactu_status` selects them, because they have no submission to describe. **`skip_reason` is historical.** Stripe invoices issued while the connection carried its own switch can still show a `skip_reason` naming which one was off — `CONNECTION_DISABLED` was that switch. Nothing writes it any more, so on invoices issued today it is always `null`. **A sandbox Stripe account does not make a submission a test.** What decides the environment is the NIF you issue under, not the Stripe account that paid. Issue under a sandbox NIF for test traffic. ## How to read the result on an invoice The VeriFactu state is exposed as a nested `verifactu` object on the Invoice response. For a submitted-and-accepted invoice it looks like this: ```json { "id": "550e8400-e29b-41d4-a716-446655440000", "type": "STANDARD", "status": "ISSUED", "verifactu": { "enabled": true, "submission_status": "ACCEPTED", "invoice_hash": "3A5B7C9D1E2F3A4B5C6D7E8F9A0B1C2D3E4F5A6B7C8D9E0F1A2B3C4D5E6F7A8B", "registration_number": "094365f5-9637-40e9-851a-4e964a939b0b", "qr_url": "https://verifactu.agenciatributaria.gob.es/v?id=ABC123XYZ", "qr_base64": "iVBORw0KGgoAAAANSUhEUgAAAMgAAADI...", "registered_at": "2026-05-18T10:24:36Z" }, "metadata": { "external_payment_id": "pi_3O...XYZ" } } ``` For an invoice issued by a NIF outside the regime the object collapses to `{ "enabled": false }` and the AEAT-specific fields are absent. When AEAT rejects a submission, `verifactu.submission_status` is `REJECTED` and `verifactu.error_code` / `verifactu.error_message` carry the AEAT response. See [Submission states](/verifactu/submission-states) for the full state machine. ## What to do with invoices issued outside VeriFactu The public API does **not** expose an endpoint to manually trigger a submission for an invoice that was issued with `verifactu.enabled = false`. Your options: - **Fix it going forward.** Enable VeriFactu on the issuing NIF and every subsequent invoice it issues — Stripe-generated or not — is registered automatically. Already-issued invoices stay as they were: an issued invoice is a closed fiscal document. - **Bulk backfill.** For a wave of historical invoices, write to [it@beel.es](mailto:it@beel.es) with the invoice IDs or date range. To find affected invoices via the API, list with `verifactu_enabled=false` — see the [list invoices endpoint](/invoices/listCompanyInvoices). ## What happens on rejection AEAT can still reject a Stripe-generated invoice — most commonly because of: - **Recipient NIF not in census** — the customer's tax ID isn't registered. Pre-validate via [NIF validation](/nif-validation/validateNif), or accept the invoice will be issued as F2. - **Chain integrity error** — internal; open a ticket. - **Amount mismatch** — the invoice is built from the charge, so this should not happen; if you see it, the Stripe charge had a quirk worth investigating. Handle the rejection like any other rejection — see [Cancel vs amend](/verifactu/cancel-and-fix). ## Related - [Auto-submit policy](/verifactu/auto-submit) — what decides submission, in full - [Submission states](/verifactu/submission-states) — the lifecycle after submission - [Edge cases and limits](/stripe/edge-cases-and-limits) — what to do when the submission keeps failing --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Auto-submit policy Whether an issued invoice reaches AEAT is decided by the taxpayer, not by the request — what that means when you issue, and how to read the result. Whether an invoice reaches AEAT is a fact of the **taxpayer**, resolved when the invoice is issued. If the NIF is under the VeriFactu regime, every invoice it issues is registered; if it is not, none is. There is nothing to set per invoice, and no request can opt one document in or out. BeeL. works this way because the VERI\*FACTU modality is chosen by the taxpayer, not per document: under article 16.1 of the RD 1007/2023 it covers «todos los registros de facturación generados». A per-invoice switch allowed a mixed ledger — two invoices from the same NIF on the same day, one registered and one not. ## What decides it Two conditions, both read at issue time: ### The NIF's VeriFactu configuration is `enabled` Read it with `GET /v1/companies/{company_id}/verifactu-configuration`. The only writable field is `enabled`, through the matching `PUT` — everything else (`status`, `signed`, `activated`, `nif_status`, `nif_registered_at`, `pdf_generated`) is resolved for you and is read-only. Turning it off stops the submission of every invoice that NIF issues from then on: those invoices generate no billing record. It does not delete the configuration or the registration. Before you turn it off, read [the rules on timing](/verifactu/compliance-and-responsibilities#verifactu-modality-only): a taxpayer that starts submitting in VERI\*FACTU stays in it at least until the end of that calendar year (article 16.5 of the RD 1007/2023). ### The NIF is registered, and `nif_status` says so `nif_status` is `ACTIVATED` once the tax ID is registered and ready to submit. Its other values, and why it can lag behind `enabled` in sandbox, are in [Enabling VeriFactu for a NIF](/verifactu/enabling-verifactu#nif_status). A proforma is never submitted, whatever the NIF's regime: it is not an invoice yet. It gets a fiscal record when you convert it. ## How it reads on the invoice The invoice resource carries a nested `verifactu` object. `enabled` tells you which side of the axis the invoice is on, and it is decided once, at issue time: ```json { "id": "...", "status": "ISSUED", "verifactu": { "enabled": true, "submission_status": "PENDING", "registration_number": "094365f5-9637-40e9-851a-4e964a939b0b", "registered_at": "2026-09-19T09:27:44Z", "invoice_hash": "1863E77D540083E4259F4AF44322E16B962CB5D72C2F949AB2B30FA83E93FF84", "qr_url": "https://www2.agenciatributaria.gob.es/wlpl/TIKE-CONT/ValidarQR?nif=B27534239&numserie=S-2026-0001&fecha=19-09-2026&importe=121.00", "qr_base64": "iVBORw0KGgoAAAANSUhEUgAAAMgAAADI...", "skip_reason": null } } ``` The hash, the QR and the BeeL. `registration_number` are already there while AEAT has not answered — they belong to the record as submitted, not to AEAT's verdict. See [QR code and the invoice PDF](/verifactu/qr-and-pdf). An invoice from a NIF outside the regime has `enabled: false` and no `submission_status` at all — it is outside the axis, not failing on it: ```json { "id": "...", "status": "ISSUED", "verifactu": { "enabled": false } } ``` To select those over the API, filter with `?verifactu_enabled=false`. No value of `verifactu_status` matches them, because they have no submission to describe. See [Submission states](/verifactu/submission-states) for what `submission_status` does next, including `NOT_SUBMITTED` — an invoice that *should* have reached AEAT and has no live record. **`skip_reason` is historical.** Invoices issued while VeriFactu was a per-invoice decision can carry a `skip_reason` (`CONNECTION_DISABLED`, `CONFIG_MISSING`, `CONFIG_DISABLED`, `NIF_NOT_REGISTERED`) naming which switch was off at the time. Nothing writes it any more: there is no per-invoice omission left to explain, so on invoices issued today it is always `null`. Keep reading it if you display it for old documents; do not build new logic on it. ## Issuing a wave you don't want registered There is no way to exclude individual invoices. The NIF's `enabled` flag is all-or-nothing for that taxpayer, and it is not a tool for leaving invoices unregistered: see [the rules on timing](/verifactu/compliance-and-responsibilities#verifactu-modality-only). **A submission is not undoable as a batch.** If a NIF is under the regime, its invoices are registered as they are issued. Use a sandbox NIF for test issuance rather than disabling a live one. ## There's no public "submit now" endpoint The public API does not expose a way to trigger a submission by hand. What to do depends on what you are looking at: The regime is read when you issue, so fix the configuration first and then call `POST /invoices/{id}/issue`. If the NIF is under the regime by then, the invoice is issued with `submission_status: PENDING`. It was issued by a NIF outside the regime, and that cannot be changed after the fact — the invoice is a closed fiscal document. Write to [it@beel.es](mailto:it@beel.es) with the invoice IDs or a date range if you believe it should have been registered. This one *was* expected to reach AEAT. Right after issuing it can still be in flight, so re-read the invoice first. If it persists, it will not clear on its own — open a ticket at [it@beel.es](mailto:it@beel.es) with the invoice IDs. > **Rules that apply here:** [REC-002 · The record goes to AEAT as soon as the invoice is issued](/rules/records#rec-002) ## Related - [Enabling VeriFactu for a NIF](/verifactu/enabling-verifactu) — getting a NIF under the regime, step by step - [Submission states](/verifactu/submission-states) — what happens after the submission - [Stripe / VeriFactu submission](/stripe/verifactu-submission) — the same rule applied to Stripe-generated invoices - [Get a NIF's VeriFactu configuration](/verifactu/getCompanyVeriFactuConfiguration) — read a NIF's configuration - [Update a NIF's VeriFactu configuration](/verifactu/updateCompanyVeriFactuConfiguration) — flip `enabled`, the only writable field --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Cancel vs amend Decide between cancelling an invoice (void) and issuing a corrective invoice, two operations with different fiscal weight. The AEAT VeriFactu spec exposes three distinct fix operations: **void** (*anulación*), ***subsanación*** (replacing a record with a corrected one) and **corrective invoice** (*factura rectificativa*). They look similar but mean very different things. Pick the wrong one and you either misreport or burn an invoice number. ## The 30-second decision Void only what should never have been issued; correct everything else. Every situation, one row each, is in the table [Void or correct](/rules/void#void-or-correct). | Operation | Use when | Fiscal weight | |---|---|---| | **Void** | [VOI-001 · Void only an invoice that should never have been issued](/rules/void#voi-001) | A cancellation record is sent to AEAT, linked to the original | | **Corrective invoice** | [COR-001 · Wrong data on an issued invoice is fixed with a corrective](/rules/corrective#cor-001) | A new invoice, with its own record, corrects the original | | ***Subsanación*** | [REC-010 · Subsanación is only for errors that need no corrective](/rules/records#rec-010) | The record is replaced by a corrected one; no new invoice | ## Void (*anulación*) [#anulación-void] To void an invoice, call [`POST …/invoices/{invoice_id}/void`](/invoices/voidCompanyInvoice) with a `reason`: the invoice becomes `VOIDED` at once. A void is only for an invoice issued by mistake — the operation never took place, it was a test, or it is an accidental duplicate. Once the invoice has been sent or paid, confirm it with `issued_in_error: true`. The request rules and which invoices can be voided are in [Invoice lifecycle](/guides/invoice-lifecycle#voiding-and-correcting); this section covers what reaches AEAT. What happens: 1. The invoice's commercial status moves to `VOIDED`. 2. BeeL. submits a **cancellation record** (*registro de anulación*) to AEAT, separate from the original registration record (*registro de alta*). 3. AEAT processes the cancellation and BeeL. updates the invoice's `verifactu.submission_status` to reflect the cancellation response. The cancellation is also a record of its own — see [Did AEAT accept the cancellation?](#did-aeat-accept-the-cancellation) below. What you give up: - The number stays used: a voided invoice keeps it, and the next invoice takes a new one (see [Series and numbering](/guides/series-and-numbering#the-number-is-assigned-when-you-issue)). - The original registration record stays in AEAT's records, with the cancellation linked to it. ### Did AEAT accept the cancellation? The invoice's `verifactu` block summarises the **registration**: once you void, its `submission_status` moves with the cancellation, but `invoice_hash`, `registration_number` and `registered_at` keep describing the registration record. To see each record with its own status, list the invoice's VeriFactu records with [List the VeriFactu records of an invoice](/invoices/listCompanyInvoiceVerifactuRecords): ```bash curl "https://app.beel.es/api/v1/companies/{company_id}/invoices/{invoice_id}/verifactu-records" \ -H "Authorization: Bearer $BEEL_API_KEY" ``` ```json { "success": true, "data": { "records": [ { "id": "2b1605c5-cdc4-45c1-b007-5261342947ec", "operation": "REGISTRATION", "submission_status": "ACCEPTED", "invoice_hash": "1863E77D540083E4259F4AF44322E16B962CB5D72C2F949AB2B30FA83E93FF84", "registration_number": "094365f5-9637-40e9-851a-4e964a939b0b", "registered_at": "2026-09-19T09:27:44.490799Z", "qr_url": "https://prewww2.aeat.es/wlpl/TIKE-CONT/ValidarQR?nif=B27534239&numserie=S-2026-0001&fecha=19-09-2026&importe=121.00" }, { "id": "582ed3b9-51e1-48a0-b725-137ae5b2efb1", "operation": "VOID", "submission_status": "PENDING", "registration_number": "e2e5f3db-999a-4c9f-afd5-7a7a059ca384", "registered_at": "2026-09-19T09:28:15.523675Z" } ] }, "meta": { "timestamp": "2026-09-19T09:28:16Z", "request_id": "ac4654e8df3bb20e339c4086fadc6725" } } ``` Records come ordered by `registered_at`, the registration first. The `VOID` record answers the question: `PENDING` while AEAT has not replied, `VOIDED` once it accepts the cancellation, `REJECTED` if it refuses it, with `error_message` giving the reason and `error_code` carrying AEAT's code when AEAT gave one. `invoice_hash` and `qr_url` only travel on `REGISTRATION` records. `registration_number` is BeeL.'s identifier (a UUID) for the record, not an AEAT code, and `registered_at` is when the record was created. Each record's `id` is the `verifactu_registration_id` you receive in `verifactu.status.updated`, so a webhook can be matched to the exact record it reports on. You don't have to poll for it. `verifactu.status.updated` is sent for the cancellation record too, and its `operation` says which record changed: `REGISTRATION` for the invoice's registration, `VOID` for its cancellation. A `VOID` event with `new_status: VOIDED` is AEAT accepting the cancellation; with `REJECTED`, `error_code` and `error_message` say why. ```json { "type": "verifactu.status.updated", "data": { "invoice_id": "550e8400-e29b-41d4-a716-446655440000", "invoice_number": "2026-0042", "verifactu_registration_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7", "operation": "VOID", "previous_status": "PENDING", "new_status": "VOIDED" } } ``` **Voiding while the registration is still `PENDING`.** You can void an invoice before AEAT has answered the registration record. The cancellation is sent once the registration is accepted, so until then the list shows only the `REGISTRATION` record; the `VOID` record appears when the cancellation goes out, and reaches `VOIDED` when AEAT accepts it. In sandbox this takes a few minutes. If AEAT ends up rejecting the registration instead, no cancellation is sent at all. **Voiding an invoice that never reached AEAT sends nothing.** If the registration was refused before reaching AEAT, abandoned, or rejected by AEAT, there is no record there to cancel: the invoice becomes `VOIDED` in BeeL., no `VOID` record appears, and `verifactu.submission_status` keeps the registration's outcome. See [Handling AEAT rejections](/verifactu/handling-rejections#fixing-the-invoice). > **Rules that apply here:** [VOI-001 · Void only an invoice that should never have been issued](/rules/void#voi-001) · [VOI-004 · An emailed or paid invoice is voided only confirming it was issued by mistake](/rules/void#voi-004) · [VOI-003 · A void adds a cancellation record; the original stays](/rules/void#voi-003) ## Corrective invoice (*rectificativa*) [#rectificativa-corrective] A new invoice is issued, referencing the original, with its own AEAT `tipo_factura` (`R1`–`R5`) and its own registration record (no cancellation record). The original is **never erased** from AEAT. Request shapes, codes and every scenario are in [Corrective invoices](/verifactu/corrective-invoices). Use a corrective invoice for: - Wrong amount / IVA rate - Wrong customer NIF, name or address, when the invoice went to the right customer (`R4`, no lines — see [Correcting the recipient's data](/verifactu/corrective-invoices#scenario-4--correcting-the-recipients-data-r4)) - Post-issuance discount or quantity adjustment - Bad debt write-off - Insolvency proceedings (*concurso de acreedores*) adjustment A customer who asks for a full invoice instead of a ticket is not a correction: that is the [exchange of simplified invoices](/verifactu/simplified-vs-standard#upgrading-an-f2-to-f1-the-canje-case). And a withholding that should not have been applied is not one either: void the invoice and issue a new one without it. > **Rules that apply here:** [COR-001 · Wrong data on an issued invoice is fixed with a corrective](/rules/corrective#cor-001) ## *Subsanación* [#subsanación] *Subsanación* is the AEAT mechanism that **replaces a registration record with a corrected one** (AEAT's FAQ: «sustitución del "registro de alta" por otro registro subsanado»). It never changes what the invoice says, so it only applies when the error needs no corrective invoice: for example a rejection caused by an issuing NIF that was not yet in the census. *Subsanación* is **never** the way to fix a typo in the description, a wrong amount, a wrong recipient NIF or a wrong series. An error in the invoice's amounts or content is corrected with a **corrective invoice** (`POST /invoices/{id}/corrective`), which produces a new fiscal document; a void is only for an invoice that should never have been issued. A corrective invoice keeps the recipient of the invoice it corrects, and changes only that recipient's data ([COR-017 · A corrective keeps the recipient, except to correct the recipient's data](/rules/corrective#cor-017)): an invoice issued to the wrong party is corrected in full with a `TOTAL` corrective and invoiced again to the right one. When the cause was outside the invoice and you have resolved it, contact BeeL. with the invoice — see [Handling AEAT rejections](/verifactu/handling-rejections#when-to-contact-support). ## Decision matrix The situations and what to do with each are in [Void or correct](/rules/void#void-or-correct), a table built from the rules that decide it. Two cases that depend on what AEAT answered: - **AEAT never registered the invoice** (`REJECTED`): voiding it sends nothing to AEAT — see [Void](#anulación-void). - **Rejected because the issuing NIF was not in the census yet**: nothing in the invoice is wrong, so it is a *subsanación* — contact [it@beel.es](mailto:it@beel.es) once the NIF is registered. > **Rules that apply here:** [VOI-005 · A corrected invoice, or a total corrective, is not voided](/rules/void#voi-005) · [COR-013 · A corrective is only for the causes the law lists](/rules/corrective#cor-013) · [COR-024 · A corrective does not change only the withholding](/rules/corrective#cor-024) · [REC-010 · Subsanación is only for errors that need no corrective](/rules/records#rec-010) ## Related - [Corrective invoices](/verifactu/corrective-invoices) — R1–R5 with full examples - [Submission states](/verifactu/submission-states) — how cancellation fits in the lifecycle - [Auto-submit policy](/verifactu/auto-submit) — applies to cancellation records too - [Void an issued invoice](/invoices/voidCompanyInvoice) - [Create a corrective invoice](/invoices/createCompanyCorrectiveInvoice) - [List the VeriFactu records of an invoice](/invoices/listCompanyInvoiceVerifactuRecords) — registration and cancellation, each with its own status --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Compliance and responsibilities What BeeL. does for each invoice, who signs its declaración responsable, the rules that apply to software built on the API and to the issuing business, the VERI*FACTU modality, and what BeeL. keeps for each record. When an invoice is issued through the BeeL. API, three parties are involved: the business whose NIF is on the invoice, the software that calls the API, and BeeL. This page describes what BeeL. does for each of them and quotes the rules that apply: the RD 1007/2023 (*Reglamento de sistemas informáticos de facturación*), the Orden HAC/1177/2024, the RD 1619/2012 (*Reglamento de facturación*) and the criteria AEAT has published. BeeL.'s own position is stated in the **VeriFactu section of its [Terms](https://beel.es/terminos#verifactu)** and in its **[*declaración responsable*](https://beel.es/declaraciones-responsables)** (the producer's signed statement that the system complies with the rules). Where this page mentions that position it links there; if this page and those texts ever differ, those texts prevail. > **Not legal or tax advice.** This page describes how BeeL. works. It is not legal or tax advice: confirm your own obligations, and those of the businesses you invoice for, with your tax advisor. ## Who is who | Role | Who | What it does in BeeL. | |---|---|---| | **Issuer** (*obligado tributario*, *expedidor*) | The business whose NIF is on the invoice | Issues its invoices through BeeL. and provides the data they contain | | **Integrator** | Your software, calling the API | Sends data to BeeL. and shows the result | | **Billing system** (*SIF*, *sistema informático de facturación*) | **BeeL.**, as stated in its [*declaración responsable*](https://beel.es/declaraciones-responsables) | Numbers the invoice, builds its billing record, computes and chains its hash, produces the QR and submits the record to AEAT | | **Producer** (*productor*) of BeeL. | **Honey Solutions, S.L.** | Signs BeeL.'s *declaración responsable* | ## What BeeL. does for each invoice The RD 1007/2023 defines a SIF as «el conjunto de hardware y software utilizado para expedir facturas» that admits, keeps and processes billing information (article 1.2). For every invoice issued through BeeL. — from the dashboard, through the API or through the Stripe integration — BeeL.: - assigns its number from one of the issuer's series; - generates its billing record (*registro de facturación de alta*, article 9 of the RD 1007/2023), and a cancellation record when it is voided (article 11); - computes the record's hash and chains it to the previous record of the same issuer (article 12 of the RD 1007/2023, article 7 of the Orden HAC/1177/2024); - produces the QR data (`qr_url`, `qr_base64`) and, when BeeL. renders the PDF, prints the QR and its legend on it; - submits the record to AEAT. The API does not register an invoice numbered or hashed somewhere else: see [Who generates the record, the hash and the chain](/guides/erp-integration#who-generates-the-record-the-hash-and-the-chain). > **Rules that apply here:** [REC-001 · Each issued invoice gets a billing record built from its data](/rules/records#rec-001) ## The *declaración responsable* [#declaracion-responsable] Article 13.1 of the RD 1007/2023 reads: «Corresponderá a la persona o entidad productora del sistema informático certificar, mediante una declaración responsable, que el sistema informático cumple con lo dispuesto en el artículo 29.2.j) de la Ley 58/2003 […] así como con lo dispuesto en este Reglamento». For BeeL., that declaration is signed by **Honey Solutions, S.L.** It is published, with every version, at **[beel.es/declaraciones-responsables](https://beel.es/declaraciones-responsables)**, where anyone can download it. The declaration is the producer's own. AEAT's published FAQ on VERI\*FACTU describes it as an «"auto-certificación" del propio productor del producto SIF realizada como Declaración Responsable», and states that no certification by independent bodies and no prior registration of the product is required. BeeL. is therefore **not certified, homologated or approved by AEAT** or by any other body: what exists is its producer's *declaración responsable*. ## Software built on the API [#software-built-on-the-api] Whether software that uses BeeL. is itself part of a billing system depends on what that software does. These are the rules and criteria that apply: - A SIF can be made of several components. Article 15.4 of the Orden HAC/1177/2024: when the system «esté formado por varios componentes […] producidos por diferentes personas o entidades, todas ellas deberán aportar las correspondientes declaraciones responsables de sus componentes». - AEAT's FAQ for developers (version 1.3, section 5) states that every component of such a system needs a *declaración responsable*, and exempts only the components whose functions are irrelevant to the rules: «fundamentalmente, las que no afecten a la generación del RF, a su encadenamiento, a la impresión de facturas, a la generación del QR, al envío a sede electrónica, al enlace indefectible entre componentes, a la conservación inalterada ni al registro de eventos». - AEAT's FAQ also states that when a user extends a SIF with its own means, «el responsable de la ampliación será el usuario del SIF, que como productor de la misma deberá certificarla». Under that criterion, **printing the invoice and generating its QR are among the functions that make a component relevant**. Software that renders its own invoice document, even with the number and QR data BeeL. returns, may be treated as a component of the billing system with its own *declaración responsable*. BeeL.'s declaration covers BeeL.; it does not extend to software that others build on the API. What BeeL. does and does not let your software do: - the number, the billing record, the hash, the chain and the submission are always produced in BeeL., and no request accepts them from outside; - corrections and cancellations are made through BeeL. ([corrective invoices](/verifactu/corrective-invoices), [voids](/verifactu/cancel-and-fix)); - BeeL. renders a PDF with the QR and its legend for every invoice it registers — see [QR code and the invoice PDF](/verifactu/qr-and-pdf); - the QR data is also returned, so software can print it on a document it renders itself — see [Rendering your own PDF](/verifactu/qr-and-pdf#rendering-your-own-pdf). Whether your architecture needs its own *declaración responsable* is a question to settle with your tax advisor before you go live, with the rules above in hand. ## The issuing business [#the-issuing-business] A business that issues its invoices with BeeL. signs **one** document: the [representation](#representation-not-a-certificate) that lets BeeL. submit its billing records to AEAT on its behalf, once per NIF. It does not sign a *declaración responsable*. That declaration is the software producer's, not the user's: BeeL.'s is signed by its producer, Honey Solutions, S.L., and it covers every business that invoices with BeeL. Using a billing system whose producer has signed one is what the rules ask of the user. Signing the representation does not move the issuer's obligations to BeeL. They remain the issuer's, among them: - those of the RD 1619/2012: the duty to issue invoices, their content (articles 6 and 7) and keeping copies of them (article 19); - article 29.2.j of the Ley General Tributaria, which places on «los productores, comercializadores y usuarios» the duty that billing systems «garanticen la integridad, conservación, accesibilidad, legibilidad, trazabilidad e inalterabilidad de los registros». BeeL. builds each record from the data it receives: the issuer's fiscal data, its series, the tax rates and the classification of each operation. BeeL. validates the format and some consistency rules of that data, but it cannot know whether the data is true. How responsibility is allocated between BeeL. and its users is set out in the [Terms](https://beel.es/terminos). > **Rules that apply here:** [CNT-004 · Every invoice shows the issuer's NIF](/rules/contents#cnt-004) ## VERI\*FACTU modality [#verifactu-modality-only] BeeL. submits billing records only in the **VERI\*FACTU** modality (article 16 of the RD 1007/2023), at the time each invoice is issued. It does not offer the "no VERI\*FACTU" modality, in which records are kept by the system and signed instead of being submitted. VeriFactu is enabled per issuing NIF. For each NIF it includes signing the representation that authorises BeeL. to submit on the taxpayer's behalf. **Invoices a NIF issues while VeriFactu is not enabled for it generate no billing record and are not submitted**: they carry `verifactu.enabled: false` — see [Auto-submit policy](/verifactu/auto-submit). The rules on timing: - The RD 1007/2023, as amended by the RD-ley 15/2025, requires Corporate Tax payers to have their billing systems adapted «antes del 1 de enero de 2027», and the other taxpayers of its article 3.1 «antes del 1 de julio de 2027». - Article 16.5 of the RD 1007/2023: the choice of VERI\*FACTU «se prolongará, al menos, hasta la finalización del año natural en el que se haya producido, de forma efectiva, el primer envío de los registros de facturación». Article 17 of the Orden HAC/1177/2024 sets the same until 31 December of that year. Before turning VeriFactu off for a NIF, or issuing from a NIF for which it is not enabled, confirm with the taxpayer's advisor how these rules apply on that date. BeeL. is used by several taxpayers, each with separate billing records, numbering, series and chain. Article 7.a of the RD 1007/2023 allows «un mismo sistema informático […] por parte de diversos obligados tributarios […] siempre que los registros de facturación de cada obligado tributario se encuentren diferenciados». > **Rules that apply here:** [REC-003 · VERI*FACTU is kept until the end of the year](/rules/records#rec-003) ## Representation, not a certificate BeeL. submits each record to AEAT **on the taxpayer's behalf**, under a representation that the NIF's holder signs once. Article 5 of the Orden HAC/1177/2024 allows the submission to be made «por el propio obligado tributario o por un tercero que actúe en su representación». No digital certificate is handed to BeeL. for the submissions, by the taxpayer or by the integrator. The holder signs the representation document BeeL. generates, electronically and with their own certificate, once. Generating it, downloading it, uploading the signed copy and checking its status are all API calls; only the signing is done by the holder. The steps are in [Signing the VeriFactu representation](/multi-nif/companies#signing-the-verifactu-representation) and [Enabling VeriFactu for a NIF](/verifactu/enabling-verifactu). In sandbox there is no representation to sign. > **Rules that apply here:** [REC-006 · No certificate is needed to sign records](/rules/records#rec-006) · [REC-011 · The NIF holder signs the AEAT representation first](/rules/records#rec-011) ## What BeeL. keeps for each invoice For each invoice, BeeL. stores its billing record, its hash and AEAT's answer, and returns them through the API: - the invoice's `verifactu` block — `submission_status`, `invoice_hash`, `qr_url`, `error_code` / `error_message` — see [Submission states](/verifactu/submission-states#reading-the-aeat-response); - every record of the invoice, registration and cancellation, each with its own status — [List the VeriFactu records of an invoice](/invoices/listCompanyInvoiceVerifactuRecords); - what the record sent to AEAT contains — [What AEAT receives](/verifactu/what-aeat-receives). On keeping records, article 3 of the Orden HAC/1177/2024 exempts systems acting as VERI\*FACTU from its articles 8 (conservation of records) and 9 (event log). The duty to keep copies of the invoices themselves, in article 19 of the RD 1619/2012, belongs to the issuer; article 19.3 allows a third party to carry it out materially, with the issuer remaining responsible. BeeL.'s commitments on how long it keeps data are the ones in its [Terms](https://beel.es/terminos) and [privacy policy](https://beel.es/privacidad); this page adds none. > **Rules that apply here:** [CON-001 · Keep copies of issued invoices for the limitation period](/rules/conservation#con-001) · [CON-002 · AEAT keeps the records, not your invoices](/rules/conservation#con-002) ## Related - [Terms, VeriFactu section](https://beel.es/terminos#verifactu) — BeeL.'s binding position - [Declaraciones responsables](https://beel.es/declaraciones-responsables) — every published version - [Integrating BeeL. into your ERP](/guides/erp-integration) — who numbers, who renders, who sends - [Multi-NIF](/multi-nif) — one integration, many issuers - [FAQ](/faq#compliance) — the short answers --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Corrective invoices (R1–R5) Pick the right rectification type and code, and see the canonical request shapes BeeL. accepts for each scenario. A corrective invoice (*factura rectificativa*) corrects a previously issued invoice. BeeL. exposes them through `POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective` — the URL points to the **original** invoice, and the body describes the correction. You decide two things: - **`rectification_type`** — `TOTAL` (rectify everything still invoiced on the original) or `PARTIAL` (apply a delta) - **`rectification_code`** — `R1`–`R5` (the legal motive) Plus a `reason` in free text (10–1,000 characters) describing the situation in human language. All three are required. The corrective comes back with `type: CORRECTIVE` and `rectified_invoice_id` pointing at the original. It goes through VeriFactu exactly like any other invoice: same `verifactu` block, same states, same QR and the same `verifactu.status.updated` webhook. **Only invoices issued in BeeL. can be corrected.** The original is addressed by its BeeL. `invoice_id`, and an invoice issued before your integration — numbered and registered by another system — has none. Correct those with the system that issued them. ## The two axes ```text PARTIAL (one delta registro, easy bookkeeping) ┌────────────────────────────────────────────────┐ why → │ R1 │ R2 │ R3 │ R4 │ R5 (F2 only) │ ├────────────────────────────────────────────────┤ TOTAL (one registro replaces the original) ``` | `rectification_type` | AEAT `tipo_rectificativa` | What BeeL. sends to AEAT | |---|---|---| | `PARTIAL` | `I` (by differences) | One record with delta lines; no `importe_rectificativa` block | | `TOTAL` | `S` (by substitution) | One record with the **new** totals + the **original** totals echoed in `importe_rectificativa` | The original invoice's status changes after issuance: - `PARTIAL` → original becomes `RECTIFIED` (can be corrected again — several partial correctives on the same original are fine) - `TOTAL` → original becomes `VOIDED` (terminal, no further correctives) A `TOTAL` rectifies what is **still invoiced** on the original: its lines and those of its live correctives (voided ones do not count), negated. After two partial correctives, a `TOTAL` takes back only what they left. If they already brought the invoice to zero, it answers `422` [`CORRECTIVE_NOTHING_LEFT_TO_RECTIFY`](/errors/CORRECTIVE_NOTHING_LEFT_TO_RECTIFY). A corrective whose `total_to_pay` is 0 — a recipient-data correction, for example — has nothing to refund or collect, so it is issued as `PAID`, with `payment_date` equal to `issue_date`. **A corrective is issued immediately.** There is no draft step: the request numbers the corrective, freezes it and — if the NIF is under VeriFactu — submits it, in the same call. Check the payload before you send it; a wrong corrective is fixed with another corrective against the original, not by editing it. ### What a `TOTAL` corrective does to the original The original moves to `VOIDED`, but **no cancellation record is sent to AEAT for it**. The correction travels in the corrective's own registration — a `tipo_rectificativa` `S` record that references the original. So, on the original: - its `verifactu.submission_status` keeps its registration's outcome (typically `ACCEPTED`) — it does not become `VOIDED`; - [its VeriFactu records](/invoices/listCompanyInvoiceVerifactuRecords) show no `VOID` record. - its PDF does not change: it stays the document that was delivered. The corrective has its own PDF. That is the difference from the [void endpoint](/verifactu/cancel-and-fix#anulación-void), which does send a cancellation record. Both leave the invoice `VOIDED`; only one tells AEAT the invoice should not exist — and it is only for an invoice issued by mistake. An operation that did take place is corrected, not voided. > **Rules that apply here:** [COR-003 · A corrective shows the difference or the amounts after the correction](/rules/corrective#cor-003) · [COR-004 · The corrective record says whether it substitutes or adds a difference](/rules/corrective#cor-004) ## Pick the reason (R1–R5) | `rectification_code` | When to use | Legal basis | |---|---|---| | **R1** | Almost every common correction: wrong amount, post-issuance discount, returned goods, an operation cancelled by agreement, a wrong tax treatment | Art. 80 Uno/Dos/Seis LIVA + error fundado en derecho | | **R2** | The customer is in formal concurso de acreedores | Art. 80 Tres LIVA | | **R3** | Bad debt: invoice is uncollectable after the legal procedure | Art. 80 Cuatro LIVA | | **R4** | Any other cause, such as the recipient's data recorded wrong | Resto de causas | | **R5** | Correcting a **simplified** (F2) invoice — any reason | Art. 80 Uno/Dos LIVA for F2 | **COR-002 · Pick the reason code: R1–R4 for standard invoices, R5 for simplified** `Required` · Law · Impact: critical · Checked by the API: a request that breaks it is rejected with the error codes listed. Send the `rectification_code` that matches the cause: `R1` for an error founded in law or art. 80 Uno, Dos and Seis LIVA, `R2` for insolvency, `R3` for bad debt, `R4` for the rest. A simplified invoice is always corrected with `R5`, and `R5` corrects nothing else. Full rule: [COR-002](/rules/corrective#cor-002) > **Rules that apply here:** [COR-002 · Pick the reason code: R1–R4 for standard invoices, R5 for simplified](/rules/corrective#cor-002) · [COR-010 · A provisional price is rectified once the final one is known](/rules/corrective#cor-010) · [COR-011 · Discounts and rebates granted after the sale go on a corrective](/rules/corrective#cor-011) ## Deadline and `circumstance_date` A corrective must be issued within four years from when the tax accrued — the original's `operation_date`, or its `issue_date` when it has none — or, for a cause of article 80 of the VAT Act (`R1`, `R2`, `R3`, `R5`), from when the circumstance took place. Send that date as `circumstance_date` (a discount granted later, an order cancelled, the insolvency order, the bad-debt claim); without it, the four years count from the operation date. | Case | Error | Status | Why | |---|---|---|---| | The four years have passed; `error.details` carries `deadline` and `counted_from` | [`CORRECTIVE_OUT_OF_TIME`](/errors/CORRECTIVE_OUT_OF_TIME) | `422` | The four-year period to issue a corrective has ended. It counts from the original's operation date (its `operation_date`, or its `issue_date` when it has none) or, for a cause of article 80 of the VAT Act, from the `circumstance_date` sent. `error.details` carries `deadline` and `counted_from`. | | `circumstance_date` with `R4`, which covers causes other than article 80 | [`CORRECTIVE_CIRCUMSTANCE_DATE_NOT_APPLICABLE`](/errors/CORRECTIVE_CIRCUMSTANCE_DATE_NOT_APPLICABLE) | `422` | `circumstance_date` was sent with a `rectification_code` that is not a cause of article 80 of the VAT Act (`R4`). | | `circumstance_date` before the original's operation date or after today | [`CORRECTIVE_CIRCUMSTANCE_DATE_OUT_OF_RANGE`](/errors/CORRECTIVE_CIRCUMSTANCE_DATE_OUT_OF_RANGE) | `422` | `circumstance_date` is before the original's operation date or after today. | ## Scenario 1 — TOTAL cancellation (R1) The operation was left without effect by agreement with the customer (an order cancelled before delivery, Art. 80 Dos LIVA). Don't send `lines` for a TOTAL: it rectifies everything still invoiced on the original. Sending them is rejected with [`RECTIFICATIVA_TOTAL_CON_LINEAS`](/errors/RECTIFICATIVA_TOTAL_CON_LINEAS). ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices/{invoice_id}/corrective" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "rectification_type": "TOTAL", "rectification_code": "R1", "reason": "Order cancelled by agreement with the customer before delivery: the operation is left without effect (Art. 80 Dos LIVA).", "circumstance_date": "2026-03-10", "notes": "Cancellation agreed with the customer on 10/03/2026. No amount pending collection." }' ``` The original becomes `VOIDED`; the corrective carries the matching tipo_rectificativa `S` to AEAT. ## Scenario 2 — PARTIAL adjustment for bankruptcy (R2) The customer was declared insolvent and has not paid the VAT charged; you reduce the unpaid part. Send the delta as a `PARTIAL`, with the date of the insolvency order as `circumstance_date`. `R2` needs a recipient established in Spain, the Canary Islands, Ceuta or Melilla — or in another EU member state, for insolvency proceedings there — or it answers `422` [`CORRECTIVE_RECIPIENT_NOT_ESTABLISHED`](/errors/CORRECTIVE_RECIPIENT_NOT_ESTABLISHED). ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices/{invoice_id}/corrective" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "rectification_type": "PARTIAL", "rectification_code": "R2", "reason": "Customer declared insolvent by order of 10/02/2026 (Commercial Court No. 2 Madrid, case 123/2026): the unpaid part of the invoice is reduced under Art. 80 Tres LIVA.", "circumstance_date": "2026-02-10", "lines": [ { "description": "Unpaid amount at the insolvency declaration", "quantity": -16, "unit": "hours", "unit_price": 37.5, "discount_percentage": 0, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" } } ], "notes": "Credit communicated to the insolvency administrator." }' ``` Lines carry negative `quantity` (or negative `unit_price`) to express the reduction. The original stays `RECTIFIED`. A `PARTIAL` may raise any amount, but it may not take the taxable base of any rate below zero once the previous correctives are counted: that answers `422` [`CORRECTIVE_EXCEEDS_INVOICED_AMOUNT`](/errors/CORRECTIVE_EXCEEDS_INVOICED_AMOUNT), with `tax_group` (for example `IVA 21%`) and `max_reduction` in `error.details`. And a `PARTIAL` whose lines only change the withholding answers `422` [`CORRECTIVE_WITHHOLDING_ONLY`](/errors/CORRECTIVE_WITHHOLDING_ONLY): a withholding that should not have been applied is not a cause for a corrective — void the invoice and issue a new one without it. > **Rules that apply here:** [COR-009 · An insolvency corrective (R2) needs a declaration of insolvency](/rules/corrective#cor-009) ## Scenario 3 — PARTIAL bad-debt write-off (R3) Documented bad debt under Art. 80 Cuatro LIVA. Send a negative line for the uncollectible part, with the date of the claim as `circumstance_date`. The API checks what it can see: | Case | Error | Status | Why | |---|---|---|---| | Less than six months since the original's operation date; `error.details` carries `earliest_date` (one year applies when the previous year's turnover exceeded the threshold, which is yours to apply) | [`CORRECTIVE_BAD_DEBT_TOO_EARLY`](/errors/CORRECTIVE_BAD_DEBT_TOO_EARLY) | `422` | A bad-debt corrective (`R3`) was requested less than six months after the original's operation date. `error.details` carries `earliest_date` and `counted_from`. One year applies instead when the previous year's turnover exceeded 6,010,121.04 €, which is the issuer's to apply. | | An operation with a small base and no `recipient_is_business: true` declaring the recipient acted as a business or professional | [`CORRECTIVE_BAD_DEBT_BASE_TOO_LOW`](/errors/CORRECTIVE_BAD_DEBT_BASE_TOO_LOW) | `422` | A bad-debt corrective (`R3`) on an operation with a taxable base of 50 € or less, without `recipient_is_business`. The law allows that reduction only when the recipient acted as a business or professional. | | A recipient not established in Spain, the Canary Islands, Ceuta or Melilla | [`CORRECTIVE_RECIPIENT_NOT_ESTABLISHED`](/errors/CORRECTIVE_RECIPIENT_NOT_ESTABLISHED) | `422` | `R2` (insolvency) or `R3` (bad debt) was used with a recipient not established in Spain, the Canary Islands, Ceuta or Melilla. The base is only reduced for those causes with such a recipient; `R2` also accepts a recipient in another EU member state, for insolvency proceedings there. | The other conditions — the claim in court or by notarial demand, filing with the AEAT — are yours to meet. ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices/{invoice_id}/corrective" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "rectification_type": "PARTIAL", "rectification_code": "R3", "reason": "Bad debt under Art. 80 Cuatro LIVA: more than six months since the tax accrued without collection, claimed by notarial demand.", "circumstance_date": "2026-05-04", "lines": [ { "description": "Bad debt adjustment - unpaid amount", "quantity": -40, "unit": "hours", "unit_price": 37.5, "discount_percentage": 0, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" } } ], "notes": "Notarial demand of 04/05/2026 (Protocol 456/2026). Operation of 15/10/2025." }' ``` > **Rules that apply here:** [COR-008 · A bad-debt corrective (R3) needs the legal conditions first](/rules/corrective#cor-008) · [COR-020 · A bad-debt corrective waits six months and needs a business recipient under 50 €](/rules/corrective#cor-020) ## Scenario 4 — Correcting the recipient's data (R4) The invoice recorded its recipient with a wrong name, tax ID or address. Fix the customer first, then send a `PARTIAL` corrective with `rectification_code: R4`, **no `lines`** and the corrected `recipient` — for a registered customer, the same `customer_id`: ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices/{invoice_id}/corrective" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "rectification_type": "PARTIAL", "rectification_code": "R4", "reason": "The customer'\''s tax ID was mistyped on the invoice", "recipient": { "customer_id": "{customer_id}" } }' ``` The corrective carries the corrected recipient and leaves the amounts unchanged: its lines negate what is still invoiced and repeat it, so every rate nets to zero and it is issued as `PAID`. The original becomes `RECTIFIED`. | Case | Error | Status | Why | |---|---|---|---| | Another customer than the one the invoice went to — that is not a data error: correct the invoice in full (`TOTAL`) and issue a new one to the right customer | [`CORRECTIVE_RECIPIENT_IS_ANOTHER_PERSON`](/errors/CORRECTIVE_RECIPIENT_IS_ANOTHER_PERSON) | `422` | A recipient-data corrective (`PARTIAL`, `R4`, no `lines`) names a customer other than the one the invoice went to. It corrects the data of the same recipient; an invoice issued to another person is not a data error. | | The same name, tax ID and address the invoice already recorded | [`CORRECTIVE_RECIPIENT_UNCHANGED`](/errors/CORRECTIVE_RECIPIENT_UNCHANGED) | `422` | A recipient-data corrective carries the same name, tax ID and address the invoice already recorded: there is nothing to correct. | | A `recipient` in any other corrective | [`CORRECTIVE_RECIPIENT_NOT_ACCEPTED`](/errors/CORRECTIVE_RECIPIENT_NOT_ACCEPTED) | `422` | The request to create a corrective invoice carries a `recipient` (a `customer_id` or inline data) outside a recipient-data correction. A corrective goes to the recipient of the invoice it corrects, with that invoice's data; `recipient` is accepted only to correct that recipient's name, tax ID or address, with `rectification_type` `PARTIAL`, `rectification_code` `R4` and no `lines`. Nothing is created. | ## Scenario 5 — R5: correcting a simplified invoice [#scenario-5--r5-cancelling-an-f2-to-issue-a-proper-f1] A simplified (F2) invoice is always rectified with `R5`, whatever the cause. A customer returned one of the two items on the ticket: ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices/{f2_invoice_id}/corrective" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "rectification_type": "PARTIAL", "rectification_code": "R5", "reason": "The customer returned one of the two items on the ticket", "lines": [ { "description": "Return - T-shirt size M", "quantity": -1, "unit_price": 16.53, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" } } ] }' ``` **A customer who asks for a full invoice is not a correction.** To give them an invoice with their details instead of the ticket, use the [exchange of simplified invoices](/verifactu/simplified-vs-standard#upgrading-an-f2-to-f1-the-canje-case), not an `R5` corrective: nothing is being rectified. ## Validation rules BeeL. applies | Rule | What happens if you break it | |---|---| | [COR-002 · Pick the reason code: R1–R4 for standard invoices, R5 for simplified](/rules/corrective#cor-002) | `422` [`RECTIFICATIVA_R5_ONLY_SIMPLIFICADA`](/errors/RECTIFICATIVA_R5_ONLY_SIMPLIFICADA) or [`RECTIFICATIVA_R1R4_NOT_SIMPLIFICADA`](/errors/RECTIFICATIVA_R1R4_NOT_SIMPLIFICADA) | | Original must exist and belong to your account | `404` — the URL `{invoice_id}` resolves to nothing | | [COR-007 · A wrong corrective is fixed against the original, not corrected itself](/rules/corrective#cor-007) | `422` [`CORRECTIVE_NOT_RECTIFIABLE`](/errors/CORRECTIVE_NOT_RECTIFIABLE) | | [COR-017 · A corrective keeps the recipient, except to correct the recipient's data](/rules/corrective#cor-017) — the corrective takes the recipient of the original; send `recipient` only to correct its data ([Scenario 4](#scenario-4--correcting-the-recipients-data-r4)) | `422` [`CORRECTIVE_RECIPIENT_NOT_ACCEPTED`](/errors/CORRECTIVE_RECIPIENT_NOT_ACCEPTED), and nothing is created | | [COR-022 · An invoice whose record AEAT rejected is fixed before it is corrected](/rules/corrective#cor-022) | `422` [`CORRECTIVE_ORIGINAL_RECORD_REJECTED`](/errors/CORRECTIVE_ORIGINAL_RECORD_REJECTED) — fix and resubmit the original first | | [COR-023 · A corrective never rectifies more than was invoiced](/rules/corrective#cor-023) | `422` [`CORRECTIVE_EXCEEDS_INVOICED_AMOUNT`](/errors/CORRECTIVE_EXCEEDS_INVOICED_AMOUNT) or, on a `TOTAL`, [`CORRECTIVE_NOTHING_LEFT_TO_RECTIFY`](/errors/CORRECTIVE_NOTHING_LEFT_TO_RECTIFY) | | [COR-024 · A corrective does not change only the withholding](/rules/corrective#cor-024) | `422` [`CORRECTIVE_WITHHOLDING_ONLY`](/errors/CORRECTIVE_WITHHOLDING_ONLY) | | [SIM-007 · Exchanging a simplified invoice for a full one](/rules/simplified#sim-007) — an invoice issued in [exchange for simplified invoices](/verifactu/simplified-vs-standard#exchange-with-verifactu) and recorded with VeriFactu as `F3` cannot be corrected yet | `422` [`EXCHANGE_INVOICE_NOT_CORRECTABLE`](/errors/EXCHANGE_INVOICE_NOT_CORRECTABLE) — contact support | | The original cannot be a proforma | `422` [`PROFORMA_CORRECTIVE_FORBIDDEN`](/errors/PROFORMA_CORRECTIVE_FORBIDDEN) | | Original must be `ISSUED`, `SENT`, `PAID` or `RECTIFIED` | `422` [`INVOICE_NOT_CORRECTIBLE_IN_CURRENT_STATUS`](/errors/INVOICE_NOT_CORRECTIBLE_IN_CURRENT_STATUS): a `DRAFT` must be issued first, and a `VOIDED` invoice — including one closed by a `TOTAL` corrective — closes the chain | | [COR-021 · An identical corrective a moment after another is taken as a double submission](/rules/corrective#cor-021) | `422` [`CORRECTIVE_RECENT_DUPLICATE`](/errors/CORRECTIVE_RECENT_DUPLICATE) — same original, same `rectification_type`, `rectification_code` and `reason`, and the same totals, moments after the first; the message names the corrective that already exists. It guards against a double submit; wait a few minutes, or change the reason or amounts, if you really mean a second one | | For `PARTIAL`, line totals can be negative or positive — anything goes mathematically | — | | For `PARTIAL`, `lines` are **required** | `422` [`RECTIFICATIVA_PARCIAL_SIN_LINEAS`](/errors/RECTIFICATIVA_PARCIAL_SIN_LINEAS) | | For `TOTAL`, `lines` must be **omitted**: it rectifies the whole original | `422` [`RECTIFICATIVA_TOTAL_CON_LINEAS`](/errors/RECTIFICATIVA_TOTAL_CON_LINEAS) | > **Rules that apply here:** [COR-003 · A corrective shows the difference or the amounts after the correction](/rules/corrective#cor-003) ## Which series numbers the corrective Omit `series_id` and the corrective is numbered in your company's **default series for corrective invoices**, never in the original's series: corrective invoices go in a series of their own. If the company has none, it is created on first use (code `R`, or the next free one). An explicit `series_id` must be a corrective series. See [Series and numbering](/guides/series-and-numbering#correctives-and-proformas). ## Finding the correctives of an invoice List invoices filtered by the original: `GET /v1/companies/{company_id}/invoices?rectified_invoice_id={invoice_id}` returns every corrective issued against it, `TOTAL` or `PARTIAL`. > **Rules that apply here:** [COR-001 · Wrong data on an issued invoice is fixed with a corrective](/rules/corrective#cor-001) · [COR-005 · A corrective identifies the invoice it rectifies](/rules/corrective#cor-005) · [COR-017 · A corrective keeps the recipient, except to correct the recipient's data](/rules/corrective#cor-017) · [COR-019 · Insolvency and bad-debt correctives need a recipient established in Spain](/rules/corrective#cor-019) · [COR-023 · A corrective never rectifies more than was invoiced](/rules/corrective#cor-023) ## Related - [Invoice types](/verifactu/invoice-types) — R1–R5 in the broader catalogue - [Cancel vs amend](/verifactu/cancel-and-fix) — when to use the void endpoint instead - [Submission states](/verifactu/submission-states) — what happens after BeeL. submits the corrective - [Create a corrective invoice](/invoices/createCompanyCorrectiveInvoice) — full request schema --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Enabling VeriFactu for a NIF Put a NIF under the VeriFactu regime in Live — the steps, the configuration fields that tell you where you are, the errors you can hit, and the blockers that stop issuing. VeriFactu applies to a **NIF in an environment**, not to an invoice. Once a NIF is under the regime in Live, every invoice it issues there is registered with AEAT; until then, none is. This page is the path from "NIF created" to "invoices reach AEAT". In **sandbox** there is nothing to enable — VeriFactu is always on there. See [Testing VeriFactu in sandbox](/verifactu/testing-in-sandbox). ## The path in Live ### Switch the NIF on in Live A NIF only operates in Live once it is activated there, which puts it on a paid plan. That is done with the activations endpoint, described in [Switching a NIF on in Test or Live](/multi-nif/companies#switching-a-nif-on-in-test-or-live). Without it, issuing in Live is blocked (`ENV_MISMATCH`, see [below](#what-blocks-issuing)). ### Sign the AEAT representation In Live, submitting to AEAT on the taxpayer's behalf requires a representation form signed by the NIF's holder. Generate it, have the holder sign it, and submit the signed copy — the flow is in [Signing the VeriFactu representation](/multi-nif/companies#signing-the-verifactu-representation). If you provisioned the account, you receive a `representation.signed` webhook when the holder signs, so you don't need to poll. > **Rules that apply here:** [REC-011 · The NIF holder signs the AEAT representation first](/rules/records#rec-011) ### Put the NIF under the regime ```bash curl -X PUT "https://app.beel.es/api/v1/companies/{company_id}/verifactu-configuration" \ -H "Authorization: Bearer beel_sk_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "enabled": true }' ``` `enabled` is the only writable field and has no default. Turning it on **registers the NIF in the same call**: either the call succeeds and the NIF is registered, or it returns the reason and nothing changes. There is no half-enabled state to poll for. ### Check the NIF can issue ```bash curl "https://app.beel.es/api/v1/companies/{company_id}/issuing-readiness" \ -H "Authorization: Bearer beel_sk_live_xxx" ``` `ready: true` with an empty `blockers` list means the next invoice goes out and reaches AEAT. See [Get issuing readiness](/companies/getCompanyIssuingReadiness). ## Reading the configuration `GET /v1/companies/{company_id}/verifactu-configuration` ([reference](/verifactu/getCompanyVeriFactuConfiguration)) returns the NIF's state for the environment of the request. Read `status` first — it is the one field that summarises the others. ### `status` The steps above map to a ladder. Each value names the next thing missing: | `status` | Meaning | Next step | |---|---|---| | `DISABLED` | VeriFactu is not enabled for this NIF | Enable it (step 3) — after steps 1 and 2 | | `UNSIGNED` | Enabled, but there is no signed representation for the NIF. Live only | Sign the representation (step 2) | | `NOT_ACTIVATED` | Signed, but the NIF is not switched on in this environment | Switch it on (step 1) | | `ACTIVE` | Ready: invoices are registered with AEAT | Nothing | | `ERROR` | Historical — no configuration reaches it any more. Kept so older clients still parse stored values | Treat as `DISABLED` | | `null` | VeriFactu was never configured for this NIF | Start at step 1 | `signed`, `activated` and `pdf_generated` are the facts behind `status` — useful for a setup wizard, but decide on `status`. ### `nif_status` Whether the NIF is registered for submission in this environment: `ACTIVATED`, `DEACTIVATED` (not registered, or deregistered), or `null` if VeriFactu was never enabled. In Live, `enabled: true` always comes with `ACTIVATED`, because enabling *is* registering. In sandbox the two can drift for a moment — see [Testing in sandbox](/verifactu/testing-in-sandbox#the-nif-registers-itself). ## When enabling fails | Error | When | What to do | |---|---|---| | `422` [`VERIFACTU_REPRESENTATION_REQUIRED`](/errors/VERIFACTU_REPRESENTATION_REQUIRED) | Enabling in Live without a signed representation for the NIF | Complete step 2, then retry | | `402` [`CHECKOUT_REQUIRED`](/errors/CHECKOUT_REQUIRED), [`PAYMENT_REQUIRED`](/errors/PAYMENT_REQUIRED) or [`PLAN_ACTIVATION_REQUIRED`](/errors/PLAN_ACTIVATION_REQUIRED) | Enabling in Live on an account that is not entitled to production — no card on file, an unpaid invoice whose payment retries are exhausted, or a plan still to activate | Resolve the billing side (step 1), then retry | | `422` [`VERIFACTU_ALWAYS_ON_IN_SANDBOX`](/errors/VERIFACTU_ALWAYS_ON_IN_SANDBOX) | Sending `enabled: false` in sandbox | Nothing to do: sandbox is always on, and nothing there reaches the real AEAT | Sending the state the NIF already has is not an error: `enabled: true` on a NIF that is already on changes nothing and answers with its current status. `PUT … { "enabled": false }` in Live stops the submission of the NIF's invoices, which then generate no billing record. Under article 16.5 of the RD 1007/2023, a taxpayer that starts submitting in VERI\*FACTU stays in it at least until the end of that calendar year. Check with the taxpayer's advisor before turning it off — see [VERI\*FACTU modality](/verifactu/compliance-and-responsibilities#verifactu-modality-only). If the registration itself is refused, the call fails, nothing is persisted, and the response says why. Fix the cause (usually the company's fiscal data) and send the same `PUT` again. ## What blocks issuing `GET /v1/companies/{company_id}/issuing-readiness` answers "can this NIF issue right now, here?". When `ready` is `false`, `blockers` says why. Three of the reasons belong to the VeriFactu chain and are reported one at a time, in this order: | Blocker | Meaning | Fix | |---|---|---| | [`ENV_MISMATCH`](/errors/ENV_MISMATCH) | The NIF is under VeriFactu but not switched on in the environment you are calling — for example a NIF active only in Live, called with a test key | Switch the NIF on in that environment ([step 1](#switch-the-nif-on-in-live)), or call with the key for the environment where it is active | | [`NIF_NOT_REGISTERED`](/errors/NIF_NOT_REGISTERED) | Switched on, but the NIF is not registered for submission in this environment | Enable VeriFactu for the NIF ([step 3](#put-the-nif-under-the-regime)); if it is already enabled, contact support | | [`NIF_REPRESENTATION_REQUIRED`](/errors/NIF_REPRESENTATION_REQUIRED) | Registered, but the signed representation is missing. Live only | Sign the representation ([step 2](#sign-the-aeat-representation)) | The other blockers — `COMPANY_HAS_NO_NIF`, `SERIES_DEFAULT_NOT_FOUND`, `PROFILE_INCOMPLETE`, `COMPANY_NOT_ACTIVATED` — are not VeriFactu-specific: every blocker, with its fix, is in [Is a NIF ready to invoice?](/multi-nif#is-a-nif-ready-to-invoice). The response also has a `verifactu` sub-block (`verifactu.ready`, `verifactu.blockers`) that answers the compliance question on its own: would this NIF pass a VeriFactu emission right now? It is useful **before** enabling, to see what is still missing. > **Rules that apply here:** [REC-003 · VERI*FACTU is kept until the end of the year](/rules/records#rec-003) ## Related - [Auto-submit policy](/verifactu/auto-submit) — why the NIF, not the invoice, decides - [Testing VeriFactu in sandbox](/verifactu/testing-in-sandbox) — the same flow without the representation - [Companies](/multi-nif/companies) — creating NIFs, activations and the representation flow - [Handling AEAT rejections](/verifactu/handling-rejections) — issuer codes such as `4104` point back here --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Equivalence surcharge (recargo de equivalencia) When to add `equivalence_surcharge_rate` on B2B lines, the surcharge values BeeL. accepts and their periods, and how the line is sent to AEAT. Recargo de equivalencia is a special IVA regime for retailers (minoristas) who sell unmodified goods. The supplier (you) adds the surcharge to the standard IVA on every line sold to a retailer who has opted into the regime; the retailer then doesn't file their own IVA returns. ## When you add the surcharge You add it **only if the buyer has declared themselves a retailer under the equivalence surcharge regime**. The buyer must inform you in writing — you don't infer it from anything in their fiscal data. If the buyer hasn't declared the regime, you invoice them with normal IVA and no surcharge. > **Rules that apply here:** [SUR-001 · The surcharge rate matches the VAT rate of its line](/rules/surcharge#sur-001) ## Accepted surcharge values A request's `equivalence_surcharge_rate` is one of `0`, `0.26`, `0.5`, `0.62`, `1`, `1.4`, `1.75` or `5.2`, each paired to a specific IVA rate and, for the temporary rates, to a period: | Value | Pairs with IVA rate | Accepted on operations dated | |---|---|---| | `0` | — | Any: surcharge disabled on that line | | `0.5` | 4 % | Any | | `1.4` | 10 % | Any | | `5.2` | 21 % | Any | | `1.75` | 21 % | Any (tobacco products) | | `0.5` | 5 % | 2022-07-01 to 2022-12-31 | | `0.62` | 5 % | 2023-01-01 to 2024-09-30 | | `0.26` | 2 % | 2024-10-01 to 2024-12-31 | | `1` | 7.5 % | 2024-10-01 to 2024-12-31 | Pairing is strict: a line with `main_tax.percentage: 10` must use `1.4`, never `0.5` or `5.2`. A combination outside the table is rejected with [`INVALID_IVA_SURCHARGE_PAIR`](/errors/INVALID_IVA_SURCHARGE_PAIR), and a pair outside its period with `422` [`SURCHARGE_RATE_NOT_ACCEPTED_ON_DATE`](/errors/SURCHARGE_RATE_NOT_ACCEPTED_ON_DATE). The date judged is the invoice's `operation_date`, or the issue date when there is none. [List tax types](/tax-configuration/listTaxTypes) publishes every pair with its `valid_from` / `valid_until`; the same surcharge can appear twice (`0.5` with 4 % and with 5 %), so key them by surcharge and VAT rate together. When a line omits `equivalence_surcharge_rate` and the company is in the regime, the surcharge is derived from the line's VAT **on the operation date**: with VAT at 5 %, `0.5` up to 2022-12-31 and `0.62` from 2023-01-01. The 5 % surcharge is `0.62`: `0.625` is not accepted in a request. An invoice issued with `0.625` keeps it when you read it. A draft saved with `0.625` that could not be recalculated is rejected at issue with `422` [`SURCHARGE_RATE_REQUIRES_RECALCULATION`](/errors/SURCHARGE_RATE_REQUIRES_RECALCULATION): edit its lines and issue it again. The regime goes with it: a line with a surcharge must carry `main_tax.regime_key: "18"`, and a line under regime `"18"` must carry a surcharge (see [below](#whats-incompatible-with-the-surcharge)). > **Rules that apply here:** [SUR-001 · The surcharge rate matches the VAT rate of its line](/rules/surcharge#sur-001) ## How to set it in the API Add `equivalence_surcharge_rate` to the line and set `main_tax.regime_key: "18"`: ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "Tienda de Electrónica López", "nif": "B12345674", "address": { "street": "Calle Comercio", "number": "56", "postal_code": "08001", "city": "Barcelona", "province": "Barcelona", "country": "España" } }, "lines": [ { "description": "Producto vendido a minorista en RE", "quantity": 1, "unit": "unit", "unit_price": 200, "discount_percentage": 0, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "18" }, "equivalence_surcharge_rate": 5.2 } ] }' ``` BeeL. submits the right `clave_regimen: "18"` and AEAT codes to VeriFactu on your behalf. ## What's incompatible with the surcharge | Setting | Reason | |---|---| | `exemption_reason: ISP_ART_84_2_*` | ISP shifts liability to the buyer; surcharge doesn't apply | | Any `exemption_reason: EXENTA_*` / `NO_SUJETA_*` | Exempt and not-subject lines don't carry IVA → no surcharge | | Any `main_tax.regime_key` other than `"18"` | The surcharge is only compatible with regime 18 ([`SURCHARGE_REQUIRES_REGIME`](/errors/SURCHARGE_REQUIRES_REGIME)); the reverse also holds, regime 18 without a rate is rejected ([`REGIME_REQUIRES_SURCHARGE`](/errors/REGIME_REQUIRES_SURCHARGE)) | | Lines on a simplified (`type: SIMPLIFIED`) invoice | F2 is for B2C; retailers buy under F1 | BeeL. rejects these combinations at issuance with a descriptive error. For the `exemption_reason` values referenced here, see [Tax classification per line](/verifactu/tax-classification). ## The surcharge is per-line, not per-invoice You can mix lines with and without the surcharge in the same invoice. Common case: the retailer buys some goods (surcharge applies) and you also charge them a transport fee that is a separate service (no surcharge, regime general). ```json { "lines": [ { "description": "Mercancía minorista", "quantity": 1, "unit_price": 200, "discount_percentage": 0, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "18" }, "equivalence_surcharge_rate": 5.2 }, { "description": "Transporte", "quantity": 1, "unit_price": 30, "discount_percentage": 0, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" } } ] } ``` > **Rules that apply here:** [SUR-002 · Supplies with the surcharge go on separate invoices](/rules/surcharge#sur-002) ## Related - [Tax classification](/verifactu/tax-classification) — the `exemption_reason` enum (SSoT) - [Regime keys](/verifactu/regime-keys) — `"18"` and friends (SSoT) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Examples cookbook Runnable curl + JSON for every common VeriFactu scenario, mapped to BeeL's public API. Every scenario below maps a real AEAT case to the exact JSON BeeL's public API expects. Field names and enum values come straight from the OpenAPI spec — copy, change the recipient, and ship. For the *why* behind each combination, follow the cross-links into the concept pages. All examples target `https://app.beel.es/api/v1/companies/{company_id}/invoices` and assume your account has VeriFactu enabled. Sandbox keys (`beel_sk_test_*`) submit to AEAT pre-production and don't consume quota. None of them send an issue date: BeeL. sets `issue_date` to the day the invoice is actually issued, when its billing record is generated. To record an operation that happened earlier, send `operation_date` (today or a past date). To issue on a future date, create a draft and use `PUT /v1/companies/{company_id}/invoices/{invoice_id}/schedule`. ## Quick reference | Scenario | `type` | `exemption_reason` | `regime_key` | Surcharge | Recipient | |---|---|---|---|---|---| | [F2 simplified — under the cap, no recipient](#f2-simplified--under-the-cap-no-recipient) | `SIMPLIFIED` | — | `"01"` | — | omitted | | [F1 standard — Spanish B2B](#f1-standard--spanish-business-customer) | `STANDARD` | — | `"01"` | — | NIF + address | | [F1 multiple VAT rates](#f1-with-multiple-vat-rates-per-line) | `STANDARD` | — | `"01"` | — | NIF + address | | [F1 with IRPF](#f1-with-irpf-withholding) | `STANDARD` | — | `"01"` | — | NIF + address | | [F1 equivalence surcharge](#f1-with-recargo-de-equivalencia) | `STANDARD` | — | `"18"` | `5.2` | NIF + address | | [F1 intra-EU B2B goods (E5)](#f1-intra-eu-b2b--goods-e5) | `STANDARD` | `EXENTA_ART_25` | `"01"` | — | `NIF_IVA` | | [F1 intra-EU B2B services (N2)](#f1-intra-eu-b2b--services-n2) | `STANDARD` | `NO_SUJETA_LOCALIZACION` | `"01"` | — | `NIF_IVA` | | [F1 B2C OSS over threshold](#f1-intra-eu-b2c--oss-over-threshold) | `STANDARD` | — (regime key alone → N2) | `"17"` | — | `PASSPORT` | | [F1 B2C under threshold](#f1-intra-eu-b2c--under-oss-threshold) | `STANDARD` | — | `"01"` | — | `PASSPORT` | | [F1 export non-EU (E2)](#f1-export-of-goods-to-non-eu-e2) | `STANDARD` | `EXENTA_ART_21` | `"02"` | — | `PASSPORT` | | [F1 services non-EU (N2)](#f1-services-to-non-eu-n2) | `STANDARD` | `NO_SUJETA_LOCALIZACION` | `"01"` | — | `PASSPORT` | | [F1 exempt E1 (medical/edu)](#f1-exempt-operation-e1--educationalmedical) | `STANDARD` | `EXENTA_ART_20` | `"01"` | — | NIF + address | | [F1 IGIC (Canary Islands)](#f1-with-igic-canary-islands) | `STANDARD` | — | `"01"` | — | NIF + address | | [F1 not subject (N1)](#f1-not-subject-n1) | `STANDARD` | `NO_SUJETA_ART_7_9` | `"01"` | — | NIF + address | | [F1 ISP — reverse charge (S2)](#f1-isp--reverse-charge-s2) | `STANDARD` | `ISP_ART_84_2_F` | `"01"` | — | NIF + address | | [F1 REBU (used goods)](#f1-rebu-used-goods-art-antiques) | not accepted | — | `"03"` | — | — | | [R1 corrective — partial](#r1-corrective--partial-by-differences) | (corrective) | — | `"01"` | — | inherited | | [R5 corrective — return on F2](#r5-corrective--return-on-simplified-f2) | (corrective) | — | `"01"` | — | none, like the F2 | | [Voiding](#voiding-anulación) | n/a | — | — | — | n/a | The first row of every table is the canonical pattern; everything below it is a variation. Read [Tax classification per line](/verifactu/tax-classification) for the full enum of `exemption_reason` codes and how they map to AEAT's S1/S2/N1/N2/E1–E6 four-family taxonomy. ## F2 simplified — under the cap, no recipient The bread-and-butter ticket invoice. Use `SIMPLIFIED` when the total stays under 3,000 €, the customer is a consumer, and you don't identify them. A `SIMPLIFIED` invoice with a `nif` or `alternative_id` in `recipient` is rejected ([`SIMPLIFIED_INVOICE_FORBIDS_IDENTIFIED_RECIPIENT`](/errors/SIMPLIFIED_INVOICE_FORBIDS_IDENTIFIED_RECIPIENT)) — identify the customer and it is an F1. Pass `recipient: {}` — the field itself is required, but every property inside it is optional for `SIMPLIFIED`, and BeeL. fills *consumidor final* automatically. ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "SIMPLIFIED", "recipient": {}, "lines": [ { "description": "Menú del día", "quantity": 2, "unit": "unit", "unit_price": 14.50, "main_tax": { "type": "IVA", "percentage": 10, "regime_key": "01" } } ], "options": { "issue_directly": true } }' ``` ```json { "type": "SIMPLIFIED", "recipient": {}, "lines": [ { "description": "Menú del día", "quantity": 2, "unit": "unit", "unit_price": 14.50, "main_tax": { "type": "IVA", "percentage": 10, "regime_key": "01" } } ], "options": { "issue_directly": true } } ``` See [Simplified vs standard](/verifactu/simplified-vs-standard) for the 3,000 € cap, the 400 € limit that is your responsibility, and why BeeL. always issues an identified customer's invoice as an F1. ## F1 standard — Spanish business customer The default B2B invoice between two Spanish entities. The recipient needs a Spanish NIF, which BeeL. checks against the AEAT census together with the name. ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 4a7d1ed4-9bc9-4f7e-b1e9-7c2a5f9b8d11" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "ACCIONA SA", "nif": "A08001851", "address": { "street": "Avenida de Europa", "number": "18", "postal_code": "28108", "city": "Alcobendas", "province": "Madrid", "country": "España", "country_code": "ES" } }, "lines": [ { "description": "Consultoría de arquitectura — Sprint mayo", "quantity": 40, "unit": "hours", "unit_price": 75.00, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" } } ], "payment_info": { "method": "BANK_TRANSFER", "iban": "ES9121000418450200051332", "payment_term_days": 30 }, "options": { "issue_directly": true } }' ``` ```json { "type": "STANDARD", "recipient": { "legal_name": "ACCIONA SA", "nif": "A08001851", "address": { "street": "Avenida de Europa", "number": "18", "postal_code": "28108", "city": "Alcobendas", "province": "Madrid", "country": "España", "country_code": "ES" } }, "lines": [ { "description": "Consultoría de arquitectura — Sprint mayo", "quantity": 40, "unit": "hours", "unit_price": 75.00, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" } } ], "payment_info": { "method": "BANK_TRANSFER", "iban": "ES9121000418450200051332", "payment_term_days": 30 }, "options": { "issue_directly": true } } ``` The `Idempotency-Key` header is optional but recommended for any `issue_directly: true` call — retrying with the same UUID returns the original response instead of duplicating the record. ## F1 with multiple VAT rates per line One invoice can mix any combination of the [allowed VAT percentages](/verifactu/tax-classification#allowed-main_taxpercentage-values) (`0`, `4`, `5`, `10`, `21`). BeeL. builds the `vat_breakdown` automatically by grouping lines per rate. ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "ACCIONA SA", "nif": "A08001851", "address": { "street": "Calle Cava Baja", "number": "35", "postal_code": "28005", "city": "Madrid", "province": "Madrid", "country": "España", "country_code": "ES" } }, "lines": [ { "description": "Vino reserva (caja 6 botellas)", "quantity": 4, "unit": "box", "unit_price": 90.00, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" } }, { "description": "Servicio de catering — menú degustación", "quantity": 25, "unit": "menu", "unit_price": 32.00, "main_tax": { "type": "IVA", "percentage": 10, "regime_key": "01" } }, { "description": "Pan artesano", "quantity": 50, "unit": "unit", "unit_price": 1.20, "main_tax": { "type": "IVA", "percentage": 4, "regime_key": "01" } } ], "options": { "issue_directly": true } }' ``` ```json { "type": "STANDARD", "recipient": { "legal_name": "ACCIONA SA", "nif": "A08001851", "address": { "street": "Calle Cava Baja", "number": "35", "postal_code": "28005", "city": "Madrid", "province": "Madrid", "country": "España", "country_code": "ES" } }, "lines": [ { "description": "Vino reserva (caja 6 botellas)", "quantity": 4, "unit": "box", "unit_price": 90.00, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" } }, { "description": "Servicio de catering — menú degustación", "quantity": 25, "unit": "menu", "unit_price": 32.00, "main_tax": { "type": "IVA", "percentage": 10, "regime_key": "01" } }, { "description": "Pan artesano", "quantity": 50, "unit": "unit", "unit_price": 1.20, "main_tax": { "type": "IVA", "percentage": 4, "regime_key": "01" } } ], "options": { "issue_directly": true } } ``` **What changes vs. the previous example:** three lines instead of one, each with a different `main_tax.percentage`. The response `totals.vat_breakdown` carries three entries (`21`, `10`, `4`). ## F1 with IRPF withholding Professionals subject to IRPF retention add `irpf_rate` to the line. The accepted values are `0`, `1`, `2`, `2.8`, `6`, `7`, `7.6`, `9.5`, `15`, `19` or `24` (`IrpfPercentage` enum) — for general professional activity it's almost always `15` (or `7` during the first three years of activity). The issuer here is an individual professional: a company issuer only bears `0`, `19`, `24` and `9.5`, and any other rate is rejected with `422` [`IRPF_RATE_NOT_FOR_CORPORATE_ISSUER`](/errors/IRPF_RATE_NOT_FOR_CORPORATE_ISSUER) (see [Amounts and rounding](/guides/amounts-and-rounding#irpf)). ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "ACCIONA SA", "nif": "A08001851", "address": { "street": "Avenida de Europa", "number": "18", "postal_code": "28108", "city": "Alcobendas", "province": "Madrid", "country": "España", "country_code": "ES" } }, "lines": [ { "description": "Servicios de abogacía — asesoramiento mercantil", "quantity": 12, "unit": "hours", "unit_price": 120.00, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" }, "irpf_rate": 15 } ], "options": { "issue_directly": true } }' ``` ```json { "type": "STANDARD", "recipient": { "legal_name": "ACCIONA SA", "nif": "A08001851", "address": { "street": "Avenida de Europa", "number": "18", "postal_code": "28108", "city": "Alcobendas", "province": "Madrid", "country": "España", "country_code": "ES" } }, "lines": [ { "description": "Servicios de abogacía — asesoramiento mercantil", "quantity": 12, "unit": "hours", "unit_price": 120.00, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" }, "irpf_rate": 15 } ], "options": { "issue_directly": true } } ``` BeeL. **never** accepts IRPF on `SIMPLIFIED` invoices: a simplified invoice issued through BeeL. does not identify its recipient, and a withholding is made by an identified payer. If your customer withholds, issue an F1. See [Simplified vs standard](/verifactu/simplified-vs-standard). ## F1 with equivalence surcharge [#f1-with-recargo-de-equivalencia] For retailers that have declared themselves subject to the regime, add `equivalence_surcharge_rate` to each line and set `main_tax.regime_key: "18"`. ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "ACCIONA SA", "nif": "A08001851", "address": { "street": "Calle del Comercio", "number": "56", "postal_code": "08001", "city": "Barcelona", "province": "Barcelona", "country": "España", "country_code": "ES" } }, "lines": [ { "description": "Lote de auriculares inalámbricos para reventa", "quantity": 30, "unit": "unit", "unit_price": 45.00, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "18" }, "equivalence_surcharge_rate": 5.2 } ], "options": { "issue_directly": true } }' ``` ```json { "type": "STANDARD", "recipient": { "legal_name": "ACCIONA SA", "nif": "A08001851", "address": { "street": "Calle del Comercio", "number": "56", "postal_code": "08001", "city": "Barcelona", "province": "Barcelona", "country": "España", "country_code": "ES" } }, "lines": [ { "description": "Lote de auriculares inalámbricos para reventa", "quantity": 30, "unit": "unit", "unit_price": 45.00, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "18" }, "equivalence_surcharge_rate": 5.2 } ], "options": { "issue_directly": true } } ``` The IVA-RE pairs are strict: `4 ↔ 0.5`, `10 ↔ 1.4`, `21 ↔ 5.2` (and `21 ↔ 1.75` for tobacco); the temporary rates have their own pairs, accepted only on operations of their period. Pass `0` to disable the surcharge on a specific line. See [Equivalence surcharge](/verifactu/equivalence-surcharge) for the full table. ## F1 intra-EU B2B — goods (E5) EU-to-EU sales of goods between two businesses with valid VIES VAT-IDs are **exempt under Art. 25 LIVA**. The buyer self-assesses the IVA in their country. BeeL. checks that the German VAT-ID has the `DE` structure; whether it is active in VIES is for you to check before invoicing — see [International customers](/verifactu/international-customers#identifying-foreign-customers). ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "Berliner Industrie GmbH", "alternative_id": { "type": "NIF_IVA", "number": "DE123456789", "country_code": "DE" }, "address": { "street": "Friedrichstraße", "number": "200", "postal_code": "10117", "city": "Berlin", "province": "Berlin", "country": "Alemania", "country_code": "DE" } }, "lines": [ { "description": "Componentes electrónicos — pedido EU-2026-0042", "quantity": 500, "unit": "unit", "unit_price": 8.40, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" }, "exemption_reason": "EXENTA_ART_25" } ], "options": { "issue_directly": true } }' ``` ```json { "type": "STANDARD", "recipient": { "legal_name": "Berliner Industrie GmbH", "alternative_id": { "type": "NIF_IVA", "number": "DE123456789", "country_code": "DE" }, "address": { "street": "Friedrichstraße", "number": "200", "postal_code": "10117", "city": "Berlin", "province": "Berlin", "country": "Alemania", "country_code": "DE" } }, "lines": [ { "description": "Componentes electrónicos — pedido EU-2026-0042", "quantity": 500, "unit": "unit", "unit_price": 8.40, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" }, "exemption_reason": "EXENTA_ART_25" } ], "options": { "issue_directly": true } } ``` **What changes vs. the previous example:** recipient uses `alternative_id.type: "NIF_IVA"` (VIES VAT-ID) instead of `nif`; line carries `main_tax.percentage: 0` and `exemption_reason: "EXENTA_ART_25"`. See [International customers > B2B intra-EU goods](/verifactu/international-customers#b2b-intra-eu--goods-e5). ## F1 intra-EU B2B — services (N2) Same German customer, but selling **services** instead of goods. Services to an EU business are **not subject by place of supply** (*no sujetas por localización*, Art. 69 LIVA): the place of supply is the buyer's country, so the operation is outside the scope of Spanish IVA. ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "Berliner Industrie GmbH", "alternative_id": { "type": "NIF_IVA", "number": "DE123456789", "country_code": "DE" }, "address": { "street": "Friedrichstraße", "number": "200", "postal_code": "10117", "city": "Berlin", "province": "Berlin", "country": "Alemania", "country_code": "DE" } }, "lines": [ { "description": "Consultoría de arquitectura cloud", "quantity": 60, "unit": "hours", "unit_price": 110.00, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" }, "exemption_reason": "NO_SUJETA_LOCALIZACION" } ], "options": { "issue_directly": true } }' ``` ```json { "type": "STANDARD", "recipient": { "legal_name": "Berliner Industrie GmbH", "alternative_id": { "type": "NIF_IVA", "number": "DE123456789", "country_code": "DE" }, "address": { "street": "Friedrichstraße", "number": "200", "postal_code": "10117", "city": "Berlin", "province": "Berlin", "country": "Alemania", "country_code": "DE" } }, "lines": [ { "description": "Consultoría de arquitectura cloud", "quantity": 60, "unit": "hours", "unit_price": 110.00, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" }, "exemption_reason": "NO_SUJETA_LOCALIZACION" } ], "options": { "issue_directly": true } } ``` **What changes vs. the previous example:** `exemption_reason` flips from `EXENTA_ART_25` (E5, goods) to `NO_SUJETA_LOCALIZACION` (N2, services). The recipient block is identical — the bienes-vs-servicios distinction is per-line, not per-customer. ## F1 intra-EU B2C — OSS over threshold Once your annual cross-border B2C sales to EU consumers exceed 10,000 € you must apply destination-country IVA via the One-Stop-Shop (OSS) and file Modelo 369. The line carries `regime_key: "17"` and the **destination country's rate** — 19 % for Germany below. The regime key widens the accepted rates beyond the Spanish menu, and it alone classifies the line as N2, so the line takes **no `exemption_reason`**: adding one would force the rate to 0 % and drop the destination IVA from the breakdown. ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "Anna Schmidt", "alternative_id": { "type": "PASSPORT", "number": "C0HJ4P9DT", "country_code": "DE" }, "address": { "street": "Müllerstraße", "number": "47", "postal_code": "80469", "city": "München", "province": "Bayern", "country": "Alemania", "country_code": "DE" } }, "lines": [ { "description": "Suscripción anual plataforma SaaS", "quantity": 1, "unit": "year", "unit_price": 480.00, "main_tax": { "type": "IVA", "percentage": 19, "regime_key": "17" } } ], "options": { "issue_directly": true } }' ``` ```json { "type": "STANDARD", "recipient": { "legal_name": "Anna Schmidt", "alternative_id": { "type": "PASSPORT", "number": "C0HJ4P9DT", "country_code": "DE" }, "address": { "street": "Müllerstraße", "number": "47", "postal_code": "80469", "city": "München", "province": "Bayern", "country": "Alemania", "country_code": "DE" } }, "lines": [ { "description": "Suscripción anual plataforma SaaS", "quantity": 1, "unit": "year", "unit_price": 480.00, "main_tax": { "type": "IVA", "percentage": 19, "regime_key": "17" } } ], "options": { "issue_directly": true } } ``` The 10,000 € threshold is an **annual aggregate across all EU countries** — not per-country, not per-customer. Once you cross it (or opt in voluntarily) every cross-border B2C sale is OSS until year-end. ## F1 intra-EU B2C — under OSS threshold Below the threshold (and not opted in), cross-border B2C sales are billed with **Spanish IVA** as if the consumer were Spanish. No `exemption_reason`, default `regime_key: "01"`, normal rate. ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "Anna Schmidt", "alternative_id": { "type": "PASSPORT", "number": "C0HJ4P9DT", "country_code": "DE" }, "address": { "street": "Müllerstraße", "number": "47", "postal_code": "80469", "city": "München", "province": "Bayern", "country": "Alemania", "country_code": "DE" } }, "lines": [ { "description": "Curso online — fotografía digital", "quantity": 1, "unit": "course", "unit_price": 149.00, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" } } ], "options": { "issue_directly": true } }' ``` ```json { "type": "STANDARD", "recipient": { "legal_name": "Anna Schmidt", "alternative_id": { "type": "PASSPORT", "number": "C0HJ4P9DT", "country_code": "DE" }, "address": { "street": "Müllerstraße", "number": "47", "postal_code": "80469", "city": "München", "province": "Bayern", "country": "Alemania", "country_code": "DE" } }, "lines": [ { "description": "Curso online — fotografía digital", "quantity": 1, "unit": "course", "unit_price": 149.00, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" } } ], "options": { "issue_directly": true } } ``` **What changes vs. the previous example:** same German individual, but `regime_key` drops back to `"01"`, `exemption_reason` is removed, and `percentage` becomes the standard Spanish `21`. The 10,000 €/year aggregate decides which of the two shapes to use; track it externally. ## F1 export of goods to non-EU (E2) Goods leaving the EU are **exempt under Art. 21 LIVA**. The line needs `exemption_reason: EXENTA_ART_21`, `regime_key: "02"` (Export), and `percentage: 0`. The customer's `alternative_id.type` will typically be `PASSPORT` for individuals or `OTHER_DOCUMENT` for foreign businesses. ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "Northeast Imports Inc.", "alternative_id": { "type": "PASSPORT", "number": "551234567", "country_code": "US" }, "address": { "street": "5th Avenue", "number": "725", "postal_code": "10022", "city": "New York", "province": "NY", "country": "Estados Unidos", "country_code": "US" } }, "lines": [ { "description": "Aceite de oliva virgen extra — palet 480 botellas", "quantity": 1, "unit": "pallet", "unit_price": 3850.00, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "02" }, "exemption_reason": "EXENTA_ART_21" } ], "options": { "issue_directly": true } }' ``` ```json { "type": "STANDARD", "recipient": { "legal_name": "Northeast Imports Inc.", "alternative_id": { "type": "PASSPORT", "number": "551234567", "country_code": "US" }, "address": { "street": "5th Avenue", "number": "725", "postal_code": "10022", "city": "New York", "province": "NY", "country": "Estados Unidos", "country_code": "US" } }, "lines": [ { "description": "Aceite de oliva virgen extra — palet 480 botellas", "quantity": 1, "unit": "pallet", "unit_price": 3850.00, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "02" }, "exemption_reason": "EXENTA_ART_21" } ], "options": { "issue_directly": true } } ``` See [International customers > Exports of goods](/verifactu/international-customers#exports-of-goods-non-eu) for the documentary evidence (DUA / customs declaration) you should keep alongside the invoice. ## F1 services to non-EU (N2) Services to a customer outside the EU are **not subject by place of supply** — same N2 family as intra-EU B2B services. The recipient is non-EU but the line shape is identical to the EU service case. ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "Northeast Imports Inc.", "alternative_id": { "type": "PASSPORT", "number": "551234567", "country_code": "US" }, "address": { "street": "5th Avenue", "number": "725", "postal_code": "10022", "city": "New York", "province": "NY", "country": "Estados Unidos", "country_code": "US" } }, "lines": [ { "description": "Diseño de identidad de marca", "quantity": 1, "unit": "project", "unit_price": 6500.00, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" }, "exemption_reason": "NO_SUJETA_LOCALIZACION" } ], "options": { "issue_directly": true } }' ``` ```json { "type": "STANDARD", "recipient": { "legal_name": "Northeast Imports Inc.", "alternative_id": { "type": "PASSPORT", "number": "551234567", "country_code": "US" }, "address": { "street": "5th Avenue", "number": "725", "postal_code": "10022", "city": "New York", "province": "NY", "country": "Estados Unidos", "country_code": "US" } }, "lines": [ { "description": "Diseño de identidad de marca", "quantity": 1, "unit": "project", "unit_price": 6500.00, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" }, "exemption_reason": "NO_SUJETA_LOCALIZACION" } ], "options": { "issue_directly": true } } ``` **What changes vs. the previous example:** `exemption_reason` flips from `EXENTA_ART_21` (E2, goods) to `NO_SUJETA_LOCALIZACION` (N2, services); `regime_key` drops from `"02"` (Export) back to the default `"01"`. ## F1 exempt operation (E1) — educational/medical Operations exempt under Art. 20 LIVA (education, medical, social, insurance, residential rental). Set `exemption_reason: EXENTA_ART_20`, `percentage: 0`, and use `exemption_reason_text` to record the specific subparagraph. ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "Academia Cervantes SL", "nif": "A08001851", "address": { "street": "Calle Princesa", "number": "27", "postal_code": "28008", "city": "Madrid", "province": "Madrid", "country": "España", "country_code": "ES" } }, "lines": [ { "description": "Clases particulares de matemáticas — trimestre primavera", "quantity": 36, "unit": "hours", "unit_price": 28.00, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" }, "exemption_reason": "EXENTA_ART_20", "exemption_reason_text": "Operación exenta de IVA según Art. 20.Uno.10º LIVA (enseñanza)" } ], "options": { "issue_directly": true } }' ``` ```json { "type": "STANDARD", "recipient": { "legal_name": "Academia Cervantes SL", "nif": "A08001851", "address": { "street": "Calle Princesa", "number": "27", "postal_code": "28008", "city": "Madrid", "province": "Madrid", "country": "España", "country_code": "ES" } }, "lines": [ { "description": "Clases particulares de matemáticas — trimestre primavera", "quantity": 36, "unit": "hours", "unit_price": 28.00, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" }, "exemption_reason": "EXENTA_ART_20", "exemption_reason_text": "Operación exenta de IVA según Art. 20.Uno.10º LIVA (enseñanza)" } ], "options": { "issue_directly": true } } ``` `exemption_reason_text` is free-text (max 500 chars). It's shown on the PDF and persisted on the VeriFactu record, but doesn't change AEAT classification. ## F1 with IGIC (Canary Islands) Canary Islands operations use IGIC instead of IVA. Switch `main_tax.type` to `"IGIC"` and pick a valid IGIC rate (`0`, `3`, `5`, `7`, `9.5`, `15`, `20`). ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "Importaciones Atlántico SL", "nif": "A08001851", "address": { "street": "Calle León y Castillo", "number": "200", "postal_code": "35004", "city": "Las Palmas de Gran Canaria", "province": "Las Palmas", "country": "España", "country_code": "ES" } }, "lines": [ { "description": "Mobiliario de oficina — sillas ergonómicas", "quantity": 10, "unit": "unit", "unit_price": 180.00, "main_tax": { "type": "IGIC", "percentage": 7, "regime_key": "01" } } ], "options": { "issue_directly": true } }' ``` ```json { "type": "STANDARD", "recipient": { "legal_name": "Importaciones Atlántico SL", "nif": "A08001851", "address": { "street": "Calle León y Castillo", "number": "200", "postal_code": "35004", "city": "Las Palmas de Gran Canaria", "province": "Las Palmas", "country": "España", "country_code": "ES" } }, "lines": [ { "description": "Mobiliario de oficina — sillas ergonómicas", "quantity": 10, "unit": "unit", "unit_price": 180.00, "main_tax": { "type": "IGIC", "percentage": 7, "regime_key": "01" } } ], "options": { "issue_directly": true } } ``` IPSI (Ceuta and Melilla) works identically: `main_tax.type: "IPSI"` with one of its rates (`0.5`, `1`, `2`, `4`, `8`, `10`). See [Territorial taxes](/verifactu/territorial-taxes) for the full picture. ## F1 not subject (N1) Operations *not subject* to IVA under the general rules of Art. 7 LIVA — internal transfers between branches, samples for promotion, out-of-scope operations. Use `exemption_reason: NO_SUJETA_ART_7_9` and `percentage: 0`. ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "Distribuciones Hermanas Pérez SL", "nif": "A08001851", "address": { "street": "Polígono Industrial San Isidro", "number": "12", "postal_code": "46980", "city": "Paterna", "province": "Valencia", "country": "España", "country_code": "ES" } }, "lines": [ { "description": "Muestras comerciales sin valor — catálogo 2026", "quantity": 50, "unit": "unit", "unit_price": 12.00, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" }, "exemption_reason": "NO_SUJETA_ART_7_9", "exemption_reason_text": "Entrega de muestras gratuitas (Art. 7.4º LIVA)" } ], "options": { "issue_directly": true } }' ``` ```json { "type": "STANDARD", "recipient": { "legal_name": "Distribuciones Hermanas Pérez SL", "nif": "A08001851", "address": { "street": "Polígono Industrial San Isidro", "number": "12", "postal_code": "46980", "city": "Paterna", "province": "Valencia", "country": "España", "country_code": "ES" } }, "lines": [ { "description": "Muestras comerciales sin valor — catálogo 2026", "quantity": 50, "unit": "unit", "unit_price": 12.00, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" }, "exemption_reason": "NO_SUJETA_ART_7_9", "exemption_reason_text": "Entrega de muestras gratuitas (Art. 7.4º LIVA)" } ], "options": { "issue_directly": true } } ``` ## F1 ISP — reverse charge (S2) Reverse charge (*inversión del sujeto pasivo*): the **buyer** self-assesses the IVA instead of the seller charging it. Common cases: construction services subcontracted to a developer (`ISP_ART_84_2_F`), scrap metal deliveries (`ISP_ART_84_2_C`), and operations performed by non-established entities (`ISP_ART_84_2_A`). ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "Promociones Inmobiliarias del Mediterráneo SA", "nif": "A46789012", "address": { "street": "Gran Vía Marqués del Turia", "number": "47", "postal_code": "46005", "city": "Valencia", "province": "Valencia", "country": "España", "country_code": "ES" } }, "lines": [ { "description": "Ejecución de obra — instalación eléctrica edificio Torre Norte", "quantity": 1, "unit": "project", "unit_price": 42000.00, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" }, "exemption_reason": "ISP_ART_84_2_F", "exemption_reason_text": "Inversión del sujeto pasivo — Art. 84.Uno.2º.f LIVA (ejecución de obra)" } ], "options": { "issue_directly": true } }' ``` ```json { "type": "STANDARD", "recipient": { "legal_name": "Promociones Inmobiliarias del Mediterráneo SA", "nif": "A46789012", "address": { "street": "Gran Vía Marqués del Turia", "number": "47", "postal_code": "46005", "city": "Valencia", "province": "Valencia", "country": "España", "country_code": "ES" } }, "lines": [ { "description": "Ejecución de obra — instalación eléctrica edificio Torre Norte", "quantity": 1, "unit": "project", "unit_price": 42000.00, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" }, "exemption_reason": "ISP_ART_84_2_F", "exemption_reason_text": "Inversión del sujeto pasivo — Art. 84.Uno.2º.f LIVA (ejecución de obra)" } ], "options": { "issue_directly": true } } ``` ISP lines must **never** carry `equivalence_surcharge_rate` — the buyer self-assesses the full tax, so the surcharge cannot apply. BeeL. rejects the combination at validation time. ## F1 REBU (used goods, art, antiques) Not accepted: a line with `regime_key: "03"` is rejected with `422` [`REGIME_KEY_NOT_SUPPORTED`](/errors/REGIME_KEY_NOT_SUPPORTED). Under the used-goods regime the invoice must not show the tax separately (RD 1619/2012, art. 16.2.c), and a BeeL. invoice always does. See [Regime keys](/verifactu/regime-keys#keys-that-are-not-accepted). ## R1 corrective — partial (by differences) The most common rectification. Apply a delta to a previously issued invoice — quantities can be positive or negative. The URL points to the **original** invoice; the body describes only the change. The original status flips to `RECTIFIED`. ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices/a1b2c3d4-e5f6-7890-abcd-ef1234567890/corrective" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: 8b9c2e44-bbcd-4f23-9a01-1c3d5e7f9a02" \ -d '{ "rectification_type": "PARTIAL", "rectification_code": "R1", "reason": "Descuento comercial post-emisión acordado con el cliente (5 horas no facturables)", "lines": [ { "description": "Ajuste por horas no facturables — Sprint mayo", "quantity": -5, "unit": "hours", "unit_price": 75.00, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" } } ], "options": { "issue_directly": true } }' ``` ```json { "rectification_type": "PARTIAL", "rectification_code": "R1", "reason": "Descuento comercial post-emisión acordado con el cliente (5 horas no facturables)", "lines": [ { "description": "Ajuste por horas no facturables — Sprint mayo", "quantity": -5, "unit": "hours", "unit_price": 75.00, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" } } ], "options": { "issue_directly": true } } ``` The `quantity: -5` produces a negative line — that's the canonical "by differences" pattern. See [Corrective invoices](/verifactu/corrective-invoices) for when to pick `PARTIAL` vs `TOTAL` and which code (R1–R4) applies to your case. ## R5 corrective — return on simplified F2 R5 is **reserved for rectifying SIMPLIFIED invoices**, whatever the cause. The common case: the customer returns one of the items on the ticket. ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices/9f8e7d6c-5b4a-3210-fedc-ba9876543210/corrective" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "rectification_type": "PARTIAL", "rectification_code": "R5", "reason": "El cliente devolvió uno de los dos artículos del tique", "lines": [ { "description": "Devolución - camiseta talla M", "quantity": -1, "unit_price": 16.53, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" } } ] }' ``` ```json { "rectification_type": "PARTIAL", "rectification_code": "R5", "reason": "El cliente devolvió uno de los dos artículos del tique", "lines": [ { "description": "Devolución - camiseta talla M", "quantity": -1, "unit_price": 16.53, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" } } ] } ``` **What changes vs. the previous example:** `rectification_code` goes from `R1` to `R5`, and, like the F2, the R5 reaches AEAT without recipient data. A customer who asks for an invoice with their details after a ticket is not a correction: nothing in the ticket is wrong, so that is not an R5 but an [exchange of the simplified invoice](/verifactu/simplified-vs-standard#upgrading-an-f2-to-f1-the-canje-case). ## Voiding [#voiding-anulación] If the operation **never happened** — duplicate emission, wrong customer, test invoice escaped to production — use the void endpoint, **not** a corrective. Voiding is for "this invoice should not exist"; corrective is for "this invoice exists but the numbers are wrong". ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices/a1b2c3d4-e5f6-7890-abcd-ef1234567890/void" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "reason": "Duplicado de la factura F-2026-0142, emitida dos veces por error", "issued_in_error": true }' ``` ```json { "reason": "Duplicado de la factura F-2026-0142, emitida dos veces por error", "issued_in_error": true } ``` The invoice flips to `VOIDED` and, if AEAT had accepted its registration, the cancellation record is sent automatically; if the registration never reached AEAT, nothing is sent. `issued_in_error: true` confirms the invoice was issued by mistake: it is required once the invoice has been sent or paid ([`VOID_REQUIRES_ISSUED_IN_ERROR`](/errors/VOID_REQUIRES_ISSUED_IN_ERROR)). See [Cancel and fix](/verifactu/cancel-and-fix) for the decision tree between void and corrective. ## Related - [Tax classification per line](/verifactu/tax-classification) — the `exemption_reason` mapping - [Corrective invoices](/verifactu/corrective-invoices) — every R1–R5 scenario - [International customers](/verifactu/international-customers) — the cross-border cases in depth --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Handling AEAT rejections How to read a REJECTED invoice (and an accepted one that carries an error code), what to do for each family of AEAT codes, and how to make sure you never miss one. A registered invoice is immutable, so a rejection is resolved with a new fiscal document or, when the cause lies outside the invoice, by contacting BeeL. This page tells you which, from what the invoice says. For the full state machine, see [Submission states](/verifactu/submission-states). For choosing between a corrective and a void, see [Cancel vs amend](/verifactu/cancel-and-fix). ## Read the invoice first Three fields on the invoice's `verifactu` block tell you where you are: `submission_status`, `error_code` and `error_message`. | `submission_status` | `error_code` | What happened | Go to | |---|---|---|---| | `REJECTED` | set | AEAT answered with a coded rejection | [AEAT codes by what to do](#aeat-codes-by-what-to-do) | | `REJECTED` | absent | AEAT gave no coded answer: the submission was refused **before** it reached AEAT, BeeL. stopped waiting for an answer that never came, or AEAT already holds another invoice with this number. `error_message` says which | [The number is already taken](#the-number-is-already-taken-at-aeat), otherwise [When to contact support](#when-to-contact-support) | | `ACCEPTED` | set | **Accepted with errors**: the invoice is registered, but AEAT flagged some of its data | [Accepted with errors](#accepted-with-errors) | | `ACCEPTED` | absent | Registered cleanly | Nothing to do | | `NOT_SUBMITTED` | — | The invoice should have gone to AEAT and has no record at all | [When to contact support](#when-to-contact-support) | **`error_message` is for humans.** Show it, log it, attach it to a support request — never parse it or branch on its wording. Its language and phrasing are not stable, and it is not always AEAT's text: when AEAT gave no answer, BeeL. writes its own explanation there. Branch on `submission_status` and `error_code` only. To see each record separately — the registration and, if you voided, the cancellation — use [List the VeriFactu records of an invoice](/invoices/listCompanyInvoiceVerifactuRecords). Each record carries its own `submission_status` and, read the same way as on the invoice, its own `error_message` and `error_code`. ## A temporary AEAT error stays `PENDING` When AEAT answers with a temporary server-side error, the invoice is not rejected: it stays `PENDING`, with no `error_code` or `error_message`, while BeeL. retries it, and no `verifactu.status.updated` is sent. It moves to `ACCEPTED` or `REJECTED` when AEAT gives a real answer, or to `REJECTED` if the retries run out: ```text PENDING → (AEAT server-side error; BeeL. retries, still PENDING) → ACCEPTED or REJECTED ``` So a `REJECTED` invoice does not move on its own: it is safe to act on it. ## Accepted with errors `ACCEPTED_WITH_ERRORS` means AEAT **registered** the invoice but reported a problem with some of its data. The invoice is valid and in AEAT's registry; you do not need to resubmit it, and it will not change on its own. A typical cause is the recipient: AEAT could not match the recipient's NIF and name against its census. That can happen when the customer's NIF could not be checked against the census at the time the customer was saved — BeeL. lets the customer through rather than block you, and AEAT flags it later. What to do: 1. Read `error_message` to see what AEAT flagged. 2. Check that data — usually the recipient's NIF and legal name — against the customer's real details. 3. If it was right, nothing else is needed. If it was wrong, fix it in the customer's data so the following invoices carry it right. A corrective does not change it on the invoice already recorded: it keeps the recipient of the invoice it corrects ([COR-017 · A corrective keeps the recipient, except to correct the recipient's data](/rules/corrective#cor-017)). See [REC-009 · Check the data AEAT accepted with errors](/rules/records#rec-009). ## AEAT codes by what to do `error_code` carries AEAT's code unchanged. These are the codes you are most likely to meet, grouped by who has to act. AEAT has many more; the complete list is in the [AEAT VeriFactu documentation](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/informacion-tecnica.html). ### Recipient data — fix the invoice | Code | Meaning | |---|---| | `1109` / `1110` | A NIF on the invoice is not in the AEAT census | | `1123` | The NIF format is incorrect | | `1193` | The recipient's NIF is not identified, or equals the issuer's | | `1149` | Under regime key `14`, the recipient's NIF must be in the census and start with P, Q, S or V | **What to do:** check the recipient against the census with the [NIF validation API](/nif-validation/validateNif) and fix the customer record. A corrective is not the way: the rejected invoice is not in AEAT's registry, and correcting it answers [`CORRECTIVE_ORIGINAL_RECORD_REJECTED`](/errors/CORRECTIVE_ORIGINAL_RECORD_REJECTED). Void it — that sends nothing to AEAT; if it was already sent or paid, the void needs `issued_in_error: true` — and issue a new invoice with the corrected recipient. > **Rules that apply here:** [CNT-020 · A Spanish recipient's NIF is in the AEAT census](/rules/contents#cnt-020) ### The issuer's own setup — fix the NIF, then contact support | Code | Meaning | |---|---| | `4104` | The issuing NIF is not identified in the AEAT census | | `4107` | The issuer's NIF is not identified in the AEAT census | | `4109` | The issuer's NIF format is incorrect | | `4112` | The submission is not authorised for this NIF | **What to do:** the invoice's data is fine; the taxpayer's situation with AEAT is not. Resolve it — register the NIF with AEAT, or [sign the representation](/verifactu/enabling-verifactu) — and then contact BeeL. with the invoice. Nothing in the invoice needs correcting, so do not issue a corrective for these. ### Suspended access — the taxpayer must talk to AEAT | Code | Meaning | |---|---| | `4141` | AEAT has suspended submission access | **What to do:** only AEAT can lift it. The taxpayer must contact AEAT; once it is lifted, contact BeeL. with the affected invoices. ### Records — usually nothing to fix in the data | Code | Meaning | What to do | |---|---|---| | `3000` | Duplicate: AEAT already has a record for this invoice | Do **not** reissue — the invoice may already be registered. Contact support to reconcile it. A number AEAT holds for a **different** invoice does not end here: see [The number is already taken at AEAT](#the-number-is-already-taken-at-aeat) | | `3001` | The record has already been cancelled | Seen on a cancellation: AEAT already considers the invoice voided. Nothing to redo | | `3002` | The record to modify or cancel does not exist in AEAT | Seen on a cancellation: there is nothing registered to cancel. Contact support if you expected there to be | | `3003` | No permission to update this record | Contact support | ### Invoice content — fix the invoice | Code | Meaning | |---|---| | `1100` | A field has an incorrect value or type | | `1106` | The invoice type is not allowed | | `1108` | The issuer does not match the obligated party | | `1124` | The tax rate is not one of the allowed values | | `1112` / `1133` / `1145` / `1152` | The issue date is in the future, too old, badly formatted, or earlier than the start of VeriFactu | **What to do:** issue a corrective with the right data. BeeL. validates most of these before submitting, so they are rare; if you cannot see what is wrong, contact support with the invoice ID. ### Record format — contact support | Code | Meaning | |---|---| | `4102` / `4103` / `4119` | The record does not match AEAT's schema, could not be read, or contains characters in the wrong encoding | **What to do:** these point at how the record was built, not at your data. Contact support with the invoice ID. ### Temporary AEAT errors — wait | Code | Meaning | |---|---| | `4108` / `4111` / `4128` | Temporary AEAT technical error | | `3500` / `3501` | Temporary AEAT database error | | `4134` / `4139` | The AEAT service is not available | **What to do:** nothing. While BeeL. retries, the invoice stays `PENDING` and these codes are not published on it. If the retries run out, the invoice becomes `REJECTED` without an AEAT verdict: contact support. ## Reconcile, do not only listen `verifactu.status.updated` tells you each time the public status of a record changes, including a submission refused before it reached AEAT or one BeeL. stopped waiting for; `NOT_SUBMITTED` never produces one, because there is no record to change. Treat the webhook as the fast path and a periodic sweep as the safety net: ```bash # Invoices AEAT does not have curl "https://app.beel.es/api/v1/companies/{company_id}/invoices?verifactu_status=REJECTED" \ -H "Authorization: Bearer $BEEL_API_KEY" # Invoices that should have gone to AEAT and have no record curl "https://app.beel.es/api/v1/companies/{company_id}/invoices?verifactu_status=NOT_SUBMITTED" \ -H "Authorization: Bearer $BEEL_API_KEY" ``` Run it on a schedule (daily is plenty for most volumes), compare with what you already know, and handle anything new as above. There is no need to sweep `ACCEPTED` invoices: an accepted record never turns into a rejected one — see [Is `ACCEPTED` final?](/verifactu/submission-states#is-accepted-final). Keep the job within your [rate limits](/guides/rate-limits#pacing-a-polling-or-reconciliation-job). `NOT_SUBMITTED` right after issuing is normal while the submission is in flight; only act on invoices that stay there. > **Rules that apply here:** [REC-008 · Follow submission_status and fix what AEAT rejects](/rules/records#rec-008) ## The number is already taken at AEAT AEAT identifies an invoice by the issuer's NIF, its number and its issue date. If it already holds a record with this invoice's number and date that is **not this invoice** — typically one issued with the software you used before, under the same NIF — BeeL. does not take that record as this invoice's. The invoice ends `REJECTED`, with no `error_code` and an `error_message` that says the number is taken, and it is not registered. Retrying does not help: it meets the same record. See [NUM-002 · An issued number is never reused, even when the invoice is voided](/rules/numbering#num-002). **What to do:** issue the invoice again with a number AEAT does not hold yet, from another series or a series that [continues the sequence of your previous software](/guides/series-and-numbering#continuing-a-sequence-from-another-system). The rejected invoice is not in AEAT's registry, so voiding it sends nothing to AEAT — see [Cancel vs amend](/verifactu/cancel-and-fix#decision-matrix). ## Fixing the invoice When the rejection is about the invoice's data, the fix is always a **new fiscal document**: a corrective or, for an invoice that should never have been issued, a void. A registered invoice is never edited. Which one fits each situation, including an invoice AEAT never registered, is in the [decision matrix of Cancel vs amend](/verifactu/cancel-and-fix#decision-matrix). ## When to contact support Write to [it@beel.es](mailto:it@beel.es) with the invoice ID(s) and the `error_code` / `error_message` you see when: - the invoice is `REJECTED` with no `error_code` — the record never reached AEAT, or BeeL. gave up waiting — unless `error_message` says [the number is already taken](#the-number-is-already-taken-at-aeat); - the invoice stays `NOT_SUBMITTED`; - the cause was **outside** the invoice (issuer not in the census, representation not signed, suspended access) and you have fixed it; - the code is a duplicate (`3000`), a record-format code, or you cannot tell what is wrong. When a registration that never reached AEAT — one refused before it got there, or one BeeL. stopped waiting for — is sent again, the new attempt **replaces** the undelivered one. The invoice keeps its number. In [its VeriFactu records](/invoices/listCompanyInvoiceVerifactuRecords), a registration refused before reaching AEAT is listed as `REJECTED` until the invoice is sent again; the new attempt then takes its place, since the undelivered one was never a record at AEAT. > **Rules that apply here:** [REC-010 · Subsanación is only for errors that need no corrective](/rules/records#rec-010) · [COR-022 · An invoice whose record AEAT rejected is fixed before it is corrected](/rules/corrective#cor-022) ## Related - [Submission states](/verifactu/submission-states) — every state and transition - [Cancel vs amend](/verifactu/cancel-and-fix) — corrective vs void vs *subsanación* - [Corrective invoices](/verifactu/corrective-invoices) — R1–R5 with payloads - [Enabling VeriFactu for a NIF](/verifactu/enabling-verifactu) — census, representation and blockers - [Webhook events](/webhook-events/onVeriFactuStatusUpdated) — the `verifactu.status.updated` payload --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Overview How BeeL. handles VeriFactu compliance — what BeeL. does for you, what you control, and where to learn each scenario. VERI\*FACTU is the modality of the RD 1007/2023 in which a billing system submits every billing record (*registro de facturación*) to AEAT as it is generated (article 16). BeeL. works only in that modality: for each invoice issued through it, BeeL. generates the record, computes and chains its hash and submits it. You decide **which kind of invoice** to issue and **for whom**, and BeeL. maps the rest. This section is the *when-to-use-what* guide. The endpoint reference for the VeriFactu and Invoicing APIs lives in the [API Reference](/verifactu/getCompanyVeriFactuConfiguration). Here we explain the fiscal decisions behind each request. ## At a glance | | | |---|---| | **Who the RD 1007/2023 applies to** | The taxpayers listed in its article 3.1 who use a billing system — Corporate Tax payers, self-employed people with an economic activity, and others — with the exclusions of articles 3.3 and 4. For the Basque Country and Navarre, it applies to taxpayers with their fiscal domicile in common territory (article 1.3) | | **When** | The regulation requires adapted billing systems before **2027-01-01** for Corporate Tax payers and before **2027-07-01** for the rest (RD-ley 15/2025). VERI\*FACTU is one of the two modalities it allows | | **What BeeL. does** | Generates, chains and submits the billing record of each invoice issued through it | | **What you choose** | `type` (STANDARD / SIMPLIFIED / CORRECTIVE), `rectification_code` (R1–R5) for correctives, `exemption_reason` per line, recipient identification | | **What BeeL. never does** | Recalculate the totals you sent — your numbers are the fiscal truth | **The NIF decides, not the invoice.** Whether an issued invoice goes to AEAT is resolved at issue time from the issuing NIF: if the NIF is under the VeriFactu regime in that environment, every invoice it issues is registered; if it is not, none is. There is no per-invoice, per-series or per-connection switch. See [Auto-submit policy](/verifactu/auto-submit) and [Enabling VeriFactu for a NIF](/verifactu/enabling-verifactu). > **Rules that apply here:** [DAT-011 · Adapted billing systems are mandatory from 1 January 2027 or 1 July 2027](/rules/dates#dat-011) ## How issuance maps to VeriFactu ```text 1. You POST /invoices or /invoices/{id}/issue 2. BeeL validates the invoice (NIF, totals, tipo factura) 3. BeeL emits the invoice locally (assigns number, freezes totals) 4. If the NIF is under the VeriFactu regime → BeeL submits a registro de facturación 5. AEAT responds (PENDING → ACCEPTED or REJECTED; a later cancellation lands on VOIDED) 6. BeeL exposes the resulting status on the invoice (and via webhooks) ``` ## Where to start F1, F2 and R1–R5 explained. No identified recipient on a simplified invoice, the 3,000 € cap, and what BeeL. enforces. R1–R5 reasons, PARTIAL vs TOTAL, and worked examples for each scenario. Subject / not subject / exempt, with the S1, S2, N1, N2, E1–E6 cheat sheet. ### Customer & territory scenarios B2B intra-EU, B2C with OSS, exports, services to non-EU clients. IVA, IGIC (Canary Islands), IPSI (Ceuta & Melilla) — when to use each. Equivalence surcharge on B2B retailer lines. The `regime_key` catalogue — OSS, criterio de caja, and more. ### Operations The configuration ladder, the representation, and the blockers that stop issuing. Always on, AEAT's test environment, no representation to sign. What each VeriFactu status means, when BeeL. keeps checking, when you must act. Reading `REJECTED` and accepted-with-errors, what to do per code, and reconciliation. The exact conditions under which BeeL. sends an invoice to AEAT for you. Void vs *subsanación* vs corrective invoice — pick the right operation. When the QR exists, why the PDF waits for it, and rendering your own. ### Reference Runnable curl + JSON for every common AEAT scenario — F1/F2, multi-IVA, intra-EU, exports, RE, ISP, correctives R1–R5. The description, total, number and recipient BeeL. sends for your invoice — and why the total can differ. --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # International customers Every cross-border scenario — intra-EU B2B, B2C with OSS, exports, services to non-EU — with the exact request shape BeeL. accepts. International invoices need the right combination of `exemption_reason`, `main_tax.regime_key`, and `alternative_id`. The wrong combination is almost always rejected by AEAT — and the right one is rarely obvious. This page walks every common scenario. ## Identifying foreign customers You can't use `recipient.nif` for non-Spanish customers — that field is reserved for Spanish NIFs. Use `alternative_id` instead: ```json { "recipient": { "legal_name": "Tech Europe GmbH", "alternative_id": { "type": "NIF_IVA", "number": "DE123456789", "country_code": "DE" } } } ``` | `alternative_id.type` | Code | Meaning | Allowed countries | |---|---|---|---| | **`NIF_IVA`** | `02` | EU VAT number (intra-community, VIES) | EU Member States other than ES | | **`PASSPORT`** | `03` | Passport | Any country (including ES) | | **`COUNTRY_ID`** | `04` | National ID in country of residence | Non-ES only | | **`RESIDENCE_CERTIFICATE`** | `05` | Residence certificate | Non-ES only | | **`OTHER_DOCUMENT`** | `06` | Any other identifier | Non-ES only | | **`NOT_REGISTERED`** | `07` | Customer not registered in AEAT census | **ES only** | The country these rules refer to is `alternative_id.country_code`, not the country of the address. It is required, except for `PASSPORT` and `NOT_REGISTERED`, which take `ES` when you omit it; any other type without it answers `422` [`ALTERNATIVE_ID_COUNTRY_REQUIRED`](/errors/ALTERNATIVE_ID_COUNTRY_REQUIRED), with `error.details` naming `alternative_id.country_code`. Breaking the rules answers `422` [`ALTERNATIVE_ID_SPAIN_INVALID_TYPE`](/errors/ALTERNATIVE_ID_SPAIN_INVALID_TYPE) (a type other than `PASSPORT` or `NOT_REGISTERED` with `ES`) or `422` [`ALTERNATIVE_ID_REQUIRES_SPAIN`](/errors/ALTERNATIVE_ID_REQUIRES_SPAIN) (`NOT_REGISTERED` with any other country). A `NIF_IVA` is accepted only with the country of another EU Member State and in that State's EU VAT number format: the country prefix (`EL` for Greece) followed by the national number, without spaces — `DE123456789`, `FR40303265045`, `EL094014201`. Lowercase letters are accepted and stored in uppercase. A country outside the EU answers `422` [`ALTERNATIVE_ID_VAT_REQUIRES_EU_COUNTRY`](/errors/ALTERNATIVE_ID_VAT_REQUIRES_EU_COUNTRY); a number without that structure, `422` [`ALTERNATIVE_ID_VAT_INVALID_FORMAT`](/errors/ALTERNATIVE_ID_VAT_INVALID_FORMAT). Both are checked when you save the customer or send the invoice, and again when you issue, before a number is used. See [CNT-021 · A recipient without a Spanish NIF is identified by an alternative id](/rules/contents#cnt-021). The numeric codes (`"02"`, `"03"`, …, `"07"`) are also accepted for backward compatibility but are deprecated. Prefer the descriptive names. **Well-formed is not the same as registered.** BeeL. checks the structure of a `NIF_IVA`, not whether it is active in **VIES**. A number that has the right format but is not in the VIES census is refused by VeriFactu after the invoice is issued, and the invoice ends up `REJECTED`. Check the number in VIES before you invoice; if it is not there, identify the customer with `COUNTRY_ID` or `OTHER_DOCUMENT` and treat the operation as B2C. **Give a foreign address its `country_code`.** `address.country_code` (ISO 3166-1 alpha-2) is the field that decides the country of the address — not `alternative_id.country_code`. `country` is accepted too, but only as a real ISO code (`"BE"`) or the official name of the country in Spanish, English or Catalan (`"Bélgica"`, `"Belgium"`); anything else, such as `"UK"`, is rejected with `422` [`COUNTRY_CODE_REQUIRED`](/errors/COUNTRY_CODE_REQUIRED) (the code is `GB`), and a `country` that names a different country than `country_code` with `422` [`COUNTRY_CODE_MISMATCH`](/errors/COUNTRY_CODE_MISMATCH). With neither field the address is Spanish: a Belgian postal code such as `1000` is then rejected with `422` [`POSTAL_CODE_INVALID_ES`](/errors/POSTAL_CODE_INVALID_ES). Whatever you send, the response returns the code and the Spanish name derived from it (`"country": "Bélgica"`, `"country_code": "BE"`). > **Rules that apply here:** [CNT-005 · A full invoice identifies the recipient by NIF](/rules/contents#cnt-005) · [CNT-026 · A recipient in the AEAT census is identified by NIF, not as not registered](/rules/contents#cnt-026) ## B2B intra-EU — goods (E5) EU-to-EU sales of goods between two businesses with valid VIES VAT-IDs are **exempt under Art. 25 LIVA**. The buyer self-assesses IVA in their country. ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "Acme NV", "alternative_id": { "type": "NIF_IVA", "number": "BE0404621642", "country_code": "BE" }, "address": { "street": "Hauptstraße", "number": "456", "postal_code": "1000", "city": "Brussels", "province": "Brussels", "country": "Bélgica", "country_code": "BE" } }, "lines": [ { "description": "Hardware supply", "quantity": 1, "unit": "unit", "unit_price": 200, "discount_percentage": 0, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" }, "exemption_reason": "EXENTA_ART_25" } ] }' ``` > **Rules that apply here:** [TAX-004 · Intra-EU supplies of goods are exempt only with the buyer's EU VAT number](/rules/taxes#tax-004) ## B2B intra-EU — services (N2) Services to an EU business follow the **general localisation rule** (Art. 69 LIVA): they're deemed supplied where the customer is, so the operation is **not subject** to Spanish IVA. Use `NO_SUJETA_LOCALIZACION` (N2), not `EXENTA_ART_25`. ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "Acme NV", "alternative_id": { "type": "NIF_IVA", "number": "BE0404621642", "country_code": "BE" }, "address": { "street": "Hauptstraße", "number": "456", "postal_code": "1000", "city": "Brussels", "province": "Brussels", "country": "Bélgica", "country_code": "BE" } }, "lines": [ { "description": "B2B consulting service", "quantity": 1, "unit": "service", "unit_price": 200, "discount_percentage": 0, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" }, "exemption_reason": "NO_SUJETA_LOCALIZACION" } ] }' ``` > **Rules that apply here:** [TAX-006 · Services to a business abroad are not subject to Spanish VAT](/rules/taxes#tax-006) ## B2C intra-EU — below the OSS threshold When you sell goods or services to an EU consumer and your **total annual cross-border B2C sales are under 10,000 €**, the operation tributes **in origin**. The invoice carries Spanish IVA just like a domestic B2C sale. Identify the consumer with `PASSPORT`, `COUNTRY_ID`, or `OTHER_DOCUMENT`. Omit `exemption_reason` (default S1). ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "Hans Müller", "alternative_id": { "type": "PASSPORT", "number": "F8624KW3J6", "country_code": "DE" }, "address": { "street": "Müllerstraße", "number": "47", "postal_code": "80469", "city": "München", "province": "Bayern", "country": "Alemania", "country_code": "DE" } }, "lines": [ { "description": "Digital subscription", "quantity": 1, "unit": "month", "unit_price": 200, "discount_percentage": 0, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" } } ] }' ``` ## B2C intra-EU — above the OSS threshold Above 10,000 €/year aggregated cross-border B2C sales (previous or current year), the **destination country's IVA** applies; the **OSS (One-Stop Shop)** regime is the optional way to declare it from Spain instead of registering in each country. From AEAT's perspective the operation is **not subject** to Spanish IVA, and `main_tax.regime_key: "17"` alone is what classifies it as N2. Keep the destination rate on the line (19 % for Germany below) and set **no `exemption_reason`** — adding one forces the rate to 0 % and drops the destination IVA from the breakdown. ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "Hans Müller", "alternative_id": { "type": "PASSPORT", "number": "F8624KW3J6", "country_code": "DE" }, "address": { "street": "Müllerstraße", "number": "47", "postal_code": "80469", "city": "München", "province": "Bayern", "country": "Alemania", "country_code": "DE" } }, "lines": [ { "description": "Digital subscription — OSS", "quantity": 1, "unit": "month", "unit_price": 200, "discount_percentage": 0, "main_tax": { "type": "IVA", "percentage": 19, "regime_key": "17" } } ] }' ``` **Whether sales are above the 10,000 € threshold, and whether to declare them through OSS, are the issuer's to decide.** Once you've registered for OSS, set `regime_key: "17"` on every cross-border B2C line. > **Rules that apply here:** [TAX-007 · Sales declared through OSS use regime key 17](/rules/taxes#tax-007) ## Exports of goods (non-EU) Goods leaving the EU customs territory are **exempt under Art. 21 LIVA** regardless of who the buyer is. Pair `EXENTA_ART_21` with `regime_key: "02"`. ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "Acme Inc.", "alternative_id": { "type": "PASSPORT", "number": "M76543210", "country_code": "US" }, "address": { "street": "5th Avenue", "number": "725", "postal_code": "10022", "city": "New York", "province": "NY", "country": "Estados Unidos", "country_code": "US" } }, "lines": [ { "description": "Export of goods", "quantity": 1, "unit": "unit", "unit_price": 200, "discount_percentage": 0, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "02" }, "exemption_reason": "EXENTA_ART_21" } ] }' ``` ## Services to non-EU customers By the general localisation rule, services to non-EU customers are **not subject** to Spanish IVA. Use `NO_SUJETA_LOCALIZACION`. The customer can be B2B or B2C — same classification. ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "Acme Inc.", "alternative_id": { "type": "PASSPORT", "number": "M76543210", "country_code": "US" }, "address": { "street": "5th Avenue", "number": "725", "postal_code": "10022", "city": "New York", "province": "NY", "country": "Estados Unidos", "country_code": "US" } }, "lines": [ { "description": "Professional services to US client", "quantity": 1, "unit": "project", "unit_price": 200, "discount_percentage": 0, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" }, "exemption_reason": "NO_SUJETA_LOCALIZACION" } ] }' ``` > **Rules that apply here:** [TAX-006 · Services to a business abroad are not subject to Spanish VAT](/rules/taxes#tax-006) ## Cheat sheet (international scenarios only) This page is about **cross-border** scenarios. ISP (`ISP_ART_84_2_*`, S2) is a **domestic Spanish** mechanism for reverse charge on specific operations (construction, gold, etc.) — it does **not** apply to intra-EU or non-EU buyers. For ISP, see [Tax classification > ISP](/verifactu/tax-classification#inversi%C3%B3n-del-sujeto-pasivo-s2). | Customer | Selling | `exemption_reason` | `main_tax.regime_key` | `alternative_id.type` | |---|---|---|---|---| | EU B2B (VIES) | **Goods** | `EXENTA_ART_25` (E5) | `01` | `NIF_IVA` | | EU B2B (VIES) | **Services** | `NO_SUJETA_LOCALIZACION` (N2) | `01` | `NIF_IVA` | | EU B2C (under OSS) | Anything | *omit* (S1) | `01` | `PASSPORT` / `COUNTRY_ID` / `OTHER_DOCUMENT` | | EU B2C (OSS) | Anything | — (regime `17` alone → N2) | `17` | `PASSPORT` / `COUNTRY_ID` / `OTHER_DOCUMENT` | | Non-EU | Goods | `EXENTA_ART_21` (E2) | `02` | `PASSPORT` / `COUNTRY_ID` / `OTHER_DOCUMENT` | | Non-EU | Services | `NO_SUJETA_LOCALIZACION` (N2) | `01` | `PASSPORT` / `COUNTRY_ID` / `OTHER_DOCUMENT` | **Common confusion**: intra-EU B2B services are `NO_SUJETA_LOCALIZACION` (N2, Art. 69 LIVA), **never** ISP/S2 (Art. 84 LIVA). ISP is reserved for domestic Spanish operations — never for cross-border. ## Related - [Tax classification](/verifactu/tax-classification) — full `exemption_reason` ↔ AEAT mapping - [Regime keys](/verifactu/regime-keys) — `02`, `17`, and the rest - [NIF Validation API](/nif-validation/validateNif) — how BeeL. verifies tax IDs against AEAT - [Create an invoice](/invoices/createCompanyInvoice) — full request schema --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Invoice types F1, F2, F3, R1–R5 — what each VeriFactu invoice type means, when BeeL. emits each one, and which API fields map to which AEAT code. Every invoice you submit to VeriFactu carries a `tipo_factura` code. BeeL. derives that code from your invoice's `type` and (for correctives) the `rectification_code` you set. This page is the canonical map between BeeL's invoice model and the AEAT type codes. ## The full catalogue | AEAT code | AEAT name | BeeL. request fields | Customer ID required? | Notes | |---|---|---|---|---| | **F1** | Factura ordinaria | `type: STANDARD` | Yes (NIF or `alternative_id`) | Default for B2B, and **any** invoice whose recipient you identify | | **F2** | Factura simplificada | `type: SIMPLIFIED` | **Never** — BeeL. rejects an identified recipient | Total ≤ 3,000 € VAT included; whether your activity allows more than 400 € is for you and your tax advisor to check (see [Simplified vs standard](/verifactu/simplified-vs-standard)) | | **F3** | Factura emitida en sustitución de facturas simplificadas | The [exchange of simplified invoices](/invoices/createCompanySimplifiedExchange) (a `STANDARD` invoice with `replaced_invoice_ids`) | Yes | Replaces simplified invoices the AEAT already accepted; see [Exchanging simplified invoices](/verifactu/simplified-vs-standard#exchange-with-verifactu) | | **R1** | Rectificativa por error fundado en derecho | `type: CORRECTIVE` + `rectification_code: R1` | Yes | Most common correction | | **R2** | Rectificativa por concurso de acreedores | `type: CORRECTIVE` + `rectification_code: R2` | Yes | Customer in formal insolvency | | **R3** | Rectificativa por crédito incobrable | `type: CORRECTIVE` + `rectification_code: R3` | Yes | Bad debt | | **R4** | Rectificativa por resto de causas | `type: CORRECTIVE` + `rectification_code: R4` | Yes | Catch-all not in R1–R3 | | **R5** | Rectificativa de factura simplificada | `type: CORRECTIVE` + `rectification_code: R5` | No (like the F2, sent to AEAT without recipient) | The **only** way to correct an F2 | `rectification_code` (R1–R5) is **why** the rectificative exists. `rectification_type` (`PARTIAL` / `TOTAL`) is **how** the correction works mathematically — see [Corrective invoices](/verifactu/corrective-invoices). The free-text `reason` is the human description. **`PROFORMA` has no AEAT code.** The fourth value of `type` is a commercial document with no fiscal validity: it never enters VeriFactu (no QR, no AEAT submission, no `verifactu` block). See [Proformas](/guides/proformas). ## How BeeL. chooses the code The decision happens at issuance, never on the draft: ```text type=STANDARD → F1 (F3 when issued in exchange for simplified invoices) type=SIMPLIFIED → F2 (no identified recipient, total ≤ 3 000 €) type=CORRECTIVE → R{rectification_code} (R1, R2, R3, R4, R5) ``` You cannot override `tipo_factura` directly — set the right `type` and `rectification_code` and BeeL. maps them. If you try to issue a `STANDARD` invoice that fails the F1 rules (e.g. missing `recipient.nif` and no `alternative_id`), the request is rejected with a descriptive error *before* anything is sent to AEAT. ## F1 and F2 Use **F1** (`STANDARD`) whenever you identify the recipient, at any amount; **F2** (`SIMPLIFIED`) only for a consumer you don't identify, up to 3,000 € VAT included. The decision table, the rules BeeL. enforces on each path and a canonical request for each are in [Simplified vs standard](/verifactu/simplified-vs-standard). Invoices BeeL. generates from a Stripe payment follow the same rule: a buyer with a NIF (or foreign identifier) and a complete address gets F1 at any amount (see [Generated invoices](/stripe/generated-invoices#forward-invoices-standard-vs-simplified)). ## R1–R5 — Rectificative invoices A corrective invoice always targets an original (via the URL `{invoice_id}`) and carries: - `rectification_code` — `R1`–`R5` (the AEAT legal motive) - `rectification_type` — `PARTIAL` (delta) or `TOTAL` (replace) - `reason` — free-text human description (required) The combination determines what BeeL. sends to AEAT (`tipo_rectificativa = S` for TOTAL, `I` for PARTIAL). Examples for every common scenario live in [Corrective invoices](/verifactu/corrective-invoices). `R5` is reserved for correcting an F2, and `R1`–`R4` for everything else. ## Related - [Simplified vs standard](/verifactu/simplified-vs-standard) — the F1/F2 decision tree - [Corrective invoices](/verifactu/corrective-invoices) — every R1–R5 scenario with payloads - [Tax classification](/verifactu/tax-classification) — the `exemption_reason` ↔ AEAT code mapping - [Create an invoice](/invoices/createCompanyInvoice) — full request schema --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # QR code and the invoice PDF When the VeriFactu QR code data is available, how the PDF relates to it, and what applies to any document that carries the QR. An invoice issued with a billing system carries a QR code that lets its recipient check it with AEAT (article 6.5 of the RD 1619/2012, and articles 20 and 21 of the Orden HAC/1177/2024). BeeL. prints that QR on the PDF it generates — once, centred at the top of the first page, at the size [QRC-003 · The QR measures between 30 mm and 40 mm](/rules/qr#qrc-003) sets, with «QR tributario:» above it and the legend below, both centred too — and also returns the QR data on the invoice. ## The QR exists from `PENDING` The QR is produced when the record is submitted, not when AEAT accepts it. As soon as an invoice reads `submission_status: PENDING`, its `verifactu` block already carries: - `qr_url` — the AEAT validation link the QR encodes; - `qr_base64` — the QR as a base64-encoded PNG, ready to embed; - `invoice_hash` — the fingerprint of the record. They stay on the invoice whatever AEAT answers — including after a rejection. Their presence says the record was built, not that AEAT accepted it: read `submission_status` for that. Before you render a document of the invoice, make sure the QR data is there: read the invoice until `verifactu.qr_url` is present, or wait for the `invoice.pdf.generated` webhook — see [QRC-002 · Wait for the QR before you distribute the PDF](/rules/qr#qrc-002). In sandbox the QR points to AEAT's **test** validation service; see [Testing in sandbox](/verifactu/testing-in-sandbox#where-the-submission-goes). ## The PDF and the QR For an invoice under VeriFactu, BeeL. renders the PDF with the QR once the QR data exists. The `invoice.pdf.generated` webhook tells you when it is ready, and [downloading the PDF](/invoices/getCompanyInvoicePdf) waits for it rather than making you poll. An invoice outside VeriFactu (`verifactu.enabled: false`) never waits: its PDF has no QR. The PDF is generated **once**, with the QR, and is never modified afterwards. Voiding the invoice or issuing a corrective for it does not change it and does not send `invoice.pdf.generated` again: the new status is in `status` and `verifactu.submission_status`, not in the document. Emailing the invoice before its PDF exists answers `202`, and the email goes out when the PDF is stored — see [Sending email](/guides/sending-email#sending-before-the-pdf-exists). > **Rules that apply here:** [QRC-002 · Wait for the QR before you distribute the PDF](/rules/qr#qrc-002) ## If the submission never reaches AEAT When the registration never produces a record — the submission was refused before reaching AEAT, or the invoice stays `NOT_SUBMITTED` — there is no QR data to print. An invoice whose registration was refused before reaching AEAT, or that was voided without being registered, has no PDF: downloading it, previewing it or emailing it with the PDF answers `400` [`INVOICE_NOT_REGISTERED_NO_PDF`](/errors/INVOICE_NOT_REGISTERED_NO_PDF). The fix is to get the invoice registered, not to render around it: see [Handling AEAT rejections](/verifactu/handling-rejections#when-to-contact-support). ## Rendering your own PDF Under the criteria AEAT has published, software that **prints the invoice or generates its QR** can be a component of the billing system that needs its own *declaración responsable* (the producer's signed statement of compliance), even when BeeL. generates the record and the QR data. The rules and AEAT's wording are in [Software built on the API](/verifactu/compliance-and-responsibilities#software-built-on-the-api). The API returns the QR data so that it is available to your software: ```json { "verifactu": { "enabled": true, "submission_status": "PENDING", "qr_url": "https://www2.agenciatributaria.gob.es/wlpl/TIKE-CONT/ValidarQR?nif=B27534239&numserie=S-2026-0001&fecha=19-09-2026&importe=121.00", "qr_base64": "iVBORw0KGgoAAAANSUhEUgAAAMgAAADI..." } } ``` - **`qr_base64`** is the QR as a PNG image. - **`qr_url`** is the link the QR encodes. The URL comes from the registered record: its `importe` is the total AEAT registers, which can differ from your invoice's total — see [What AEAT receives](/verifactu/what-aeat-receives#the-total). The number registered with AEAT is the `invoice_number` BeeL. assigned. Any document that carries the QR is subject to these rules: - [QRC-003 · The QR measures between 30 mm and 40 mm](/rules/qr#qrc-003) - [QRC-004 · The QR follows ISO/IEC 18004 with error correction M](/rules/qr#qrc-004) - [QRC-005 · Use qr_url exactly as returned](/rules/qr#qrc-005) - [QRC-007 · «QR tributario:» goes just above the QR](/rules/qr#qrc-007) - [QRC-008 · The QR goes once, at the start of the first page](/rules/qr#qrc-008) - [QRC-009 · Keep a blank margin around the QR](/rules/qr#qrc-009) - the legend goes next to it — see [The legend next to the QR](#the-legend-next-to-the-qr). The QR data is available from `PENDING`, without waiting for `ACCEPTED`. The `verifactu.status.updated` webhook for the registration carries `qr_url` and `qr_base64` too. > **Rules that apply here:** [QRC-001 · Every invoice carries the tax QR code](/rules/qr#qrc-001) · [QRC-010 · A structured e-invoice carries the QR URL as a field](/rules/qr#qrc-010) ## The legend next to the QR **QRC-006 · The VeriFactu legend goes just below the QR** `Required` · Law · Impact: medium · Responsibility: your integration. Just below the QR, print «Factura verificable en la sede electrónica de la AEAT» or «VERI*FACTU», preferably centred on it. The Orden asks for a type and size clearly visible and similar to the rest of the invoice data; AEAT's specification, for one equal to or larger than it. Print it only on invoices whose record goes to AEAT. Full rule: [QRC-006](/rules/qr#qrc-006) > **Rules that apply here:** [QRC-006 · The VeriFactu legend goes just below the QR](/rules/qr#qrc-006) · [QRC-001 · Every invoice carries the tax QR code](/rules/qr#qrc-001) ## Related - [Submission states](/verifactu/submission-states) — what `PENDING`, `ACCEPTED` and `REJECTED` mean - [What AEAT receives](/verifactu/what-aeat-receives) — why the QR's amount can differ from `invoice_total` - [Download the invoice PDF](/invoices/getCompanyInvoicePdf) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Regime keys The catalogue of VeriFactu regime codes BeeL. supports, when each one is required, and how it pairs with `exemption_reason`. `main_tax.regime_key` (AEAT's *clave_regimen*) declares the **tax regime** that applies to the operation. Most lines run under the general regime (`"01"`) — that's the default if you don't set anything. The other codes appear in specific scenarios; this page is the canonical catalogue. For the `exemption_reason` values referenced here, see [Tax classification per line](/verifactu/tax-classification). ## The catalogue These are the values of the `RegimeKey` enum in the spec. Each is a two-character string. `"03"`, `"06"` and `"14"` are in the enum but rejected on a line (see [Keys that are not accepted](#keys-that-are-not-accepted)); [List tax types](/tax-configuration/listTaxTypes) only offers the keys that are accepted. | Code | AEAT name | Where it applies | |---|---|---| | **`"01"`** | Régimen general | Default for every line | | **`"02"`** | Exportación | Exports and related operations exempt under arts. 21–22 LIVA (pairs with `exemption_reason: EXENTA_ART_21` or `EXENTA_ART_22`); IVA and IGIC lines, not IPSI | | **`"03"`** | Bienes usados, arte, antigüedades, colección | REBU regime — **not accepted** | | **`"04"`** | Oro de inversión | Investment gold regime | | **`"05"`** | Agencias de viajes | Travel agencies regime; the PDF carries its mention | | **`"06"`** | Grupo de entidades IVA / IGIC | Entity group regime — **not accepted** | | **`"07"`** | Criterio de caja | Cash-basis IVA; the PDF carries its mention | | **`"08"`** | Operaciones sujetas a IPSI / IVA o IGIC | An operation subject to another indirect tax (IPSI or IGIC on an IVA line; IPSI or IVA on an IGIC line). Not the general regime of IGIC, which is `"01"` | | **`"09"`** | Facturación de servicios por agencias mediadoras | Mediating agencies (travel) | | **`"10"`** | Cobros por cuenta de terceros | Third-party honorarium collection | | **`"11"`** | Arrendamiento de local de negocio | Business premises rental | | **`"14"`** | IVA pendiente de devengo en certificaciones de obra | Public works certifications — **not accepted** | | **`"15"`** | IVA pendiente de devengo en operaciones de tracto sucesivo | Successive-tract operations | | **`"17"`** | OSS / IOSS | EU one-stop-shop for B2C distance sales | | **`"18"`** | Recargo de equivalencia | Lines carrying `equivalence_surcharge_rate` | | **`"19"`** | REAGYP / art. 25 Ley 19/1994 | Agriculture, livestock, fishing (or Canarias special regime) | | **`"20"`** | Régimen simplificado | Modules / simplified regime | > **Rules that apply here:** [CNT-015 · A travel-agency invoice carries the mention «régimen especial de las agencias de viajes»](/rules/contents#cnt-015) ## Where it goes in the request `regime_key` lives **inside** `main_tax`, not at the line root: ```json { "lines": [ { "description": "...", "quantity": 1, "unit_price": 100, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" } } ] } ``` ## High-signal cases ### `"02"` — Exports of goods (non-EU) Mandatory for exports and the operations assimilated to them. Pair it with `exemption_reason: EXENTA_ART_21` (E2 — goods leaving the EU) or `EXENTA_ART_22` (E3 — operations assimilated to exports, such as international transport). The rule works both ways: regime `"02"` needs one of those two reasons, and those two reasons cannot go under the general regime `"01"`. Full payload example in [International customers > Exports of goods](/verifactu/international-customers#exports-of-goods-non-eu). ### `"03"` — REBU (used goods, art, antiques) Not accepted: a line with `regime_key: "03"` is rejected with `422` [`REGIME_KEY_NOT_SUPPORTED`](/errors/REGIME_KEY_NOT_SUPPORTED). Under the used-goods regime the invoice must not show the tax separately (RD 1619/2012, art. 16.2.c), and a BeeL. invoice always does. See [Keys that are not accepted](#keys-that-are-not-accepted). > **Rules that apply here:** [CNT-014 · A used-goods, art or antiques invoice carries its regime mention](/rules/contents#cnt-014) ### `"07"` — Cash-basis IVA (*criterio de caja*) [#07--cash-basis-iva-criterio-de-caja] If you've opted into the cash-basis regime (Art. 163 decies LIVA), every issued invoice carries `regime_key: "07"`. The IVA accrues when payment is received, not when the invoice is issued. The invoice PDF carries the mention «Régimen especial del criterio de caja». A `"07"` line cannot carry reverse charge or a not-subject reason, and of the exemptions only `EXENTA_ART_20` or `OTRO`. > **Rules that apply here:** [CNT-013 · A cash-basis invoice carries the mention «régimen especial del criterio de caja»](/rules/contents#cnt-013) ### `"17"` — OSS / IOSS For B2C distance sales of goods or services to EU consumers above the 10,000 € annual threshold. The line keeps the **destination country's IVA rate** — `regime_key: "17"` widens the accepted rates beyond the Spanish menu, so 19 % (Germany) or 22 % (Italy) are valid here. Do **not** set `percentage: 0`, and do not add an `exemption_reason`: BeeL. classifies the line as N2 from the regime key alone, and any exemption reason would force the rate to 0 % and drop the destination IVA from the breakdown. You still settle it via Modelo 369. Full payload in [International customers > B2C OSS](/verifactu/international-customers#b2c-intra-eu--above-the-oss-threshold). > **Rules that apply here:** [TAX-007 · Sales declared through OSS use regime key 17](/rules/taxes#tax-007) ### `"18"` — Equivalence surcharge [#18--recargo-de-equivalencia] Set on every line that carries `equivalence_surcharge_rate`. See [Equivalence surcharge](/verifactu/equivalence-surcharge). ### `"19"` — REAGYP / Canary Islands [#19--reagyp--canarias] Two unrelated cases share this code: **REAGYP** (the special regime for agriculture, livestock and fishing) and **Art. 25 Ley 19/1994** for the Canary Islands Special Zone (*Zona Especial Canaria*). Pick `"19"` when either applies; if unsure, talk to your tax advisor. ## Keys that are not accepted A line with one of these keys is rejected with `422` [`REGIME_KEY_NOT_SUPPORTED`](/errors/REGIME_KEY_NOT_SUPPORTED) when you create, edit or issue the invoice, and so is a default key set to one of them in the tax configuration: - **`"03"` (used goods, art, antiques):** under this regime the invoice must not show the tax separately (RD 1619/2012, art. 16.2.c), and a BeeL. invoice always does. - **`"06"` (group of entities):** AEAT requires a cost-based taxable base the invoice does not carry. - **`"14"` (VAT pending in public works certifications):** AEAT requires an operation date after the issue date and a public-administration recipient. A corrective invoice of an original that already carried one of these keys keeps it. ## What AEAT requires with each key Checked on IVA and IGIC lines when you create, edit or issue the invoice, before it is numbered: | You send | Error | Status | Why | |---|---|---|---| | `"04"` on a line with neither reverse charge (`ISP_ART_84_2_*`) nor an exemption; `"08"` without `exemption_reason: NO_SUJETA_LOCALIZACION` at 0 %; `"10"` without `NO_SUJETA_ART_7_9`; `"11"` with reverse charge; `"07"` with reverse charge, a not-subject reason or an exemption other than `EXENTA_ART_20` / `OTRO` | [`REGIME_KEY_CLASSIFICATION_NOT_ACCEPTED`](/errors/REGIME_KEY_CLASSIFICATION_NOT_ACCEPTED) | `422` | The line's `exemption_reason` (or its absence) is not one AEAT accepts with its regime key: `04` needs reverse charge or an exemption; `08` only `NO_SUJETA_LOCALIZACION` at 0 %; `10` only `NO_SUJETA_ART_7_9`; `11` no reverse charge; `07` no reverse charge, no not-subject reason and only `EXENTA_ART_20` or `OTRO` as exemptions. | | `"11"` (IVA) on a subject line at a rate other than 21 % | [`REGIME_KEY_REQUIRES_VAT_RATE`](/errors/REGIME_KEY_REQUIRES_VAT_RATE) | `422` | A subject IVA line under `regime_key` `11` carries a rate AEAT does not accept with that key; it only accepts 21 %. | | `"10"` on a simplified or corrective invoice | [`REGIME_KEY_REQUIRES_STANDARD_INVOICE`](/errors/REGIME_KEY_REQUIRES_STANDARD_INVOICE) | `422` | `regime_key` `10` is used on an invoice that is not a full (`STANDARD`) invoice; AEAT rejects it on a simplified or corrective invoice. | | `"10"` with a recipient identified by an `alternative_id` instead of a `nif` | [`REGIME_KEY_REQUIRES_RECIPIENT_NIF`](/errors/REGIME_KEY_REQUIRES_RECIPIENT_NIF) | `422` | `regime_key` `10` is used with a recipient identified by an `alternative_id`; AEAT requires a Spanish `nif` with that key. | ## Cross-field validations BeeL. applies | Combination | Status | |---|---| | `regime_key: "17"` with any `exemption_reason` | ⚠️ Accepted, but it forces the line to 0 % and loses the destination IVA — leave it unset | | `regime_key: "02"` without `exemption_reason` `EXENTA_ART_21` or `EXENTA_ART_22` | ❌ Rejected — [`REGIME_REQUIRES_INCOMPATIBLE_EXEMPTION`](/errors/REGIME_REQUIRES_INCOMPATIBLE_EXEMPTION): regime 02 needs E2 or E3 | | `exemption_reason: EXENTA_ART_21` or `EXENTA_ART_22` with `regime_key: "01"` | ❌ Rejected — [`EXEMPTION_INCOMPATIBLE_WITH_REGIME`](/errors/EXEMPTION_INCOMPATIBLE_WITH_REGIME): exports use regime 02 | | `regime_key: "18"` without `equivalence_surcharge_rate` on the line | ❌ Rejected — [`REGIME_REQUIRES_SURCHARGE`](/errors/REGIME_REQUIRES_SURCHARGE) | | `equivalence_surcharge_rate` on a line whose `regime_key` is **not** `"18"` | ❌ Rejected — [`SURCHARGE_REQUIRES_REGIME`](/errors/SURCHARGE_REQUIRES_REGIME): the surcharge is only compatible with regime 18 | > **Rules that apply here:** [TAX-015 · Regime key 08 means not subject to the line's tax](/rules/taxes#tax-015) · [TAX-016 · Regime keys 03, 06 and 14 are not accepted](/rules/taxes#tax-016) · [TAX-017 · Special regime keys carry the classification AEAT requires](/rules/taxes#tax-017) ## Related - [Tax classification](/verifactu/tax-classification) — the `exemption_reason` enum and its AEAT mapping (SSoT) - [International customers](/verifactu/international-customers) — B2B/B2C/extracomunitario scenarios with payloads - [Equivalence surcharge](/verifactu/equivalence-surcharge) — the dedicated guide for `regime_key: "18"` --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Simplified vs standard (F1 vs F2) When BeeL. issues a simplified invoice (F2) or a standard invoice (F1), the rules of the RD 1619/2012 behind them, and what BeeL. enforces at the API boundary. The simplified invoice (F2) is the "ticket" of the Spanish tax system: less data, but limited in amount and use case (article 4 of the RD 1619/2012). This page is the decision aid plus the exact rules BeeL. applies before the registro reaches AEAT. > **Not legal or tax advice.** This page describes how BeeL. works. It is not legal or tax advice: confirm your own obligations, and those of the businesses you invoice for, with your tax advisor. **A simplified invoice in BeeL. never identifies its recipient.** If the customer's NIF or a foreign identifier goes on the invoice, BeeL. issues it as a **standard** invoice (`type: STANDARD`), whatever the amount, and rejects a `SIMPLIFIED` invoice that carries one. This is a BeeL. rule: article 7.2 of the RD 1619/2012 does provide for a simplified invoice that states the recipient's NIF and address when a business recipient requires it, and BeeL. covers that case with a standard invoice. Invoices generated from Stripe apply the same rule in their own way, described [below](#on-the-f2-path). ## The decision in one table | Situation | Type | Why | |---|---|---| | You identify the customer (NIF or `alternative_id`) — at **any** amount | **F1** (`type: STANDARD`) | BeeL. issues identified invoices as F1 | | Consumer you don't identify, total **≤ 3,000 €** (VAT included) | **F2** (`type: SIMPLIFIED`) allowed | Quickest path, no NIF — but see [SIM-002 · Above 400 €, a simplified invoice needs an art. 4.2 activity](/rules/simplified#sim-002) | | Total **> 3,000 €** | **F1** | F2 is not allowed above the cap | | Customer is a company / self-employed person / business buyer that wants its NIF on the invoice | **F1** | BeeL. issues identified invoices as F1 (the RD 1619/2012, art. 7.2, would also allow a simplified invoice with the NIF) | | Customer is a business in another EU country | **F1** | BeeL. rejects intra-EU supplies of goods and operations not subject in Spain on F2 — see [International customers](/verifactu/international-customers) | | Customer asks for an identified invoice | **F1** | BeeL. issues identified invoices as F1, regardless of amount; after a ticket, [exchange it](#upgrading-an-f2-to-f1-the-canje-case) | | You're going to apply IRPF withholding | **F1** | BeeL. rejects IRPF on F2 — see [Why no IRPF on F2](#why-no-irpf-on-f2) | **SIM-002 · Above 400 €, a simplified invoice needs an art. 4.2 activity** `Required` · Law · Impact: high · Responsibility: the issuing business. Do not issue a simplified invoice above 400 €, VAT included, unless the operation is one of those listed in art. 4.2 (retail sales, hospitality, passenger transport and the rest of the list) or the invoice is a corrective. On payments collected through a payment connection, the connection's simplified threshold is the issuer's declaration: raising it above 400 € states that its activity is one of those listed in art. 4.2. Full rule: [SIM-002](/rules/simplified#sim-002) > **Rules that apply here:** [SIM-001 · A simplified invoice never exceeds 3,000 €](/rules/simplified#sim-001) ## What BeeL. enforces ### On the F2 path - **No identified recipient.** `recipient` must not carry `nif` or `alternative_id`, and must not point, through `customer_id`, at a customer that has one. Otherwise the request answers `422` [`SIMPLIFIED_INVOICE_FORBIDS_IDENTIFIED_RECIPIENT`](/errors/SIMPLIFIED_INVOICE_FORBIDS_IDENTIFIED_RECIPIENT) when you create the invoice, when an edit changes its type or its recipient, when you issue it — one by one, in bulk or on schedule — and when you write a recurring invoice template. Pass `recipient: {}`, or just a name for your own records - `total` (VAT included) **must be ≤ 3,000 €** — rejected above it with `400` [`SIMPLIFIED_INVOICE_EXCEEDS_LEGAL_LIMIT`](/errors/SIMPLIFIED_INVOICE_EXCEEDS_LEGAL_LIMIT), when you create the invoice, when an edit takes it over the cap (new lines, or `type` changed to `SIMPLIFIED`) and when you issue it - IRPF lines are not allowed on F2 — [`SIMPLIFICADA_FORBIDS_IRPF`](/errors/SIMPLIFICADA_FORBIDS_IRPF); see [Why no IRPF on F2](#why-no-irpf-on-f2). The rate is **not** silently coerced to 0: send no `irpf_rate` at all, or `irpf_rate: 0` - The equivalence surcharge is not allowed either — [`SIMPLIFICADA_FORBIDS_SURCHARGE`](/errors/SIMPLIFICADA_FORBIDS_SURCHARGE): a retailer in that regime must receive an identified F1 - Reverse charge is not allowed — [`SIMPLIFICADA_FORBIDS_ISP`](/errors/SIMPLIFICADA_FORBIDS_ISP): an anonymous recipient cannot self-assess - Intra-EU supplies of goods (`EXENTA_ART_25`) and operations not subject by place of supply (`NO_SUJETA_LOCALIZACION`) are not allowed — [`SIMPLIFICADA_FORBIDS_CROSS_BORDER`](/errors/SIMPLIFICADA_FORBIDS_CROSS_BORDER), when you create the invoice, edit it and issue it. The OSS regime (`regime_key: "17"`) is allowed - Apart from those, line semantics work as on F1: IVA rates, regime keys, exemption reasons, etc. Whatever the recipient block holds, AEAT receives an F2 **without** recipient data — see [What AEAT receives](/verifactu/what-aeat-receives). A simplified invoice issued before this check may still carry a `nif` or `alternative_id` when you read it. A draft in that state can still be edited — notes, dates, lines — but it is rejected when you issue it until it is changed to `STANDARD` or loses the identifier. **Invoices generated from Stripe payments pick their type from the customer's data first.** A customer with a NIF (or foreign identifier), a name and a complete address always receives a standard invoice; a NIF without a name or address is saved as a standard draft to complete, at any amount. Without an identifier, the payment gets a simplified invoice up to the connection's `simplificada_threshold` (default 400 €, at most 3,000 €); above it, BeeL. saves a draft to complete. Like every F2 in BeeL., a simplified invoice never identifies its recipient. See [Connection settings](/stripe/connection-settings#simplified-threshold-deprecated). > **Rules that apply here:** [SIM-001 · A simplified invoice never exceeds 3,000 €](/rules/simplified#sim-001) · [SIM-004 · A simplified invoice still carries its minimum contents](/rules/simplified#sim-004) · [SIM-005 · The record of a simplified invoice carries no recipient](/rules/simplified#sim-005) · [SIM-006 · An identified customer gets a standard invoice (F1)](/rules/simplified#sim-006) ### On the F1 path - `recipient.nif` **or** `recipient.alternative_id` is required — request rejected if both are missing - For Spanish NIFs (DNI / NIE / CIF), the **NIF and name must match the AEAT census** when the invoice goes to AEAT — BeeL. checks it before submission (the same check as the [NIF Validation API](/nif-validation/validateNif)) and rejects a mismatch with `422 NIF_NOT_IN_CENSUS` - For foreign customers, use [`alternative_id`](/verifactu/international-customers#identifying-foreign-customers) instead of `nif` **3,000 € is IVA-included.** A line at 2 600 € + 21 % IVA = 3 146 € totals over the threshold → must be F1. > **Rules that apply here:** [CNT-002 · A business customer always gets an invoice, identifying it when asked](/rules/contents#cnt-002) · [CNT-003 · A full invoice names both parties by their legal name](/rules/contents#cnt-003) · [CNT-005 · A full invoice identifies the recipient by NIF](/rules/contents#cnt-005) · [CNT-006 · A full invoice shows the address of both parties](/rules/contents#cnt-006) · [SIM-006 · An identified customer gets a standard invoice (F1)](/rules/simplified#sim-006) ## Edge cases the law handles ### Operations where F2 is not allowed Article 4.4 of the RD 1619/2012 lists operations for which «no podrá expedirse factura simplificada», among them intra-EU supplies of goods exempt under article 25 of the VAT law and certain distance sales of goods. On top of the law, BeeL. applies its own rules. Together, BeeL. rejects these on F2, from the line data: - Intra-EU supplies of goods exempt under art. 25 LIVA (`EXENTA_ART_25`), and operations not subject because they are located outside Spain (`NO_SUJETA_LOCALIZACION`, art. 4.4.d) → [`SIMPLIFICADA_FORBIDS_CROSS_BORDER`](/errors/SIMPLIFICADA_FORBIDS_CROSS_BORDER) - Operations under reverse charge (*inversión del sujeto pasivo*) → [`SIMPLIFICADA_FORBIDS_ISP`](/errors/SIMPLIFICADA_FORBIDS_ISP) - Lines carrying the equivalence surcharge → [`SIMPLIFICADA_FORBIDS_SURCHARGE`](/errors/SIMPLIFICADA_FORBIDS_SURCHARGE) - Lines carrying IRPF withholding → [`SIMPLIFICADA_FORBIDS_IRPF`](/errors/SIMPLIFICADA_FORBIDS_IRPF) The other cases of article 4.4 depend on the operation itself: for them, issue a `STANDARD` invoice. > **Rules that apply here:** [SIM-003 · Some operations can never go on a simplified invoice](/rules/simplified#sim-003) ### Why no IRPF on F2 A withholding is made and reported by the payer, who is identified. A simplified invoice issued through BeeL. never identifies its recipient, so BeeL. does not accept IRPF on it. If your customer is a business that withholds from your invoice, issue an **F1**, whatever the total. > **Rules that apply here:** [SIM-011 · No equivalence surcharge or IRPF withholding on a simplified invoice](/rules/simplified#sim-011) ### Exchanging simplified invoices for a full invoice [#upgrading-an-f2-to-f1-the-canje-case] Sometimes a customer asks for an identified invoice *after* you already issued a ticket. That is not a correction — nothing in the ticket is wrong — so it is not an `R5` corrective: exchange it. [Exchange simplified invoices for a full invoice](/invoices/createCompanySimplifiedExchange) issues a `STANDARD` invoice with the lines of one or more simplified invoices and the customer's data (RD 1619/2012, art. 15.6): ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices/simplified-exchanges" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Idempotency-Key: exchange-ticket-0042" \ -H "Content-Type: application/json" \ -d '{ "simplified_invoice_ids": ["{simplified_invoice_id}"], "recipient": { "customer_id": "{customer_id}" } }' ``` - **The full invoice** is numbered in `series_id` or in the company's default standard series, and lists the invoices it replaces in `replaced_invoice_ids`. It cannot be voided afterwards ([`EXCHANGE_INVOICE_NOT_VOIDABLE`](/errors/EXCHANGE_INVOICE_NOT_VOIDABLE)). - **Each simplified invoice** becomes `VOIDED` with `void_cause: EXCHANGED`, in the same act. Its registration is not cancelled: the full invoice replaces it. - **Same company, same environment.** Every simplified invoice must belong to the company in the path and to the environment (Test or Live) of your API key. #### With VeriFactu: recorded as F3 [#exchange-with-verifactu] When the company has VeriFactu enabled, the full invoice is recorded as `F3` (*factura emitida en sustitución de facturas simplificadas*, an invoice issued in place of simplified invoices), identifying each simplified invoice it replaces by number and issue date. The simplified invoices keep their accepted registration: they are exchanged, not cancelled, so no cancellation record is sent for them. An `F3` can only replace simplified invoices the AEAT already has. Before issuing anything, BeeL. checks the registration of each simplified invoice in `simplified_invoice_ids`: | The simplified invoice's registration | What happens | |---|---| | Accepted (`verifactu.submission_status: ACCEPTED`) | It can be exchanged | | Still pending (`PENDING`) | `422` [`EXCHANGE_SIMPLIFIED_NOT_YET_ACCEPTED`](/errors/EXCHANGE_SIMPLIFIED_NOT_YET_ACCEPTED): wait until the AEAT accepts it and send the exchange again | | Rejected (`REJECTED`) | `422` [`EXCHANGE_SIMPLIFIED_RECORD_REJECTED`](/errors/EXCHANGE_SIMPLIFIED_RECORD_REJECTED): fix or resubmit it first, then exchange it once it is accepted | | None: it was issued without VeriFactu | `422` [`SIMPLIFIED_EXCHANGE_NOT_RECORDABLE`](/errors/SIMPLIFIED_EXCHANGE_NOT_RECORDABLE): it is not on file with the AEAT, so an `F3` cannot replace it | If any of them fails, nothing is issued and the simplified invoices stay as they were. The [exchange](/invoices/createCompanySimplifiedExchange) is all or nothing. **An exchange invoice recorded as `F3` cannot be corrected yet.** A corrective on it answers `422` [`EXCHANGE_INVOICE_NOT_CORRECTABLE`](/errors/EXCHANGE_INVOICE_NOT_CORRECTABLE), and it cannot be voided either. Check the recipient and the lines before you send the exchange; if an `F3` has an error, contact support. #### Rejections [#exchange-errors] | Case | Error | Status | Why | |---|---|---|---| | An id in `simplified_invoice_ids` that is not a simplified invoice | [`EXCHANGE_REQUIRES_SIMPLIFIED`](/errors/EXCHANGE_REQUIRES_SIMPLIFIED) | `422` | One of `simplified_invoice_ids` is not a simplified invoice. Only simplified invoices are exchanged. | | A simplified invoice not issued, already voided, exchanged or corrected, or from another company or environment | [`SIMPLIFIED_NOT_EXCHANGEABLE`](/errors/SIMPLIFIED_NOT_EXCHANGEABLE) | `422` | One of `simplified_invoice_ids` cannot be exchanged: it is not issued, it was already voided, exchanged or corrected, or it belongs to another company or environment (Test or Live) than the request. | | The same simplified invoice listed more than once in `simplified_invoice_ids`: list each one once | [`EXCHANGE_DUPLICATED_SIMPLIFIED`](/errors/EXCHANGE_DUPLICATED_SIMPLIFIED) | `422` | The same simplified invoice appears more than once in `simplified_invoice_ids`. The message names it. Nothing was issued or numbered. | | With VeriFactu: a simplified invoice whose registration is still pending | [`EXCHANGE_SIMPLIFIED_NOT_YET_ACCEPTED`](/errors/EXCHANGE_SIMPLIFIED_NOT_YET_ACCEPTED) | `422` | The exchange invoice is recorded with VeriFactu as `F3`, which only replaces simplified invoices the AEAT has accepted, and the record of one of `simplified_invoice_ids` is still pending. Nothing is issued. | | With VeriFactu: a simplified invoice whose registration was rejected | [`EXCHANGE_SIMPLIFIED_RECORD_REJECTED`](/errors/EXCHANGE_SIMPLIFIED_RECORD_REJECTED) | `422` | The exchange invoice is recorded with VeriFactu as `F3`, which only replaces simplified invoices the AEAT has accepted, and the record of one of `simplified_invoice_ids` was rejected, so that invoice is not on file with the AEAT. Nothing is issued. | | With VeriFactu: a simplified invoice issued without VeriFactu | [`SIMPLIFIED_EXCHANGE_NOT_RECORDABLE`](/errors/SIMPLIFIED_EXCHANGE_NOT_RECORDABLE) | `422` | The exchange invoice is recorded with VeriFactu as `F3`, which only replaces simplified invoices already on file with the AEAT, and one of `simplified_invoice_ids` was issued without VeriFactu. Nothing is issued. | | Voiding the exchange invoice afterwards | [`EXCHANGE_INVOICE_NOT_VOIDABLE`](/errors/EXCHANGE_INVOICE_NOT_VOIDABLE) | `422` | The invoice was issued in exchange for simplified invoices, which it replaced. It cannot be voided. | | Correcting an exchange invoice recorded as `F3` | [`EXCHANGE_INVOICE_NOT_CORRECTABLE`](/errors/EXCHANGE_INVOICE_NOT_CORRECTABLE) | `422` | The invoice was issued in exchange for simplified invoices and recorded with VeriFactu as `F3`. Correcting an `F3` exchange invoice is not available yet. | Without VeriFactu, the exchange invoice is not recorded, and it is corrected like any other invoice if it has an error. > **Rules that apply here:** [SIM-007 · Exchanging a simplified invoice for a full one](/rules/simplified#sim-007) · [SIM-009 · A customer who asks to be identified gets an invoice that identifies it](/rules/simplified#sim-009) ## Canonical request shapes ### F2 (no identified recipient) ```json { "type": "SIMPLIFIED", "recipient": {}, "lines": [ { "description": "Computer repair service", "quantity": 1, "unit": "service", "unit_price": 300, "discount_percentage": 0, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" } } ], "payment_info": { "method": "CASH" } } ``` ### F1 (Spanish customer identified) ```json { "type": "STANDARD", "recipient": { "legal_name": "Comercial Martínez SL", "nif": "B12345674", "address": { "street": "Avenida de la Constitución", "number": "45", "postal_code": "41001", "city": "Sevilla", "province": "Sevilla", "country": "España" } }, "lines": [ { "description": "Business strategic consulting", "quantity": 8, "unit": "hours", "unit_price": 125, "discount_percentage": 0, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" } } ], "payment_info": { "method": "BANK_TRANSFER", "iban": "ES9121000418450200051332", "payment_term_days": 30 } } ``` ## Related - [Invoice types](/verifactu/invoice-types) — the full F1/F2/R catalogue - [Tax classification](/verifactu/tax-classification) — IVA rate, exempt operations, ISP - [International customers](/verifactu/international-customers) — when F2 is never appropriate - [Create an invoice](/invoices/createCompanyInvoice) — full request schema --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Submission states Every state a VeriFactu submission can be in, what triggers transitions, and when you need to act. A VeriFactu submission has its own lifecycle, separate from the invoice's commercial state (`DRAFT` → `ISSUED` → `PAID` …). The invoice carries a `verifactu` object on the response that holds the submission state and AEAT response — this page is the canonical map. ## Invoice status (commercial) vs VeriFactu status (fiscal) These are two different state machines on the same invoice: ```text COMMERCIAL (status) FISCAL (verifactu.submission_status) ───────────── ───────────────────── DRAFT (none — verifactu.enabled = false) ↓ issue ↓ submission sent ISSUED ── submission ──> PENDING ↓ send ↓ AEAT answers (or the record never gets there) SENT ACCEPTED, ACCEPTED_WITH_ERRORS or REJECTED ↓ pay PAID ↓ correct / void ↓ on void (cancellation record) RECTIFIED / VOIDED VOIDED ``` Subscribe to `verifactu.status.updated` to be notified of fiscal-status changes — see [Webhook events](/webhooks/events). ## The fiscal states The invoice response exposes a nested `verifactu` object. Its `submission_status` field carries the current state. The vocabulary has six values today, and new ones may be added: treat a value you do not recognise as an unknown status. | verifactu.submission_status | What it means | Terminal | What to do | |---|---|---|---| | **`PENDING`** | Submitted; AEAT has not answered yet. A temporary AEAT server error also stays PENDING while BeeL. retries it. | No — retried automatically | Wait — usually seconds. BeeL. keeps asking AEAT on its own. | | **`ACCEPTED`** | Accepted by AEAT without remarks. | Yes | Nothing. | | **`ACCEPTED_WITH_ERRORS`** | Accepted by AEAT, which also reported errors in the record (see error_code / error_message). The record stands, but the flagged data must be reviewed. | Yes | Review the data AEAT flagged and tell the user. If it was wrong, fix it in the customer's data so the following invoices carry it right. | | **`VOIDED`** | A cancellation record (registro de anulación) was accepted by AEAT. | Yes | Nothing. | | **`REJECTED`** | Not in AEAT's registry: AEAT refused it, the submission was refused before reaching AEAT, or BeeL. gave up waiting (including when the retries after a temporary AEAT error ran out). | Yes | Read error_code (AEAT's code, or null when AEAT gave none). Fix the data with a corrective (void only an invoice that should never have been issued); for a cause outside the invoice, contact BeeL. | | **`NOT_SUBMITTED`** | Issued with VeriFactu enabled but with no live record: AEAT does not know the invoice exists. | No — but not retried | Right after issuing it can still be in flight, so re-read it. If it persists, contact BeeL. with the invoice ID. | If there is no submission to describe yet, the `submission_status` is absent: drafts, scheduled invoices, proformas, and invoices whose `verifactu.enabled` is `false` (those are outside this axis entirely) — see [Auto-submit policy](/verifactu/auto-submit). An **issued** invoice with `verifactu.enabled: true` always reports a state: if no live record exists — the registration fell through and AEAT does not know the invoice exists — it reports `NOT_SUBMITTED`, which is transient right after issuing while the submission is still in flight. **The list filter uses the very same vocabulary.** `GET /invoices?verifactu_status=...` accepts `PENDING`, `ACCEPTED`, `ACCEPTED_WITH_ERRORS`, `VOIDED`, `REJECTED` and `NOT_SUBMITTED`. `ACCEPTED` does not include the records accepted with errors — a value read from an invoice can be fed straight back into the filter. Only invoices with VeriFactu enabled can match; to select the ones outside the axis (no VeriFactu record at all) use `?verifactu_enabled=false` instead. There is no `NO_VERIFACTU` value: sending it returns `422`. ### What moves on its own, and what does not While a record is `PENDING`, BeeL. keeps asking AEAT for the outcome, on a backoff. A temporary AEAT server error keeps the record `PENDING`, without `error_code` or `error_message`, while BeeL. retries it; it becomes `REJECTED` only if the retries run out. Once AEAT gives a real verdict, BeeL. stops asking, and **nothing resubmits the record for you**. What to do then is in [Handling AEAT rejections](/verifactu/handling-rejections). ### Is `ACCEPTED` final? **Yes.** Once a record reads `ACCEPTED` or `ACCEPTED_WITH_ERRORS`, BeeL. does not ask AEAT about it again, and nothing in BeeL. can move it back to `PENDING` or on to `REJECTED`. There is no late rejection to wait for, so there is no later `verifactu.status.updated` turning an accepted invoice into a rejected one. What can still happen to an accepted invoice is something **you** do, and it arrives as its own record with its own status: - you **void** it: a cancellation record is sent, and the invoice's `submission_status` becomes `VOIDED` once AEAT accepts it — see [Voiding](#voiding); - you issue a **corrective**: the corrective has its own registration, and the original stays `ACCEPTED`. What this means for reconciliation: you never need to re-check accepted invoices. The window worth sweeping is the one where a state can still change or still needs you — invoices `PENDING`, `REJECTED` or `NOT_SUBMITTED`. A sweep over the last few days, run daily, covers an outage of your own webhook endpoint; see [Reconcile, do not only listen](/verifactu/handling-rejections#reconcile-do-not-only-listen) and pace it with [Rate limits](/guides/rate-limits#pacing-a-polling-or-reconciliation-job). > **Rules that apply here:** [REC-008 · Follow submission_status and fix what AEAT rejects](/rules/records#rec-008) ## Reading the AEAT response Every submission stores the AEAT response on the invoice resource under the `verifactu` object. The relevant fields: ```json { "id": "...", "invoice_number": "INV-2026/00042", "status": "ISSUED", "verifactu": { "enabled": true, "submission_status": "ACCEPTED", "registration_number": "094365f5-9637-40e9-851a-4e964a939b0b", "registered_at": "2026-05-18T10:24:36Z", "invoice_hash": "1863E77D540083E4259F4AF44322E16B962CB5D72C2F949AB2B30FA83E93FF84", "qr_url": "https://www2.agenciatributaria.gob.es/wlpl/TIKE-CONT/ValidarQR?nif=B27534239&numserie=INV-2026%2F00042&fecha=18-05-2026&importe=121.00", "qr_base64": "iVBORw0KGgoAAAANSUhEUgAAAMgAAADI...", "skip_reason": null } } ``` The block is part of the invoice resource, so [its fields are documented with it](/invoices/getCompanyInvoice). Several of them are routinely misread: - **`enabled: false` is not a failure.** It means VeriFactu never applied to this invoice: it was issued by a NIF outside the VeriFactu regime. There is no `submission_status` to inspect in that case. - **`registration_number` is a BeeL. identifier**, not a code issued by AEAT. It identifies the submitted record, and stays `null` when the record never got that far. - **`registered_at` is when the record was submitted**, not when AEAT accepted it. - **`invoice_hash`, `qr_url` and `qr_base64` are there from `PENDING`**, and their presence does not mean AEAT accepted anything — see [QR code and the invoice PDF](/verifactu/qr-and-pdf#the-qr-exists-from-pending). - **`invoice_hash` fingerprints *this* invoice, not the chain.** It is the hash of this record as submitted. The link to the previous record is kept on the submission record and is **not published on the invoice resource**, so chain integrity is not something you can verify from the API. - **`error_code` / `error_message` are single values, not arrays**, and they are also populated on submissions AEAT accepted with errors (`ACCEPTED_WITH_ERRORS`): their presence does not by itself mean the invoice was rejected. Read `submission_status` first. `error_code` is AEAT's numeric code when AEAT gave one, or a BeeL. code such as `RECIPIENT_VAT_NOT_IN_VIES` when the submission was refused before reaching AEAT; `error_message` is **human-readable text only** — its wording and language are not stable, so show it, log it, never parse it. When there is nothing to report, both are absent from the block rather than `null`. - **Right after issuing, the block is almost empty.** The issue response, and a read in the next few seconds, carry only `enabled` and `submission_status: NOT_SUBMITTED`. The hash, QR, `registration_number` and `registered_at` appear together with `PENDING`. ## What triggers each transition | Event | Effect on `verifactu.submission_status` | |---|---| | You issue an invoice from a NIF under the regime | `NOT_SUBMITTED` for a few seconds, while the record is built → `PENDING` | | AEAT accepts the record | `PENDING` → `ACCEPTED` | | AEAT accepts the record but reports errors in it | `PENDING` → `ACCEPTED_WITH_ERRORS`, with `error_code` and `error_message` | | AEAT rejects the record | `PENDING` → `REJECTED`, with `error_code` and `error_message` | | AEAT answers with a temporary server-side error | Stays `PENDING`, with no `error_code` or `error_message`, while BeeL. retries; → `REJECTED` only if the retries run out | | The submission is refused before it reaches AEAT | `NOT_SUBMITTED` → `REJECTED`, no `error_code`, an explanatory `error_message` | | AEAT already holds a different invoice with the same number and issue date | `NOT_SUBMITTED` → `REJECTED`, no `error_code`, an `error_message` that says the number is taken ([what to do](/verifactu/handling-rejections#the-number-is-already-taken-at-aeat)) | | BeeL. stops waiting for an answer that never comes | `PENDING` → `REJECTED`; `error_message` says the submission was abandoned | | You issue a corrective on an accepted invoice | New corrective enters its own `PENDING` cycle; the original stays `ACCEPTED` (the commercial `status` flips to `RECTIFIED` / `VOIDED`) | | You void an invoice whose registration AEAT accepted | A cancellation record is sent; see [Voiding](#voiding) below | The `verifactu` block summarises the registration, so after a void its hash, number and date are still the registration record's. Each record — registration and cancellation — carries its own `submission_status` in [List the VeriFactu records of an invoice](/invoices/listCompanyInvoiceVerifactuRecords); see [Did AEAT accept the cancellation?](/verifactu/cancel-and-fix#did-aeat-accept-the-cancellation). **`REJECTED` is not one situation.** It means the invoice is not in AEAT's registry right now — because AEAT refused it, because the submission was refused before reaching AEAT, or because BeeL. gave up waiting. An `error_code` means AEAT gave a coded answer; no code means it did not — either the record never reached AEAT, or it was abandoned while waiting. How to tell them apart and what to do with each is in [Handling AEAT rejections](/verifactu/handling-rejections). ### Voiding The `verifactu` block summarises the registration, so after a void its hash, number and date are still the registration record's. What `submission_status` shows depends on the cancellation: | Situation | `status` | `verifactu.submission_status` | |---|---|---| | Cancellation sent, AEAT has not answered yet | `VOIDED` | Unchanged — still the registration's (typically `ACCEPTED`). It never goes back to `PENDING` | | AEAT accepted the cancellation | `VOIDED` | `VOIDED` | | AEAT rejected the cancellation | `VOIDED` | `REJECTED`, with the cancellation's `error_code` / `error_message` | | You voided while the registration was still `PENDING` | `VOIDED` | The registration's status. The cancellation is sent only after AEAT accepts the registration | | The registration never reached AEAT, or AEAT rejected it | `VOIDED` | Unchanged (`REJECTED`), or absent if the invoice never had a record (`NOT_SUBMITTED` before the void). **Nothing is sent to AEAT** — there is no record there to cancel | The invoice's own `status` flips to `VOIDED` immediately in every case; see [Did AEAT accept the cancellation?](/verifactu/cancel-and-fix#did-aeat-accept-the-cancellation). ## Recovering from a rejection There is no public endpoint to retry a submission. Wait on a temporary AEAT error, fix the invoice's own data with a new fiscal document, and ask support for anything outside the invoice — each case, per AEAT code, in [Handling AEAT rejections](/verifactu/handling-rejections). ## AEAT error codes `error_code` carries the code AEAT returned, unchanged. The codes you are most likely to meet — grouped by what you should do about each — are listed in [Handling AEAT rejections](/verifactu/handling-rejections#aeat-codes-by-what-to-do). The complete list is in the [AEAT VeriFactu documentation](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/informacion-tecnica.html). ## Webhooks for fiscal status changes Subscribe to `verifactu.status.updated` to be notified each time the public status changes: ```json { "type": "verifactu.status.updated", "data": { "invoice_id": "...", "invoice_number": "INV-2026/00042", "verifactu_registration_id": "...", "previous_status": "PENDING", "new_status": "ACCEPTED", "qr_url": "https://www2.agenciatributaria.gob.es/wlpl/TIKE-CONT/ValidarQR?nif=B27534239&numserie=INV-2026%2F00042&fecha=18-05-2026&importe=121.00", "qr_base64": "iVBORw0KGgoAAAANSUhEUgAAAMgAAADI...", "invoice_hash": "1863E77D540083E4259F4AF44322E16B962CB5D72C2F949AB2B30FA83E93FF84" } } ``` **Every value but `NOT_SUBMITTED` travels by webhook.** `previous_status` and `new_status` carry `PENDING`, `ACCEPTED`, `ACCEPTED_WITH_ERRORS`, `VOIDED` or `REJECTED`. `NOT_SUBMITTED` never does: it describes an invoice with no record at all, so there is no record whose status could change. `previous_status` is the status of the invoice's record of the same `operation` just before the change, also when a new submission replaces a rejected one. It is omitted only on the first notification of each `operation`, so the first notification of a cancellation has no `previous_status` even though the invoice already had a registration. **A webhook is sent when the public status changes**, and also while a record stays `REJECTED` if the reason changes (a different `error_code` or `error_message`). A submission refused before it reached AEAT, or one BeeL. stopped waiting for, arrives as `REJECTED` like any other rejection. A temporary AEAT error keeps the record `PENDING`, so it sends nothing. Your endpoint can still miss deliveries, so reconcile periodically by listing with `?verifactu_status=REJECTED` and `?verifactu_status=NOT_SUBMITTED`; see [Reconciliation](/verifactu/handling-rejections#reconcile-do-not-only-listen). See [Webhook events](/webhook-events/onVeriFactuStatusUpdated) for the full payload. ## Related - [Auto-submit policy](/verifactu/auto-submit) — when BeeL. submits in the first place - [Handling AEAT rejections](/verifactu/handling-rejections) — reading `REJECTED`, per-code actions, reconciliation - [QR code and the invoice PDF](/verifactu/qr-and-pdf) — when the QR and the final PDF exist - [What AEAT receives](/verifactu/what-aeat-receives) — why the registered total can differ from `total` - [Cancel vs amend](/verifactu/cancel-and-fix) — what to do when AEAT rejects - [Corrective invoices](/verifactu/corrective-invoices) — issuing R1–R5 --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Disbursements (suplidos) Bill back amounts you paid in the client's name with `line_type: SUPLIDO`: they stay out of the taxable base, VAT and VeriFactu, and add to `total_to_pay`. A **disbursement** (*suplido*) is money you pay to a third party **in your client's name and on their behalf**, then bill back at cost. The classic cases are court fees, notary and registry charges, official gazette fees, or a tax you settle for the client. Under **art. 78.Tres.3 LIVA**, a disbursement is not part of your taxable base: you do not add VAT to it, and it does not reach VeriFactu. You are only passing the cost through. A disbursement is not the same as a re-billed expense. If you buy something for your own activity (a plane ticket, materials) and re-invoice it, that is part of **your** taxable base and carries VAT as a normal line. It only qualifies as a disbursement when the original invoice is issued in **the client's name**, you paid it on their behalf, and you bill the exact amount with no markup. ## The three conditions For a line to be a valid disbursement, all three must hold: 1. **Issued in the client's name.** The third party's invoice names the client as the recipient, not you. 2. **Paid on their behalf.** You advanced the money for them, under an express or implied mandate. 3. **Billed at cost.** The amount you pass through equals the amount you paid, with no margin. If any condition fails, it is a normal line (`line_type: NORMAL`) and follows the usual VAT rules. ## How BeeL. models it A disbursement is a **line type**, set per line with `line_type`. Every line defaults to `NORMAL`; set it to `SUPLIDO` to exclude that line from the taxable base, VAT and VeriFactu. | Field | Type | Notes | |---|---|---| | `line_type` | `NORMAL` \| `SUPLIDO` | Defaults to `NORMAL`. Set `SUPLIDO` for a disbursement. | | `source_invoice_reference` | string (≤ 50) | Reference of the original third-party invoice issued in the client's name. **Required when `line_type: SUPLIDO`.** | | `source_invoice_ids` | array of UUID | Optional. Ids of your own issued BeeL. invoices that make up the disbursement. Their sum is the disbursement amount. For audit traceability only. | A `SUPLIDO` line ignores the tax fields (`main_tax`, `equivalence_surcharge_rate`, `irpf_rate`, `exemption_reason`): it never contributes VAT, surcharge or withholding. ### Totals Two totals capture the effect of disbursements: | Field | Meaning | |---|---| | `total_disbursements` | Sum of all `SUPLIDO` lines. Excluded from `taxable_base`, `total_vat` and VeriFactu. Defaults to `0`. | | `total_to_pay` | `invoice_total` + `total_disbursements`. The amount printed on the PDF and actually charged to the client. | When an invoice has no disbursements, `total_disbursements` is `0` and `total_to_pay` equals `invoice_total`. `invoice_total` is still the fiscal total (base + VAT + surcharge − IRPF). Disbursements never reach VeriFactu or the tax breakdowns. (The total AEAT registers also leaves IRPF out, so it is not `invoice_total` either — see [What AEAT receives](/verifactu/what-aeat-receives#the-total).) The disbursement rides on top in `total_to_pay`, which is what the client pays. ## Example A consultancy bills 1 000 € of advisory work (21 % VAT) and passes through a 150 € registry fee it paid in the client's name. ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "Cliente SL", "nif": "B12345674", "address": { "street": "Calle Mayor", "number": "1", "postal_code": "28013", "city": "Madrid", "province": "Madrid", "country": "España" } }, "lines": [ { "description": "Asesoramiento mercantil", "quantity": 10, "unit": "hours", "unit_price": 100, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" } }, { "description": "Tasa del Registro Mercantil", "quantity": 1, "unit": "unit", "unit_price": 150, "line_type": "SUPLIDO", "source_invoice_reference": "BORME-2026-4471" } ], "options": { "issue_directly": true } }' ``` Resulting totals: ```json { "totals": { "taxable_base": 1000, "total_vat": 210, "total_irpf": 0, "invoice_total": 1210, "total_disbursements": 150, "total_to_pay": 1360 } } ``` The disbursement line adds nothing to `taxable_base` (still 1 000 €) or `total_vat` (still 210 €). The client pays `total_to_pay` = 1 360 €, and only the 1 210 € `invoice_total` is reported to VeriFactu. ## Gotchas - **Adding VAT to the disbursement.** Do not set `main_tax` on a `SUPLIDO` line expecting VAT. Disbursements are outside the VAT base by definition. - **Omitting `source_invoice_reference`.** It is required. The reference ties the pass-through amount to the original invoice issued in the client's name. - **Adding a markup.** Any amount above cost turns the whole thing into a taxable service. Use a `NORMAL` line instead. See [Tax classification per line](/verifactu/tax-classification) for how normal lines are classified, and the [Glossary](/guides/glossary) for the Spanish/English term mapping. > **Rules that apply here:** [TAX-008 · Disbursements go as SUPLIDO lines, without tax](/rules/taxes#tax-008) ## Related - [What AEAT receives](/verifactu/what-aeat-receives) — why disbursements are not sent - [Tax classification per line](/verifactu/tax-classification) — classifying the taxed lines - [Amounts and rounding](/guides/amounts-and-rounding) — how totals are computed --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Tax classification per line Set `exemption_reason` on each line correctly, with the full mapping from BeeL. API values to AEAT codes (S1/S2/N1/N2/E1–E6). Every line carries an optional `exemption_reason` that tells AEAT how the operation is classified for IVA purposes. The BeeL. API uses **descriptive enum values** (`EXENTA_ART_25`, `NO_SUJETA_LOCALIZACION`, `ISP_ART_84_2_A`, etc.); BeeL. translates those to the AEAT codes (E5, N2, S2) before submission. If you leave `exemption_reason` unset, BeeL. classifies the line as **subject and not exempt** (*sujeta y no exenta*, S1) with the IVA rate you set in `main_tax.percentage`. ## Allowed `main_tax.percentage` values `main_tax.percentage` is a plain number (0–100) cross-validated against `main_tax.type`. For `type: "IVA"` the rates in play are: | Value | Rate name | Notes | |---|---|---| | `0` | Exempt | Use together with an `exemption_reason` (see below) | | `4` | Super-reduced | Basic food, books, medicines | | `10` | Reduced | Hospitality, transport, most foods | | `21` | Standard | Default for goods and services | | `5` | Temporary | Only on operations dated 2022-07-01 to 2024-09-30 | | `2`, `7.5` | Temporary | Only on operations dated 2024-10-01 to 2024-12-31 | The rates accepted on any date are 4, 10 or 21. The temporary ones no longer apply to new operations, but they stay accepted for corrective invoices and late-filed invoices of their period. The date judged is the invoice's `operation_date`, or the issue date when there is none: a temporary rate outside its period is rejected with `422` [`VAT_RATE_NOT_ACCEPTED_ON_DATE`](/errors/VAT_RATE_NOT_ACCEPTED_ON_DATE), so send the `operation_date` of the period. [List tax types](/tax-configuration/listTaxTypes) publishes each rate with its `valid_from` / `valid_until`. Each temporary rate has its own surcharge pair (see [Equivalence surcharge](/verifactu/equivalence-surcharge)). For IGIC/IPSI lines, use `main_tax.type: "IGIC"` (0, 3, 5, 7, 9.5, 15 or 20) or `"IPSI"` (0.5, 1, 2, 4, 8 or 10) — each type is validated against its own set of rates. > **Rules that apply here:** [TAX-001 · Apply the VAT rate in force when the operation took place](/rules/taxes#tax-001) · [TAX-014 · Only the VAT rates AEAT accepts on the operation date](/rules/taxes#tax-014) ## The four families ```text Operation is … │ ┌─────────────────────┼─────────────────────┐ subject to IVA not subject to IVA exempt from IVA (sujeta) (no sujeta) (exenta) │ │ │ ┌────┴────┐ │ │ S1 S2 N1 or N2 E1, E2, E3, E4, E5, E6 normal ISP (location / (legal exemption) general rules) ``` > **Rules that apply here:** [CNT-001 · Every operation of the business is invoiced, exempt ones included](/rules/contents#cnt-001) ## Mapping table: BeeL. API value ↔ AEAT code | AEAT code | BeeL `exemption_reason` value | When to use | |---|---|---| | **S1** (default) | *omit the field* | Default — subject to IVA, normal seller-collects | | **S2** | `ISP_ART_84_2_A` … `ISP_ART_84_2_F` | ISP — buyer self-assesses the IVA (the letter of Art. 84.Uno.2.º LIVA that applies) | | **N1** | `NO_SUJETA_ART_7_9` | Not subject by general rules (internal transfers, etc.) | | **N2** | `NO_SUJETA_LOCALIZACION` | Operation localised outside Spain (intra-EU services, services to non-EU) | | **E1** | `EXENTA_ART_20` | Educational, medical, social, insurance, residential rental | | **E2** | `EXENTA_ART_21` | Exports of goods to non-EU territories | | **E3** | `EXENTA_ART_22` | International transport, customs zone operations | | **E4** | `EXENTA_ART_24` | Bonded warehouse operations | | **E5** | `EXENTA_ART_25` | Intra-EU sales of goods to a business with valid VIES VAT-ID | | **E6** | `EXENTA_ART_140` | Investment gold (Art. 140 bis LIVA), usually with `regime_key: "04"` | | **E6** | `OTRO` | Any other case not covered above. Requires `exemption_reason_text` | | ❌ rejected | `EXENTA_ART_26` | Art. 26 exempts the buyer's intra-EU acquisition, not a supply you invoice — see below | | ❌ rejected | `ISP_ART_84_2_G` | The law requires these supplies in a special series — see below | | ❌ rejected | `REGIMEN_ART_129` / `REGIMEN_ART_135` / `REGIMEN_ART_141` / `REGIMEN_ART_154` / `REGIMEN_ART_163_DECIES` | Rejected by the API — see below | Only `EXENTA_ART_140` and `OTRO` map to **E6**; `ISP_*` maps to S2 and `NO_SUJETA_*` to N1/N2. **Special-regime values are rejected, not reported as E6.** The `REGIMEN_ART_*` values describe special regimes (agriculture compensation, used goods, travel agencies, equivalence surcharge, cash basis), not exemptions under arts. 20–26 LIVA, and AEAT models them with the regime key rather than as an exempt operation. A line carrying one of them is rejected — whether or not the NIF is under VeriFactu — with [`EXEMPTION_REGIME_NOT_SUPPORTED_IN_VERIFACTU`](/errors/EXEMPTION_REGIME_NOT_SUPPORTED_IN_VERIFACTU) when you create or update the invoice. Drop the `exemption_reason` and set the matching `main_tax.regime_key` instead — see [Regime keys](/verifactu/regime-keys). **Two values of the enum are rejected on an invoice line.** `EXENTA_ART_26` exempts the *acquisition* the buyer declares, not a supply the seller invoices: a line carrying it answers `422` [`EXEMPTION_NOT_FOR_ISSUED_INVOICE`](/errors/EXEMPTION_NOT_FOR_ISSUED_INVOICE), and a supply of goods to another Member State is `EXENTA_ART_25`. `ISP_ART_84_2_G` (silver, platinum, palladium, mobile phones, consoles, laptops and tablets) must be invoiced in a special series the API does not have: `422` [`REVERSE_CHARGE_CASE_NOT_SUPPORTED`](/errors/REVERSE_CHARGE_CASE_NOT_SUPPORTED). A corrective invoice of an original that already carried one of them keeps it. When in doubt between `NO_SUJETA_LOCALIZACION` (N2) and `EXENTA_ART_25` (E5) for intra-EU operations, the rule is simple: **goods → E5**, **services → N2**. See [International customers](/verifactu/international-customers). > **Rules that apply here:** [CNT-010 · An exempt operation states why it is exempt](/rules/contents#cnt-010) ## How you set it in the API The `exemption_reason` lives **directly on each line**. There's also an optional `exemption_reason_text` to add free-text context. ### B2B intra-EU services (N2) ```json { "lines": [ { "description": "Consulting services to EU business", "quantity": 1, "unit": "service", "unit_price": 1000, "discount_percentage": 0, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" }, "exemption_reason": "NO_SUJETA_LOCALIZACION", "exemption_reason_text": "Operation not subject to Spanish VAT under Art. 69 LIVA" } ] } ``` ### B2B intra-EU goods (E5) ```json { "lines": [ { "description": "Hardware supply to EU customer", "quantity": 1, "unit": "unit", "unit_price": 1000, "discount_percentage": 0, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" }, "exemption_reason": "EXENTA_ART_25" } ] } ``` ### Reverse charge (*inversión del sujeto pasivo*, S2) [#inversión-del-sujeto-pasivo-s2] ```json { "lines": [ { "description": "Construction services subject to reverse charge", "quantity": 1, "unit": "project", "unit_price": 1000, "discount_percentage": 0, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" }, "exemption_reason": "ISP_ART_84_2_F" } ] } ``` Pick the letter of Art. 84.Uno.2.º LIVA that applies: `_A` (supplier not established in Spain), `_B` (unwrought or semi-finished gold), `_C` (scrap, waste and recovery materials), `_D` (greenhouse gas emission allowances), `_E` (certain real estate supplies) or `_F` (construction or renovation works). `_G` is rejected (see above). > **Rules that apply here:** [CNT-012 · A reverse-charge invoice carries the mention «inversión del sujeto pasivo»](/rules/contents#cnt-012) · [TAX-002 · Reverse-charge operations are invoiced without charging VAT](/rules/taxes#tax-002) ### Exempt educational service (E1) ```json { "lines": [ { "description": "Training course", "quantity": 1, "unit": "course", "unit_price": 500, "discount_percentage": 0, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "01" }, "exemption_reason": "EXENTA_ART_20" } ] } ``` > **Rules that apply here:** [CNT-010 · An exempt operation states why it is exempt](/rules/contents#cnt-010) ## Rules BeeL. enforces | Rule | What happens if you break it | |---|---| | If `exemption_reason` is set, `main_tax.percentage` must be `0` and `equivalence_surcharge_rate` must not be set | Rejected at issuance | | `EXENTA_ART_25` (E5) requires the customer to have an `alternative_id` of type `NIF_IVA` | Rejected — E5 is reserved for intra-EU B2B with VAT-ID | | `EXENTA_ART_21` (E2) and `EXENTA_ART_22` (E3) cannot use `regime_key: "01"` — exports go under `"02"`, which BeeL. doesn't set for you | Rejected — [`EXEMPTION_INCOMPATIBLE_WITH_REGIME`](/errors/EXEMPTION_INCOMPATIBLE_WITH_REGIME) | | `regime_key: "02"` requires `EXENTA_ART_21` or `EXENTA_ART_22` on the line | Rejected — [`REGIME_REQUIRES_INCOMPATIBLE_EXEMPTION`](/errors/REGIME_REQUIRES_INCOMPATIBLE_EXEMPTION) | | `ISP_*` cannot pair with `equivalence_surcharge_rate` | Rejected — [`ISP_INCOMPATIBLE_WITH_SURCHARGE`](/errors/ISP_INCOMPATIBLE_WITH_SURCHARGE): the buyer self-assesses the VAT in their own regime, so the Spanish retail surcharge doesn't apply | | Default (no `exemption_reason`) requires `main_tax.percentage > 0` | Rejected — [`EXEMPT_ZERO_RATE_REQUIRES_REASON`](/errors/EXEMPT_ZERO_RATE_REQUIRES_REASON): a 0 % line must declare one of `EXENTA_ART_20..25`, `EXENTA_ART_140`, `NO_SUJETA_ART_7_9`, `NO_SUJETA_LOCALIZACION`, `ISP_ART_84_2_*` or `OTRO` | | `OTRO` requires a free-text `exemption_reason_text` | Rejected | > **Rules that apply here:** [TAX-003 · Reverse-charge lines carry no tax and never go on a simplified invoice](/rules/taxes#tax-003) · [TAX-005 · Exempt and non-subject lines carry no VAT rate](/rules/taxes#tax-005) ## Decision tree ```text Where is the customer? ├─ In Spain │ ├─ Operation is subject to IVA? │ │ ├─ Yes, normal seller-collects-IVA → omit exemption_reason (S1) │ │ ├─ Yes, ISP applies → ISP_ART_84_2_A … _F (S2) │ │ └─ Yes, but exempted by law → EXENTA_ART_20 ... 24, EXENTA_ART_140 (E1–E4, E6) │ └─ Not subject (out-of-scope op) → NO_SUJETA_ART_7_9 (N1) │ ├─ EU country (intra-community) │ ├─ Customer is B2B with VIES VAT-ID │ │ ├─ Selling goods → EXENTA_ART_25 (E5) │ │ └─ Selling services → NO_SUJETA_LOCALIZACION (N2) │ └─ Customer is B2C (no VIES) │ ├─ Under 10 000 € OSS threshold → omit (S1) — apply Spanish IVA │ └─ Over OSS threshold → main_tax.regime_key="17" + destination rate (no exemption_reason) │ └─ Non-EU ├─ Selling goods (export) → EXENTA_ART_21 + main_tax.regime_key="02" └─ Selling services → NO_SUJETA_LOCALIZACION ``` The full payload examples for each path live in [International customers](/verifactu/international-customers). > **Rules that apply here:** [TAX-018 · An issued invoice does not use the intra-EU acquisition exemption](/rules/taxes#tax-018) ## Related - [International customers](/verifactu/international-customers) — every B2B/B2C scenario in full - [Regime keys](/verifactu/regime-keys) — when `main_tax.regime_key` is required alongside the classification - [Equivalence surcharge](/verifactu/equivalence-surcharge) — incompatible with ISP and exempt lines - [Create an invoice](/invoices/createCompanyInvoice) — full line schema --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Territorial taxes (IVA, IGIC, IPSI) When to use IVA, IGIC (Canary Islands), or IPSI (Ceuta & Melilla) — and which `main_tax.type` value to send. Spain has three territorial IVA-equivalent taxes. The right one depends on **where the operation is localised**, not on the issuer's address. Most lines run on IVA; switch to IGIC or IPSI when the operation happens in those territories. This page is the canonical reference for `main_tax.type` values and the rate menus per tax. ## The three taxes | `main_tax.type` | Tax | Territory | AEAT `impuesto` code | |---|---|---|---| | **`IVA`** | Value added tax (*Impuesto sobre el Valor Añadido*) | Peninsula + Balearic Islands | `01` | | **`IPSI`** | Production, services and import tax (*Impuesto sobre la Producción, Servicios e Importación*) | Ceuta & Melilla | `02` | | **`IGIC`** | Canary Islands general indirect tax (*Impuesto General Indirecto Canario*) | Canary Islands | `03` | | **`OTHER`** | Other taxes | Rare — reserved for non-Spanish taxes carried on the invoice | `05` | `IVA` is what almost every line uses, but it is not implicit: `main_tax` requires both `type` and `percentage`. Only `regime_key` may be omitted (it falls back to `"01"`). ## How you set it in the API `main_tax.type`, `main_tax.percentage`, and `main_tax.regime_key` are sibling fields on each line: ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "STANDARD", "recipient": { "legal_name": "Importaciones Atlántico SL", "nif": "B12345674", "address": { "street": "Avenida Marítima", "number": "200", "postal_code": "35001", "city": "Las Palmas de Gran Canaria", "province": "Las Palmas", "country": "España" } }, "lines": [ { "description": "Industrial air conditioning systems", "quantity": 3, "unit": "unit", "unit_price": 3500, "discount_percentage": 0, "main_tax": { "type": "IGIC", "percentage": 7, "regime_key": "01" } } ] }' ``` ## Rate menus per tax ### IGIC (Canary Islands) | `main_tax.percentage` | Use | |---|---| | `0` | Zero rate (essentials, intra-canary exports) | | `3` | Reduced rate (some food, transport) | | `5` | Special reduced rate (temporary energy/utility measures) | | `7` | General rate | | `9.5` | Increased rate (vehicles, mid-tier goods) | | `15` | Special increased rate (luxury) | | `20` | Tobacco products | ### IPSI (Ceuta & Melilla) Rates are set per municipality and per product category. The API accepts 0.5, 1, 2, 4, 8 or 10 % — any other percentage on an `IPSI` line is rejected. Check the tax bylaw (*Ordenanza Fiscal*) of the specific city. | `main_tax.percentage` | Typical use | |---|---| | `0.5` | Super-reduced (social housing, games, advertising) | | `1` | Reduced (taxis, bars, electricity) | | `2` | Intermediate (restaurants, hospitality) | | `4` | Medium (renovations, real estate) | | `8` | High (telecommunications, electronic services) | | `10` | General (construction) | ```json { "lines": [ { "description": "Servicio en Ceuta", "quantity": 1, "unit": "service", "unit_price": 200, "discount_percentage": 0, "main_tax": { "type": "IPSI", "percentage": 4, "regime_key": "01" } } ] } ``` ### IVA | `main_tax.percentage` | Use | |---|---| | `0` | Exempt or out-of-scope (set `exemption_reason` — see [Tax classification](/verifactu/tax-classification)) | | `4` | Super-reduced rate — basic foodstuffs, books | | `5` | Temporary: only on operations dated 2022-07-01 to 2024-09-30 | | `2`, `7.5` | Temporary: only on operations dated 2024-10-01 to 2024-12-31 | | `10` | Reduced rate — hospitality, transport | | `21` | General rate | A temporary rate outside its period answers `422` [`VAT_RATE_NOT_ACCEPTED_ON_DATE`](/errors/VAT_RATE_NOT_ACCEPTED_ON_DATE); the date judged is the invoice's `operation_date`, or the issue date when there is none. ## Mixing taxes on the same invoice Different lines on the same invoice can carry different taxes — for example, a service partly delivered in the peninsula (IVA) and partly in the Canary Islands (IGIC): ```json { "lines": [ { "description": "Consultoría en Madrid", "quantity": 1, "unit_price": 1000, "discount_percentage": 0, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "01" } }, { "description": "Consultoría en Tenerife", "quantity": 1, "unit_price": 1000, "discount_percentage": 0, "main_tax": { "type": "IGIC", "percentage": 7, "regime_key": "01" } } ] } ``` BeeL. groups the totals per `main_tax.type` in the response and submits each line under the correct AEAT `impuesto` code. ## When to pick which The decision tracks the **place of supply** of the operation, not the issuer's tax address: - Goods physically delivered or services consumed in the Canary Islands → **IGIC** - Goods or services consumed in Ceuta or Melilla → **IPSI** - Everything else inside Spain → **IVA** If you're a self-employed person on the peninsula invoicing a Canary client for a service used in the Canaries, IGIC applies — not IVA. Likewise, a Canary issuer invoicing a peninsular client for a service consumed in the peninsula uses IVA. BeeL. doesn't auto-detect the place of supply — it trusts what you set. When the customer's address is in the Canaries, IPSI territory, or another EU country, double-check the line classification before issuing. ## Mixed-territory regime (`main_tax.regime_key: "08"`) `"08"` declares an operation subject to **another** indirect tax: IPSI or IGIC on an IVA line, IPSI or IVA on an IGIC line. It is rare, and it is **not** the general regime of IGIC — an ordinary IGIC line uses `"01"`. AEAT only accepts it on a line with `exemption_reason: NO_SUJETA_LOCALIZACION` at 0 %; otherwise the line is rejected with `422` [`REGIME_KEY_CLASSIFICATION_NOT_ACCEPTED`](/errors/REGIME_KEY_CLASSIFICATION_NOT_ACCEPTED). See [Regime keys](/verifactu/regime-keys). ## Related - [Tax classification](/verifactu/tax-classification) — applies the same way regardless of IVA / IGIC / IPSI (SSoT) - [Regime keys](/verifactu/regime-keys) — `"08"` and what AEAT requires with each key (SSoT) - [Create an invoice](/invoices/createCompanyInvoice) — full line schema --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Testing VeriFactu in sandbox How VeriFactu behaves in sandbox — always on, registered against AEAT's test environment, no representation to sign — and the few ways it differs from Live. Sandbox runs the same VeriFactu flow as Live — issue, submit, `PENDING`, AEAT's answer, QR, cancellation — against **AEAT's test environment** instead of the real one. Nothing you issue there is a real invoice, and nothing reaches the real AEAT registry. ## Access, cost and time limits - **Access.** Sign up at [app.beel.es/signup](https://app.beel.es/signup) and create a key with the `beel_sk_test_` prefix — see [API keys](/auth/api-keys). No card is needed. - **Cost.** Free. Only production is billed, and sandbox invoices never count towards a plan's invoices — see [Pricing](/pricing#what-counts-as-an-invoice). - **Time limit.** None: the sandbox does not expire. - **Limits.** The same [rate limits](/guides/rate-limits) as production, and a lower email quota — in sandbox, email only goes to your own address ([Sending email](/guides/sending-email#sandbox-only-sends-to-your-own-address)). BeeL.'s [Terms](https://beel.es/terminos) reserve the right to set usage limits on the sandbox. ## Can I build the whole integration in sandbox? Yes. The base URL, the endpoints and the responses are the same as in production; only the key changes. The one exception is the [NIF validation endpoint](#nif-validation-is-simulated), which answers with simulated data. Everything else that checks a NIF still uses the real AEAT census in sandbox, see [below](#the-census-is-real-everywhere-else). You can create NIFs, issue every invoice type, correct and void, receive webhooks and follow each VeriFactu record through AEAT's test environment. Two things can only be done in Live, because they have no test mode: **signing the representation** of a NIF, and the **billing** of a NIF switched on in Live. Going live is switching the NIF on in Live, signing its representation and swapping the key — see [Enabling VeriFactu for a NIF](/verifactu/enabling-verifactu). ## What is different from Live | | Sandbox | Live | |---|---|---| | VeriFactu | **Always on.** Every invoice of the NIF is submitted | On only once you [enable it](/verifactu/enabling-verifactu) | | Turning it off | Not possible — `enabled: false` returns `422` [`VERIFACTU_ALWAYS_ON_IN_SANDBOX`](/errors/VERIFACTU_ALWAYS_ON_IN_SANDBOX) | `PUT … { "enabled": false }` | | Representation | **Not needed** — there is nothing to authorise | Must be signed before enabling | | NIF registration | Done for you, asynchronously | Done in the enabling call | | Where submissions go | AEAT's test environment | AEAT | | QR code | Points to AEAT's test validation service | Points to AEAT's validation service | | NIF validation endpoint (`/nif/validate`) | **Simulated.** Only the syntax is checked; the AEAT register is not queried | Checked against the AEAT register | | Creating a company or a customer, issuing | Checked against the real AEAT census | Checked against the AEAT census | ## NIF validation is simulated [`POST /v1/nif/validate`](/nif-validation/validateNif) does not query the AEAT register in sandbox. It still checks the syntax, so you can exercise every branch of your flow: - A well-formed NIF comes back `VALID`, with the `legal_name` you sent, `legal_name_verified: false` and no `census_status`. - A malformed NIF, or one with a wrong control character, comes back `INVALID`, as in Live. To check a NIF against the real register, call the endpoint with a Live key. This applies to API keys and to the [MCP server](/mcp) connected to Test. ## The census is real everywhere else [#the-census-is-real-everywhere-else] Only `/nif/validate` is simulated. Creating a company, creating a customer and issuing check the NIF against the real AEAT census in sandbox too, so use real NIFs. For an individual, AEAT checks the NIF together with the name: a NIF that is not in the census and a name that does not match it get the same answer from AEAT, so both are `422` [`NIF_VALIDATION_INVALID`](/errors/NIF_VALIDATION_INVALID) when creating a company. ## VeriFactu is always on In sandbox `enabled` is a constant of the mode, not a decision: the configuration always reads `enabled: true`, and every invoice you issue there goes through the full VeriFactu cycle. That is deliberate — the point of the sandbox is to exercise the path your Live integration will take. ## The NIF registers itself You don't enable anything in sandbox, so BeeL. registers the NIF in AEAT's test environment on its own — when the NIF is switched on in Test, and again on its first submission if that earlier attempt did not go through. Because that registration travels asynchronously, `nif_status` can read `DEACTIVATED` or `null` for a short while after you start, even though `enabled` is already `true`. It does not block you: issuing in sandbox does not wait for it. If `nif_status` stays that way after your first invoice has been submitted, contact support. ## Where the submission goes Submissions go to AEAT's test environment, so the whole lifecycle is real — AEAT validates the record and answers — but nothing is registered for real. The `qr_url` of a sandbox invoice points to AEAT's **test** validation service (for example `https://prewww2.aeat.es/wlpl/TIKE-CONT/ValidarQR?…`), not the production one. Don't print a sandbox QR on a document you hand to a customer. Timings in the test environment can be slower than in Live; a cancellation, for instance, can take a few minutes to reach `VOIDED`. ## `ENV_MISMATCH` A NIF operates in each environment separately. If you call with a test key for a NIF that is switched on only in Live, issuing is blocked with [`ENV_MISMATCH`](/errors/ENV_MISMATCH), and `GET /v1/companies/{company_id}/issuing-readiness` lists it as a blocker. Switch the NIF on in Test with the [activations endpoint](/multi-nif/companies#switching-a-nif-on-in-test-or-live) — free and immediate — or use the key of the environment where it is active. ## A Stripe test account is not a sandbox submission Whether an invoice goes to AEAT's test environment is decided by the NIF and environment you issue under, not by the Stripe account that paid. A payment from a Stripe test account does not, on its own, make the resulting invoice a test submission. See [Stripe / VeriFactu submission](/stripe/verifactu-submission). > **Rules that apply here:** [LIF-003 · Test in the sandbox, never with real invoices](/rules/lifecycle#lif-003) ## Related - [Enabling VeriFactu for a NIF](/verifactu/enabling-verifactu) — the Live path - [Submission states](/verifactu/submission-states) — the same states in both environments - [QR code and the invoice PDF](/verifactu/qr-and-pdf) — when the QR exists --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # What AEAT receives from your invoice How BeeL. turns your invoice into the record AEAT registers — the description, the total, the number, the recipient and the late-submission flag — and why some of them differ from what you see on the invoice. AEAT does not receive your invoice as you sent it: it receives a billing record (*registro de facturación*) built from it, with AEAT's own fields and rules. Most of it is a straight copy. A few fields are derived, and those are the ones that surprise integrators reconciling against AEAT. ## The description AEAT requires a description of the operation for the whole invoice. BeeL. takes it from, in order: 1. the invoice's `notes`, if set; 2. otherwise, the description of the **first line** that has one — skipping disbursements (*suplidos*), which AEAT never receives; 3. otherwise, a fixed generic description. Long text is cut to AEAT's maximum length (500 characters), counted as AEAT counts it: in UTF-16 code units, so an emoji or any other character outside the Basic Multilingual Plane takes two. If the text AEAT shows for an invoice matters to you, put it in `notes`. The recipient's name is not cut: AEAT takes at most 120 of those units, and a longer `legal_name` is rejected when the invoice is issued, before it is numbered ([`FIELD_TOO_LONG`](/errors/FIELD_TOO_LONG)). ## The total The total AEAT receives is **not** your invoice's `totals.invoice_total`, nor its `totals.total_to_pay`. It is the sum, over the lines AEAT receives, of each line's **base + VAT + equivalence surcharge**: - **IRPF is not included.** Withholding is declared separately; it is not part of the operation AEAT registers. - **Disbursements are not included.** They are not part of the taxable operation, so AEAT never receives them. - **OSS lines (`regime_key: "17"`) contribute their base only.** The destination country's VAT is settled through the OSS return, not in Spain. A worked example: ```text Line 1 base 1 000.00 VAT 21 % 210.00 → 1 210.00 Line 2 base 200.00 VAT 21 % 42.00 surcharge 5.2 % 10.40 → 252.40 Disbursement (court fee paid for the client) 50.00 → not sent IRPF 15 % on line 1 -150.00 → not sent totals.invoice_total: 1 210.00 + 252.40 − 150.00 = 1 312.40 totals.total_to_pay: 1 312.40 + 50.00 = 1 362.40 Total AEAT receives: 1 210.00 + 252.40 = 1 462.40 ``` So when you compare an invoice with its AEAT record — or with the `importe` in its QR URL — expect them to differ whenever the invoice has IRPF, disbursement or OSS lines. Both are correct for what they measure. > **Rules that apply here:** [TAX-009 · IRPF withholding is not part of the total AEAT receives](/rules/taxes#tax-009) · [QRC-005 · Use qr_url exactly as returned](/rules/qr#qrc-005) ## The invoice number The number is sent **whole**, exactly as it appears on the invoice (for example `F-2026/00042`), including the series prefix. AEAT identifies the record by that number, the issuing NIF and the issue date — which is why a used number can never be reused, even after a void. ## The recipient | Invoice | Recipient sent to AEAT | |---|---| | Standard (F1), exchange invoice (F3) and correctives R1–R4 | Name plus NIF, or plus `alternative_id` for a foreign customer | | Simplified (F2) and its corrective R5 | **None** | BeeL. sends no recipient data on these types. On top of that, BeeL. does not accept an identified recipient on a simplified invoice you create: it issues that invoice as a standard one — see [Simplified vs standard](/verifactu/simplified-vs-standard). For standard invoices, AEAT checks the recipient's NIF and name against its census; a mismatch is what usually produces an [accepted-with-errors](/verifactu/handling-rejections#accepted-with-errors) result. ## Dates and late submission The record carries the invoice's issue date and, when you set one, its `operation_date` — always the **original** dates. BeeL. never re-dates an invoice to make a submission fit. Normally the registration goes out the same day the invoice is issued. When it goes out on a **different day**, BeeL. flags the record as a late submission automatically, in the field AEAT's record format provides for it. Article 16.4 of the Orden HAC/1177/2024 requires a system that could not submit because of a technical incident to submit «en cuanto sea posible», in order, and to indicate it in that field. You cannot set the flag; BeeL. sets it from the dates. > **Rules that apply here:** [DAT-002 · The issue date is the day the billing record is generated](/rules/dates#dat-002) · [REC-007 · Keep invoicing when AEAT is unreachable](/rules/records#rec-007) · [SIM-005 · The record of a simplified invoice carries no recipient](/rules/simplified#sim-005) · [REC-001 · Each issued invoice gets a billing record built from its data](/rules/records#rec-001) ## Related - [Tax classification](/verifactu/tax-classification) — how each line's `exemption_reason` becomes an AEAT code - [Invoice types](/verifactu/invoice-types) — how `type` and `rectification_code` become F1, F2, F3, R1–R5 - [Disbursements](/verifactu/suplidos) — why they stay off the record - [QR code and the invoice PDF](/verifactu/qr-and-pdf) — the other thing built from the record --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Conservation How long issued invoices and their records are kept, by whom, and what to export before changing systems. [← All rules](/rules#all-rules) Keeping invoices is the issuing business's duty. Under VERI*FACTU AEAT keeps the billing records, but not the invoices themselves. 4 rules: 3 from the law, 1 AEAT criterion. [How to read a rule](/rules#how-to-read-a-rule). ## CON-001 · Keep copies of issued invoices for the limitation period `Required` · Law · Impact: high · Responsibility: the issuing business. The issuing business keeps copies of the invoices it issues, with their original content and in order, for the limitation period of the General Tax Law, four years, and for the six years the Commercial Code sets for a business's documents. **Why:** AEAT can ask for any invoice within that period. Keeping copies is the issuer's duty even when someone else keeps them materially. **Applies to:** Every issued invoice. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 19.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a19) > «Los documentos deben conservarse con su contenido original, ordenadamente y en los plazos y con las condiciones fijados por este Reglamento.» - Ley 37/1992 del IVA, art. 165.Uno — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a165) > «las copias de las facturas expedidas, deberán conservarse, incluso por medios electrónicos, durante el plazo de prescripción del Impuesto.» - Ley 58/2003 General Tributaria, art. 66 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2003-23186#a66) > «Prescribirán a los cuatro años los siguientes derechos:» - Código de Comercio, art. 30.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1885-6627#art30) > «Los empresarios conservarán los libros, correspondencia, documentación y justificantes concernientes a su negocio, debidamente ordenados, durante seis años» **Incorrect:** Assuming invoices can be discarded once the quarter is filed. **Correct:** Keeping every issued invoice, PDF and data, for the whole period, in order. **Related:** [CON-002 · AEAT keeps the records, not your invoices](/rules/conservation#con-002) · [CON-003 · Export your invoices before leaving](/rules/conservation#con-003) · [CON-004 · Invoices kept electronically are reachable on request](/rules/conservation#con-004) **Explained in:** [Compliance and responsibilities › What BeeL. keeps for each invoice](/verifactu/compliance-and-responsibilities#what-beel-keeps-for-each-invoice) ## CON-002 · AEAT keeps the records, not your invoices `Required` · AEAT criterion · Impact: medium · Responsibility: the issuing business. Under VERI*FACTU AEAT keeps the billing records, but a record does not contain the whole invoice: its lines, for one, are not in it. Keep the full invoices yourself. **Why:** Relying on AEAT's copy leaves you without the detail of each invoice when you are asked for it. **Applies to:** Invoices of a company under VeriFactu. **Legal basis:** - AEAT, Aclaraciones a dudas de los desarrolladores (v1.3), 13. Conservación de registros en VERI*FACTU y libros registros — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/FAQs-Desarrolladores.pdf) > «Por lo que se refiere a las Facturas Completas, estas deben conservarse en la [...] medida en que el Registro no contiene la totalidad del detalle de las facturas (por ejemplo las líneas de facturación).» **Incorrect:** Keeping only the AEAT registration numbers and discarding the invoices. **Correct:** Keeping each invoice's PDF and data, lines included. **Related:** [CON-001 · Keep copies of issued invoices for the limitation period](/rules/conservation#con-001) · [CON-003 · Export your invoices before leaving](/rules/conservation#con-003) **Explained in:** [Compliance and responsibilities › What BeeL. keeps for each invoice](/verifactu/compliance-and-responsibilities#what-beel-keeps-for-each-invoice) ## CON-003 · Export your invoices before leaving `Required` · Law · Impact: medium · Responsibility: the issuing business. The issuing business keeps its invoices for the whole conservation period, also after it stops using a billing system. Export the invoices and their PDFs before closing the account; keeping their billing records as well is advisable. **Why:** The duty to keep the invoices does not end with the use of a system. Under VERI*FACTU the regulation sets no duty to keep the records, which AEAT keeps, but having them makes each invoice easier to trace. **Applies to:** operations [`POST /v1/companies/{company_id}/invoices/exports`](/invoices/createCompanyInvoiceExport), [`POST /v1/companies/{company_id}/invoices/pdf-archive`](/invoices/createCompanyInvoicePdfArchive) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 19.1 y 19.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a19) > «Los empresarios o profesionales deberán conservar, durante el plazo previsto en la Ley 58/2003, de 17 de diciembre, General Tributaria, los siguientes documentos: [...] 2. Los documentos deben conservarse con su contenido original, ordenadamente y en los plazos y con las condiciones fijados por este Reglamento.» - AEAT, Aclaraciones a dudas de los desarrolladores (v1.3), 13. Conservación de registros en VERI*FACTU y libros registros — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/FAQs-Desarrolladores.pdf) > «Cuando se utilicen sistemas VERI*FACTU, las obligaciones de conservación de los registros NO aparecen reguladas en la normativa [...] No obstante, por razones de funcionalidad del sistema (no por obligación reglamentaria), parece lógico que dichos sistemas también conserven esos mismos registros.» **Incorrect:** Closing the account at the end of the year with no copy of that year's invoices. **Correct:** Exporting the invoices and downloading their PDFs first. ```bash curl -X POST "https://app.beel.es/api/v1/companies/{company_id}/invoices/exports" \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "format": "ITEMS", "filters": { "date_from": "2026-01-01", "date_to": "2026-12-31" } }' \ -o invoices-2026.xlsx ``` **Related:** [CON-001 · Keep copies of issued invoices for the limitation period](/rules/conservation#con-001) · [CON-004 · Invoices kept electronically are reachable on request](/rules/conservation#con-004) **Explained in:** [Bulk operations and exports › Exports](/guides/bulk-operations-and-exports#exports) ## CON-004 · Invoices kept electronically are reachable on request `Required` · Law · Impact: low · Responsibility: the issuing business. Invoices kept electronically must be available online, so that AEAT can view, download and use them on request without undue delay. **Why:** Copies you cannot produce when AEAT asks count as copies you do not have. **Applies to:** Invoices kept by electronic means. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 21.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a21) > «Los documentos conservados por medios electrónicos deberán ser gestionados y conservados por medios que garanticen un acceso en línea a los datos así como su carga remota y utilización por parte de la Administración tributaria ante cualquier solicitud de esta y sin demora injustificada.» **Incorrect:** Archiving the invoices on a disk nobody can reach remotely. **Correct:** Keeping them where they can be searched and downloaded when AEAT asks. **Related:** [CON-001 · Keep copies of issued invoices for the limitation period](/rules/conservation#con-001) · [CON-003 · Export your invoices before leaving](/rules/conservation#con-003) **Explained in:** [Bulk operations and exports › Exports](/guides/bulk-operations-and-exports#exports) [← All rules](/rules#all-rules) ## Related - [Bulk operations and exports](/guides/bulk-operations-and-exports) — issue, mark, download, email and export many invoices at once, and create or delete customers and products in batches — and how to read what came back - [Compliance and responsibilities](/verifactu/compliance-and-responsibilities) — what BeeL. does for each invoice, who signs its declaración responsable, the rules that apply to software built on the API and to the issuing business, the VERI*FACTU modality, and what BeeL. keeps for each record --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Invoice contents What every invoice has to say: when one is due, who the parties are, how operations and taxes are shown, and the mentions some operations require. [← All rules](/rules#all-rules) The content of an invoice is fixed by law, and much of it comes from data you send: the recipient, the lines and how each line is classified. BeeL. fills in the issuer's data and computes the taxes; these rules say what the rest must contain. 26 rules: 22 from the law, 3 AEAT criteria, 1 BeeL. rule. [How to read a rule](/rules#how-to-read-a-rule). ## CNT-001 · Every operation of the business is invoiced, exempt ones included `Required` · Law · Impact: medium · Responsibility: the issuing business. Issue an invoice, full or simplified, for every supply of goods or services the business makes, including operations that are not subject to VAT or are exempt, except where the invoicing regulation says one is not needed. **Why:** A missing invoice is a breach of the invoicing obligation in itself, whatever tax it would have carried. **Applies to:** Every supply of goods or services made in the course of business. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 2.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a2-2) > «los empresarios o profesionales están obligados a expedir factura y copia de esta por las entregas de bienes y prestaciones de servicios que realicen en el desarrollo de su actividad, incluidas las no sujetas y las sujetas pero exentas del Impuesto» **Incorrect:** Leaving a course taught to a customer out of the books because it is exempt from VAT. **Correct:** Invoicing the course with a line classified as exempt, so the invoice states the exemption. **Related:** [CNT-002 · A business customer always gets an invoice, identifying it when asked](/rules/contents#cnt-002) · [CNT-010 · An exempt operation states why it is exempt](/rules/contents#cnt-010) · [CNT-023 · Some operations are always invoiced, whoever the customer](/rules/contents#cnt-023) **Explained in:** [Tax classification per line › The four families](/verifactu/tax-classification#the-four-families) ## CNT-002 · A business customer always gets an invoice, identifying it when asked `Required` · Law · Impact: medium · Responsibility: the issuing business. When the recipient is a business or professional acting as such, or asks for an invoice to exercise a tax right, the operation is always invoiced. When that recipient asks for it, the invoice carries its NIF and address and shows the tax separately: a full invoice, or a simplified one completed with those details. In BeeL., that is a standard invoice ([SIM-006](/rules/simplified#sim-006)). **Why:** Without an invoice the issuer breaches its invoicing obligation, and without the recipient's details and the tax shown apart the customer cannot deduct the VAT. **Applies to:** invoice types `STANDARD`, `SIMPLIFIED`; The recipient is a business or professional acting as such, or asks for an invoice to exercise a tax right. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 2.2.a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a2-2) > «Aquellas en las que el destinatario sea un empresario o profesional que actúe como tal, con independencia del régimen de tributación al que se encuentre acogido el empresario o profesional que realice la operación, así como cualesquiera otras en las que el destinatario así lo exija para el ejercicio de cualquier derecho de naturaleza tributaria.» - RD 1619/2012 (Reglamento de facturación), art. 7.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a7) > «cuando el destinatario de la operación sea un empresario o profesional y así lo exija, el expedidor de la factura simplificada deberá hacer constar, además, los siguientes datos: a) Número de Identificación Fiscal atribuido por la Administración tributaria española o, en su caso, por la de otro Estado miembro de la Unión Europea, así como el domicilio del destinatario de las operaciones. b) La cuota tributaria que, en su caso, se repercuta, que deberá consignarse por separado.» **Incorrect:** Selling to a company at the counter and refusing to put its NIF and address on the invoice when it asks for them. **Correct:** Issuing the invoice with the company's legal name, NIF and address; in BeeL., as a `STANDARD` invoice ([SIM-006](/rules/simplified#sim-006)). **Related:** [CNT-005 · A full invoice identifies the recipient by NIF](/rules/contents#cnt-005) · [SIM-006 · An identified customer gets a standard invoice (F1)](/rules/simplified#sim-006) · [SIM-009 · A customer who asks to be identified gets an invoice that identifies it](/rules/simplified#sim-009) **Explained in:** [Simplified vs standard (F1 vs F2) › On the F1 path](/verifactu/simplified-vs-standard#on-the-f1-path) ## CNT-003 · A full invoice names both parties by their legal name `Required` · Law · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. A full invoice shows the full name or legal name of the issuer and of the recipient. Send the recipient's `legal_name`, not a trade name; BeeL. takes the issuer's from the company's tax profile and, while that profile is incomplete, refuses to issue with [`EMISSION_NOT_READY`](/errors/EMISSION_NOT_READY), listing [`PROFILE_INCOMPLETE`](/errors/PROFILE_INCOMPLETE) among its blockers. **Why:** The legal name is what identifies each party for tax purposes; a trade name alone does not. **Applies to:** invoice types `STANDARD`, `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice) **Error codes:** [`RECIPIENT_FISCAL_NAME_REQUIRED`](/errors/RECIPIENT_FISCAL_NAME_REQUIRED) (`422`), [`EMISSION_NOT_READY`](/errors/EMISSION_NOT_READY) (`422`), [`PROFILE_INCOMPLETE`](/errors/PROFILE_INCOMPLETE) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 6.1.c) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «Nombre y apellidos, razón o denominación social completa, tanto del obligado a expedir factura como del destinatario de las operaciones.» **Incorrect:** Sending only the shop name the customer trades under. ```json { "recipient": { "trade_name": "Café Central", "nif": "B12345674", "address": { "street": "Calle Mayor 1", "postal_code": "28013", "city": "Madrid", "province": "Madrid" } } } ``` **Correct:** Sending the legal name as registered, with the trade name as an extra. ```json { "recipient": { "legal_name": "Cafeterías Centrales SL", "trade_name": "Café Central", "nif": "B12345674", "address": { "street": "Calle Mayor 1", "postal_code": "28013", "city": "Madrid", "province": "Madrid" } } } ``` **Related:** [CNT-004 · Every invoice shows the issuer's NIF](/rules/contents#cnt-004) · [CNT-005 · A full invoice identifies the recipient by NIF](/rules/contents#cnt-005) · [CNT-006 · A full invoice shows the address of both parties](/rules/contents#cnt-006) **Explained in:** [Simplified vs standard (F1 vs F2) › On the F1 path](/verifactu/simplified-vs-standard#on-the-f1-path) ## CNT-004 · Every invoice shows the issuer's NIF `Required` · Law · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed. Every invoice carries the NIF the issuer operates with. BeeL. takes it from the issuing company's profile: without it no invoice is created or issued ([`COMPANY_NIF_MISSING`](/errors/COMPANY_NIF_MISSING)), whatever the path (API, dashboard, recurring invoice, payment integration), and VeriFactu cannot be enabled for the company. **Why:** The issuer's NIF is what AEAT files the invoice and its record under. **Applies to:** invoice types `STANDARD`, `SIMPLIFIED`, `CORRECTIVE`; operations [`PUT /v1/companies/{company_id}/verifactu-configuration`](/verifactu/updateCompanyVeriFactuConfiguration), [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice) **Error codes:** [`COMPANY_NIF_MISSING`](/errors/COMPANY_NIF_MISSING) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 6.1.d) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «Número de Identificación Fiscal atribuido por la Administración tributaria española o, en su caso, por la de otro Estado miembro de la Unión Europea, con el que ha realizado la operación el obligado a expedir la factura.» **Incorrect:** Enabling VeriFactu for a company whose NIF was never set in its profile: the API answers [`COMPANY_NIF_MISSING`](/errors/COMPANY_NIF_MISSING). **Correct:** Completing the company's NIF before its first invoice; each NIF issues through its own company. **Related:** [CNT-003 · A full invoice names both parties by their legal name](/rules/contents#cnt-003) · [REC-005 · One chain per NIF, one company per NIF](/rules/records#rec-005) **Explained in:** [Compliance and responsibilities › The issuing business](/verifactu/compliance-and-responsibilities#the-issuing-business) ## CNT-005 · A full invoice identifies the recipient by NIF `Required` · Law · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. Send the recipient's NIF, or an alternative identifier for a customer without a Spanish NIF, on every standard invoice. The NIF is mandatory by law for exempt intra-EU supplies of goods, reverse-charge operations and operations located in Spain by an issuer established here. **Why:** Without the recipient's identification the invoice does not meet the legal content, and the customer cannot deduct its VAT. **Applies to:** invoice types `STANDARD`, `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice) **Error codes:** [`RECIPIENT_ID_REQUIRED`](/errors/RECIPIENT_ID_REQUIRED) (`422`), [`EXEMPTION_REQUIRES_RECIPIENT_ID_TYPE`](/errors/EXEMPTION_REQUIRES_RECIPIENT_ID_TYPE) (`400`) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 6.1.d) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «Asimismo, será obligatoria la consignación del Número de Identificación Fiscal del destinatario en los siguientes casos: 1.º Que se trate de una entrega de bienes destinados a otro Estado miembro que se encuentre exenta conforme al artículo 25 de la Ley del Impuesto. 2.º Que se trate de una operación cuyo destinatario sea el sujeto pasivo del Impuesto correspondiente a aquélla. 3.º Que se trate de operaciones que se entiendan realizadas en el territorio de aplicación del Impuesto y el empresario o profesional obligado a la expedición de la factura haya de considerarse establecido en dicho territorio.» **Incorrect:** Creating a standard invoice for a Spanish company with only its name and address: it is rejected with [`RECIPIENT_ID_REQUIRED`](/errors/RECIPIENT_ID_REQUIRED). **Correct:** Sending the company's NIF with its legal name and address. ```json { "type": "STANDARD", "recipient": { "legal_name": "Cafeterías Centrales SL", "nif": "B12345674", "address": { "street": "Calle Mayor 1", "postal_code": "28013", "city": "Madrid", "province": "Madrid" } } } ``` **Related:** [CNT-020 · A Spanish recipient's NIF is in the AEAT census](/rules/contents#cnt-020) · [CNT-021 · A recipient without a Spanish NIF is identified by an alternative id](/rules/contents#cnt-021) · [TAX-004 · Intra-EU supplies of goods are exempt only with the buyer's EU VAT number](/rules/taxes#tax-004) **Explained in:** [Simplified vs standard (F1 vs F2) › On the F1 path](/verifactu/simplified-vs-standard#on-the-f1-path) · [International customers › Identifying foreign customers](/verifactu/international-customers#identifying-foreign-customers) ## CNT-006 · A full invoice shows the address of both parties `Required` · Law · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed. A full invoice shows the address of the issuer and of the recipient. Send the recipient's fiscal address, on a recipient sent inline and on the customers you store. **Why:** The address is part of the legal content of a full invoice; an invoice without the recipient's address is incomplete and has to be corrected. **Applies to:** invoice types `STANDARD`, `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`POST /v1/companies/{company_id}/customers`](/customers/createCompanyCustomer) **Error codes:** [`RECIPIENT_ADDRESS_REQUIRED`](/errors/RECIPIENT_ADDRESS_REQUIRED) (`422`), [`EMISSION_NOT_READY`](/errors/EMISSION_NOT_READY) (`422`), [`PROFILE_INCOMPLETE`](/errors/PROFILE_INCOMPLETE) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 6.1.e) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «Domicilio, tanto del obligado a expedir factura como del destinatario de las operaciones.» **Incorrect:** Invoicing a customer stored without an address. **Correct:** Completing the customer's address before invoicing it, or sending the recipient inline with its `address`. **Related:** [CNT-003 · A full invoice names both parties by their legal name](/rules/contents#cnt-003) · [CNT-005 · A full invoice identifies the recipient by NIF](/rules/contents#cnt-005) **Explained in:** [Simplified vs standard (F1 vs F2) › On the F1 path](/verifactu/simplified-vs-standard#on-the-f1-path) ## CNT-007 · Each line describes the operation, its unit price and any discount `Required` · Law · Impact: medium · Responsibility: your integration. The API also answers the error codes listed. Describe each operation with the data needed to work out its taxable base: a meaningful description, the unit price without tax, and any discount not already included in that price. Send the discount as `discount_percentage` rather than folding it into the price. **Why:** A line that does not say what was supplied or at what price does not let anyone check the taxable base. **Applies to:** invoice types `STANDARD`, `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice) **Error codes:** [`LINE_NORMAL_DESCRIPTION_REQUIRED`](/errors/LINE_NORMAL_DESCRIPTION_REQUIRED) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 6.1.f) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «Descripción de las operaciones, consignándose todos los datos necesarios para la determinación de la base imponible del Impuesto, tal y como ésta se define por los artículos 78 y 79 de la Ley del Impuesto, correspondiente a aquéllas y su importe, incluyendo el precio unitario sin Impuesto de dichas operaciones, así como cualquier descuento o rebaja que no esté incluido en dicho precio unitario.» **Incorrect:** A single line described as `Services` with the discount already subtracted from the price. **Correct:** A line that says what was supplied, with its net unit price and the discount apart. ```json { "description": "Website maintenance, September 2026", "quantity": 1, "unit_price": 500, "discount_percentage": 10, "main_tax": { "type": "IVA", "percentage": 21 } } ``` **Related:** [CNT-008 · The tax rate and the tax amount are shown apart from the base](/rules/contents#cnt-008) · [CNT-009 · The base is broken down by rate and by kind of operation](/rules/contents#cnt-009) **Explained in:** [Amounts and rounding › Three ways to price a line](/guides/amounts-and-rounding#three-ways-to-price-a-line) ## CNT-008 · The tax rate and the tax amount are shown apart from the base `Required` · Law · Impact: medium · Checked by the API: BeeL. applies it. A full invoice states the tax rate applied and the tax amount charged, separately from the taxable base. You choose the rate of each line; BeeL. computes the tax amount of each rate and shows it apart from the base. **Why:** The VAT charged is what the customer deducts; it has to be readable on its own, next to the rate it comes from. **Applies to:** invoice types `STANDARD`, `CORRECTIVE` **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 6.1.g) y h) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «El tipo impositivo o tipos impositivos, en su caso, aplicados a las operaciones. h) La cuota tributaria que, en su caso, se repercuta, que deberá consignarse por separado.» - Ley 37/1992 del IVA, art. 88.Dos — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a88) > «A estos efectos, la cuota repercutida se consignará separadamente de la base imponible, incluso en el caso de precios fijados administrativamente, indicando el tipo impositivo aplicado.» **Incorrect:** Sending a line with a price that already includes VAT as if it were the net price, so the base and the tax amount on the invoice are wrong. **Correct:** Sending the net price with its `main_tax`, or pricing the line with `total_including_tax` so BeeL. works the base and the tax out of the total. **Related:** [CNT-009 · The base is broken down by rate and by kind of operation](/rules/contents#cnt-009) · [TAX-001 · Apply the VAT rate in force when the operation took place](/rules/taxes#tax-001) · [REC-012 · Tax amounts are base times rate](/rules/records#rec-012) **Explained in:** [Amounts and rounding › Taxes are rounded per group, not per line](/guides/amounts-and-rounding#taxes-are-rounded-per-group-not-per-line) ## CNT-009 · The base is broken down by rate and by kind of operation `Required` · Law · Impact: low · Checked by the API: BeeL. applies it. When one invoice mixes exempt and taxed operations, reverse-charge and ordinary operations, or different VAT rates, the taxable base is shown separately for each. Classify every line on its own; BeeL. groups the breakdown from those classifications. **Why:** Each part of the base is taxed differently; lumped together, the invoice does not say how much is exempt or at which rate. **Applies to:** invoice types `STANDARD`, `SIMPLIFIED`, `CORRECTIVE` **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 6.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «Deberá especificarse por separado la parte de base imponible correspondiente a cada una de las operaciones que se documenten en una misma factura en los siguientes casos:» **Incorrect:** Putting an exempt training course and taxed materials on one line at 21 %. **Correct:** Two lines: the course classified as exempt and the materials at 21 %, each with its own `main_tax`. **Related:** [CNT-008 · The tax rate and the tax amount are shown apart from the base](/rules/contents#cnt-008) · [CNT-010 · An exempt operation states why it is exempt](/rules/contents#cnt-010) **Explained in:** [Amounts and rounding › Taxes are rounded per group, not per line](/guides/amounts-and-rounding#taxes-are-rounded-per-group-not-per-line) ## CNT-010 · An exempt operation states why it is exempt `Required` · Law · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. An invoice for an exempt operation refers to the article of the VAT law or of Directive 2006/112/CE that exempts it, or states that it is exempt. Give every 0 % line its `exemption_reason`, and an `exemption_reason_text` when the reason is `OTRO`. When the line has a reason with text, the PDF shows on it the number of the observation note that states it (also the reverse-charge note for a non-subject service to an EU business). Disbursement lines are not numbered. **Why:** Without the reference, a 0 % line reads as a missing tax, not as an exemption. **Applies to:** invoice types `STANDARD`, `SIMPLIFIED`, `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice) **Error codes:** [`EXEMPT_ZERO_RATE_REQUIRES_REASON`](/errors/EXEMPT_ZERO_RATE_REQUIRES_REASON) (`422`), [`LINE_EXEMPTION_TEXT_REQUIRED`](/errors/LINE_EXEMPTION_TEXT_REQUIRED) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 6.1.j) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «En el supuesto de que la operación que se documenta en una factura esté exenta del Impuesto, una referencia a las disposiciones correspondientes de la Directiva 2006/112/CE, de 28 de noviembre, relativa al sistema común del Impuesto sobre el Valor Añadido, o a los preceptos correspondientes de la Ley del Impuesto o indicación de que la operación está exenta.» **Incorrect:** A line at 0 % with no exemption reason: it is rejected with [`EXEMPT_ZERO_RATE_REQUIRES_REASON`](/errors/EXEMPT_ZERO_RATE_REQUIRES_REASON). **Correct:** An educational service exempt under article 20 of the VAT law. ```json { "description": "English course, level B2", "quantity": 1, "unit_price": 300, "main_tax": { "type": "IVA", "percentage": 0 }, "exemption_reason": "EXENTA_ART_20" } ``` **Related:** [CNT-001 · Every operation of the business is invoiced, exempt ones included](/rules/contents#cnt-001) · [CNT-009 · The base is broken down by rate and by kind of operation](/rules/contents#cnt-009) · [TAX-005 · Exempt and non-subject lines carry no VAT rate](/rules/taxes#tax-005) **Explained in:** [Tax classification per line › Mapping table: BeeL. API value ↔ AEAT code](/verifactu/tax-classification#mapping-table-beel-api-value--aeat-code) · [Tax classification per line › Exempt educational service (E1)](/verifactu/tax-classification#exempt-educational-service-e1) ## CNT-011 · Only one original of each invoice exists `Required` · Law · Impact: medium · Responsibility: the issuing business. Issue a single original of each invoice. A duplicate is allowed only when the same operation has several recipients or the original was lost, and every duplicate carries the word «duplicado». **Why:** Two originals of one invoice look like two operations to the customer and to an inspection. **Applies to:** Copies handed over after issue. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 14.1, 14.2 y 14.4 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a14) > «1. Los empresarios y profesionales o sujetos pasivos sólo podrán expedir un original de cada factura. [...] 4. En cada uno de los ejemplares duplicados deberá hacerse constar la expresión «duplicado».» **Incorrect:** Issuing the same sale again as a new invoice because the customer lost the first one. **Correct:** Sending the customer the PDF of the original again, marked «duplicado» if you hand it over as a duplicate. **Related:** [LIF-005 · Duplicating an invoice creates a new one, not a copy](/rules/lifecycle#lif-005) · [NUM-002 · An issued number is never reused, even when the invoice is voided](/rules/numbering#num-002) · [CNT-024 · A duplicate for several recipients shows each one's share](/rules/contents#cnt-024) **Explained in:** [Invoice lifecycle › Duplicating an invoice](/guides/invoice-lifecycle#duplicating-an-invoice) ## CNT-012 · A reverse-charge invoice carries the mention «inversión del sujeto pasivo» `Required` · Law · Impact: high · Checked by the API: BeeL. applies it. When the recipient is the one liable for the VAT, the invoice carries the mention «inversión del sujeto pasivo», on any document of it, one you render included. Classify those lines as reverse charge: BeeL. then prints the mention on the invoice's PDF, in a block of its own apart from the exemptions. **Why:** The mention is what tells the recipient that it has to self-assess the VAT; without it the invoice reads as if VAT had been left out by mistake. **Applies to:** invoice types `STANDARD`, `CORRECTIVE`; Operations in which the recipient is liable for the VAT (reverse charge). **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 6.1.m) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «En el caso de que el sujeto pasivo del Impuesto sea el adquirente o el destinatario de la operación, la mención «inversión del sujeto pasivo».» **Incorrect:** Invoicing construction work for a developer at 0 % VAT with no mention of who pays the tax. **Correct:** Classifying the line as reverse charge, so the invoice states «inversión del sujeto pasivo». ```json { "description": "Building work, phase 2", "quantity": 1, "unit_price": 12000, "main_tax": { "type": "IVA", "percentage": 0 }, "exemption_reason": "ISP_ART_84_2_F" } ``` **Related:** [TAX-002 · Reverse-charge operations are invoiced without charging VAT](/rules/taxes#tax-002) · [TAX-003 · Reverse-charge lines carry no tax and never go on a simplified invoice](/rules/taxes#tax-003) · [NUM-009 · Reverse-charge supplies of metals and electronics go in a special series](/rules/numbering#num-009) **Explained in:** [Tax classification per line › Reverse charge (inversión del sujeto pasivo, S2)](/verifactu/tax-classification#inversión-del-sujeto-pasivo-s2) ## CNT-013 · A cash-basis invoice carries the mention «régimen especial del criterio de caja» `Required` · Law · Impact: medium · Checked by the API: BeeL. applies it. Invoices for operations under the special cash-basis regime carry the mention «régimen especial del criterio de caja», on any document of the invoice. BeeL. prints it on the invoice's PDF, once, after the exemptions, when a line carries regime key `07`; a document you render yourself has to carry it too. **Why:** The mention tells the recipient that the VAT accrues on payment, which changes when it can deduct it. **Applies to:** invoice types `STANDARD`, `SIMPLIFIED`, `CORRECTIVE`; IVA lines with regime key `07` (cash basis). **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 6.1.p) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «En el caso de aplicación del régimen especial del criterio de caja la mención «régimen especial del criterio de caja.» **Incorrect:** An invoice under the cash-basis regime whose document says nothing about the regime. **Correct:** An invoice under the cash-basis regime (regime key `07`) that carries the mention «régimen especial del criterio de caja». **Related:** [TAX-016 · Regime keys 03, 06 and 14 are not accepted](/rules/taxes#tax-016) · [CNT-014 · A used-goods, art or antiques invoice carries its regime mention](/rules/contents#cnt-014) · [CNT-015 · A travel-agency invoice carries the mention «régimen especial de las agencias de viajes»](/rules/contents#cnt-015) **Explained in:** [Regime keys › "07" — Cash-basis IVA (criterio de caja)](/verifactu/regime-keys#07--cash-basis-iva-criterio-de-caja) ## CNT-014 · A used-goods, art or antiques invoice carries its regime mention `Required` · Law · Impact: medium · Responsibility: the issuing business. Invoices under the special regime for used goods, works of art, antiques and collectors' items carry the corresponding regime mention, and do not show the VAT separately: it is included in the price. **Why:** Under this regime the VAT is charged on the margin; showing it apart, or omitting the mention, misstates the tax to the buyer. **Applies to:** Operations under the special regime for used goods, works of art, antiques and collectors' items (regime key 03). **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 6.1.o) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «En caso de aplicación del régimen especial de los bienes usados, objetos de arte, antigüedades y objetos de colección, la mención «régimen especial de los bienes usados», «régimen especial de los objetos de arte» o «régimen especial de las antigüedades y objetos de colección».» - Ley 37/1992 del IVA, art. 138 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a138) > «En las facturas que documenten las operaciones a que resulte aplicable este régimen especial, los sujetos pasivos no podrán consignar separadamente la cuota repercutida, debiendo entenderse ésta comprendida en el precio total de la operación.» **Incorrect:** Selling a second-hand car under the margin regime with the VAT broken out on the invoice. **Correct:** Invoicing it under regime key 03 with the mention «régimen especial de los bienes usados» and the VAT included in the price. **Related:** [CNT-013 · A cash-basis invoice carries the mention «régimen especial del criterio de caja»](/rules/contents#cnt-013) · [CNT-015 · A travel-agency invoice carries the mention «régimen especial de las agencias de viajes»](/rules/contents#cnt-015) **Explained in:** [Regime keys › "03" — REBU (used goods, art, antiques)](/verifactu/regime-keys#03--rebu-used-goods-art-antiques) ## CNT-015 · A travel-agency invoice carries the mention «régimen especial de las agencias de viajes» `Required` · Law · Impact: low · Checked by the API: BeeL. applies it. Invoices for operations under the special regime for travel agencies carry the mention «régimen especial de las agencias de viajes», on any document of the invoice. BeeL. prints it on the invoice's PDF, once, after the exemptions, when a line carries regime key `05`; a document you render yourself has to carry it too. **Why:** The mention tells the customer that the VAT is charged on the agency's margin, not on the full price. **Applies to:** invoice types `STANDARD`, `SIMPLIFIED`, `CORRECTIVE`; IVA lines with regime key `05` (travel agencies). **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 6.1.n) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «En caso de aplicación del régimen especial de las agencias de viajes, la mención «régimen especial de las agencias de viajes».» **Incorrect:** Invoicing a package holiday under the travel-agency regime with no mention of the regime. **Correct:** Invoicing it with the mention «régimen especial de las agencias de viajes» on the invoice. **Related:** [CNT-013 · A cash-basis invoice carries the mention «régimen especial del criterio de caja»](/rules/contents#cnt-013) · [CNT-014 · A used-goods, art or antiques invoice carries its regime mention](/rules/contents#cnt-014) **Explained in:** [Regime keys › The catalogue](/verifactu/regime-keys#the-catalogue) ## CNT-016 · An intra-EU supply of a new means of transport describes the vehicle `Required` · Law · Impact: low · Responsibility: the issuing business. An invoice for the intra-EU supply of a new means of transport states its characteristics, the date it first entered service, and the distance or hours travelled until delivery. Put these in the line description. **Why:** These data are what make the vehicle count as new, which decides where its VAT is paid. **Applies to:** Supplies of new means of transport to another EU Member State. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 6.1.k) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «En las entregas de medios de transporte nuevos a que se refiere el artículo 25 de la Ley del Impuesto, sus características, la fecha de su primera puesta en servicio y las distancias recorridas u horas de navegación o vuelo realizadas hasta su entrega.» **Incorrect:** A line that says only `Motorbike`. **Correct:** A line that says `Motorbike, 125 cc, first registered 2026-08-01, 150 km at delivery`. **Related:** [TAX-004 · Intra-EU supplies of goods are exempt only with the buyer's EU VAT number](/rules/taxes#tax-004) ## CNT-017 · An invoice may be in any language `Recommended` · Law · Impact: low · Responsibility: the issuing business. You may issue an invoice in any language. Keep the means to produce a Spanish version, because AEAT may ask for a translation of an invoice in a language that is not official in Spain. **Why:** In a tax inspection AEAT may require a translation into Spanish, or into another official language in Spain, of an invoice issued in a language that is not official here. **Applies to:** The language of the invoice document. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 12.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a12) > «Las facturas podrán expedirse en cualquier lengua. No obstante, la Administración tributaria, cuando lo considere necesario [...] podrá exigir una traducción al castellano, o a otra lengua oficial en España, de las facturas expedidas en una lengua no oficial» **Incorrect:** Assuming an English-only invoice can never be asked for in Spanish. **Correct:** Issuing in English for a foreign customer, knowing the PDF can also be produced in Spanish. **Explained in:** [Branding and PDFs › Choose template, colour and languages](/guides/branding-and-pdf#choose-template-colour-and-languages) ## CNT-018 · Invoices go by email only with the recipient's consent `Required` · Law · Impact: low · Responsibility: the issuing business. Send invoices electronically only to recipients who have agreed to receive them that way, except where electronic invoicing is mandatory. Record that consent in your own system before emailing invoices. **Why:** An electronic invoice sent without consent does not count as delivered in the form the law allows. **Applies to:** operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/send`](/invoices/sendCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/deliveries`](/invoices/createCompanyInvoiceDelivery); Electronic delivery of invoices. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 9.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a9) > «La expedición, transmisión y recepción de la factura electrónica estará condicionada a que su destinatario haya dado su consentimiento, excepto en los supuestos de factura electrónica obligatoria establecidos en el artículo 8 bis.» **Incorrect:** Emailing invoices to every customer on file without having asked them. **Correct:** Asking at sign-up whether the customer accepts invoices by email, and emailing only those who do. **Related:** [DAT-008 · Deliver the invoice to the customer in time](/rules/dates#dat-008) **Explained in:** [Sending email › Recipients](/guides/sending-email#recipients) ## CNT-019 · Only a corrective invoice totals less than zero `Required` · BeeL. rule · Impact: critical · Checked by the API: a request that breaks it is rejected with the error codes listed. Do not use a standard or simplified invoice with a negative total as a credit note. A refund or a reduction is a corrective invoice against the original. An invoice that totals zero is valid. **Why:** A negative ordinary invoice is a correction without the link to the invoice it corrects. **Applies to:** invoice types `STANDARD`, `SIMPLIFIED`; operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`PATCH /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/patchCompanyInvoice) **Error codes:** [`NEGATIVE_TOTAL_REQUIRES_RECTIFICATIVE`](/errors/NEGATIVE_TOTAL_REQUIRES_RECTIFICATIVE) (`422`) **Incorrect:** Creating a `STANDARD` invoice whose only line has `quantity: -1`, to refund a customer: it is rejected with [`NEGATIVE_TOTAL_REQUIRES_RECTIFICATIVE`](/errors/NEGATIVE_TOTAL_REQUIRES_RECTIFICATIVE). ```json { "type": "STANDARD", "lines": [{ "description": "Refund", "quantity": -1, "unit_price": 100, "main_tax": { "type": "IVA", "percentage": 21 } }] } ``` **Correct:** Issuing a partial corrective against the invoice being refunded. ```http POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective { "rectification_type": "PARTIAL", "rectification_code": "R1", "reason": "Refund of one unit returned by the customer", "lines": [{ "description": "Returned unit", "quantity": -1, "unit_price": 100, "main_tax": { "type": "IVA", "percentage": 21 } }] } ``` **Related:** [COR-001 · Wrong data on an issued invoice is fixed with a corrective](/rules/corrective#cor-001) · [COR-012 · Returns can be netted only on a later supply to the same customer](/rules/corrective#cor-012) **Explained in:** [Amounts and rounding › Amounts that are rejected](/guides/amounts-and-rounding#amounts-that-are-rejected) ## CNT-020 · A Spanish recipient's NIF is in the AEAT census `Recommended` · AEAT criterion · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. Check a Spanish customer's NIF against the AEAT census before invoicing it. With VeriFactu enabled, BeeL. checks it with AEAT when you issue and refuses a NIF that AEAT reports as not in the census or revoked, before any number is spent; that check depends on AEAT's census service answering, so validate the NIF when the customer signs up. **Why:** AEAT accepts a record whose recipient is not in the census only as an error that has to be fixed later; a revoked NIF cannot operate at all. **Applies to:** invoice types `STANDARD`, `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice), [`POST /v1/nif/validate`](/nif-validation/validateNif); VeriFactu enabled. **Error codes:** [`NIF_NOT_IN_CENSUS`](/errors/NIF_NOT_IN_CENSUS) (`422`), [`NIF_REVOCADO`](/errors/NIF_REVOCADO) (`422`) **Legal basis:** - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 4.3.1 Tratamiento de los errores en remisión voluntaria VERI*FACTU — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Los registros de facturación con errores admisibles serán “aceptados” y registrados por los sistemas de la AEAT, pero deberán ser subsanados para poder llevar a cabo el tratamiento y validación de los mismos. [...] Los NIF informados en la agrupación Destinatario que sean correctos, pero no figuren censados en la AEAT, indicando el tipo de identificación “07” (“No censado”) en el campo “IDType” dentro del bloque “IDOtro”.» **Incorrect:** Issuing to a customer whose NIF and legal name do not match the census: it is rejected with [`NIF_NOT_IN_CENSUS`](/errors/NIF_NOT_IN_CENSUS). **Correct:** Validating the NIF when the customer signs up, and correcting the legal name or NIF before the first invoice. ```http POST /v1/nif/validate ``` **Related:** [CNT-005 · A full invoice identifies the recipient by NIF](/rules/contents#cnt-005) · [CNT-021 · A recipient without a Spanish NIF is identified by an alternative id](/rules/contents#cnt-021) · [REC-009 · Check the data AEAT accepted with errors](/rules/records#rec-009) **Explained in:** [Handling AEAT rejections › Recipient data — fix the invoice](/verifactu/handling-rejections#recipient-data--fix-the-invoice) ## CNT-021 · A recipient without a Spanish NIF is identified by an alternative id `Required` · AEAT criterion · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. Identify a recipient without a Spanish NIF with an `alternative_id` of the type that fits (EU VAT number, passport, official ID, residence certificate, other document or not registered) and its country, never together with a `nif`. The country can be omitted only for a passport or the not-registered type, which then take `ES`. With country `ES`, only a passport or the not-registered type is accepted. An EU VAT number (`NIF_IVA`) is accepted only with the country of another EU Member State and in that State's VAT number format: its country prefix (`EL` for Greece) followed by the national number, in capital letters and without spaces, as in `FR40303265045`. A Spanish NIF is never sent as an EU VAT number; a customer from outside the EU is identified with another type. A corrective invoice other than `R5` carries the recipient of the invoice it corrects and is held to the same rule: if that recipient does not meet it, first correct its data with an `R4` corrective that carries the corrected recipient. **Why:** AEAT identifies each recipient either by NIF or by this identifier, never both, and rejects combinations its validations do not allow, including an EU VAT number that is not from a Member State or does not have that State's structure. **Applies to:** invoice types `STANDARD`, `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice), [`POST /v1/companies/{company_id}/customers`](/customers/createCompanyCustomer), [`PATCH /v1/companies/{company_id}/customers/{customer_id}`](/customers/patchCompanyCustomer), [`POST /v1/companies/{company_id}/recurring-invoices`](/recurring-invoices/createCompanyRecurringInvoice) **Error codes:** [`RECIPIENT_NIF_AND_ID_OTHER_EXCLUSIVE`](/errors/RECIPIENT_NIF_AND_ID_OTHER_EXCLUSIVE), [`ALTERNATIVE_ID_SPAIN_INVALID_TYPE`](/errors/ALTERNATIVE_ID_SPAIN_INVALID_TYPE) (`422`), [`RECIPIENT_UNREGISTERED_ID_MUST_BE_DNI_OR_NIE`](/errors/RECIPIENT_UNREGISTERED_ID_MUST_BE_DNI_OR_NIE), [`ALTERNATIVE_ID_VAT_REQUIRES_EU_COUNTRY`](/errors/ALTERNATIVE_ID_VAT_REQUIRES_EU_COUNTRY) (`422`), [`ALTERNATIVE_ID_VAT_INVALID_FORMAT`](/errors/ALTERNATIVE_ID_VAT_INVALID_FORMAT) (`422`), [`ALTERNATIVE_ID_COUNTRY_REQUIRED`](/errors/ALTERNATIVE_ID_COUNTRY_REQUIRED) (`422`) **Legal basis:** - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.13 Agrupación Destinatarios — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Si se cumplimenta NIF, no deberá existir la agrupación IDOtro y viceversa, pero es obligatorio que se cumplimente uno de los dos.» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.13 Agrupación Destinatarios — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Cuando uno o varios destinatarios se identifiquen a través de la agrupación IDOtro y CodigoPais sea "ES", se validará que el campo IDType sea “03” o “07”.» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.13 Agrupación Destinatarios — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Cuando uno o varios destinatarios se identifiquen a través de la agrupación IDOtro e IDType sea “02”, se validará que el campo identificador se ajuste a la estructura de NIF-IVA de alguno de los Estados Miembros y debe estar identificado. Ver nota (1).» - Orden HAC/1177/2024, anexo, lista L7 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2024-22138) > «02 NIF-IVA. 03 Pasaporte. 04 Documento oficial de identificación expedido por el país o territorio de residencia. 05 Certificado de residencia. 06 Otro documento probatorio. 07 No censado.» **Incorrect:** Sending a Spanish NIF in `nif` together with an `alternative_id`: it is rejected with [`RECIPIENT_NIF_AND_ID_OTHER_EXCLUSIVE`](/errors/RECIPIENT_NIF_AND_ID_OTHER_EXCLUSIVE). ```json { "recipient": { "legal_name": "Dupont SARL", "nif": "B12345674", "alternative_id": { "type": "NIF_IVA", "number": "FR40303265045", "country_code": "FR" } } } ``` **Correct:** Sending only the alternative identifier, with its type and country. ```json { "recipient": { "legal_name": "Dupont SARL", "alternative_id": { "type": "NIF_IVA", "number": "FR40303265045", "country_code": "FR" }, "address": { "street": "12 rue de Rivoli", "postal_code": "75001", "city": "Paris", "province": "Paris", "country_code": "FR" } } } ``` **Related:** [CNT-005 · A full invoice identifies the recipient by NIF](/rules/contents#cnt-005) · [COR-017 · A corrective keeps the recipient, except to correct the recipient's data](/rules/corrective#cor-017) · [TAX-004 · Intra-EU supplies of goods are exempt only with the buyer's EU VAT number](/rules/taxes#tax-004) · [TAX-006 · Services to a business abroad are not subject to Spanish VAT](/rules/taxes#tax-006) **Explained in:** [International customers › Identifying foreign customers](/verifactu/international-customers#identifying-foreign-customers) · [Glossary › Alternative ID types (foreign customers)](/guides/glossary#alternative-id-types-foreign-customers) ## CNT-022 · Invoices to Spanish public administrations are electronic `Required` · Law · Impact: medium · Responsibility: the issuing business. A public limited company, a limited liability company or another entity listed in art. 4.1 of Ley 25/2013 that invoices a Spanish public administration issues an electronic invoice and files it through the general entry point that corresponds to that administration (FACe, for the State). Any other supplier may do the same. **Why:** For these suppliers the electronic invoice filed through the entry point is how the administration receives the invoice; a PDF by email does not meet the obligation. **Applies to:** Invoices to Spanish public administrations, issued by the entities listed in art. 4.1 of Ley 25/2013 (among them SA and SL companies). **Legal basis:** - Ley 25/2013 (factura electrónica en el Sector Público), art. 4.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2013-13722#a4) > «Todos los proveedores que hayan entregado bienes o prestado servicios a la Administración Pública podrán expedir y remitir factura electrónica. En todo caso, estarán obligadas al uso de la factura electrónica y a su presentación a través del punto general de entrada que corresponda, las entidades siguientes: a) Sociedades anónimas; b) Sociedades de responsabilidad limitada;» **Incorrect:** A limited company emailing a PDF invoice to a town council. **Correct:** The same company issuing an electronic invoice and filing it through the council's entry point. **Related:** [CNT-018 · Invoices go by email only with the recipient's consent](/rules/contents#cnt-018) · [DAT-012 · Plan for mandatory B2B electronic invoices](/rules/dates#dat-012) ## CNT-023 · Some operations are always invoiced, whoever the customer `Required` · Law · Impact: medium · Responsibility: the issuing business. Issue an invoice in every case for intra-EU supplies of goods exempt under art. 25 LIVA, distance sales of goods located in Spain under art. 68.Tres.a) and Cinco LIVA, exports of goods (except in duty-free shops), goods installed or assembled before delivery under art. 68.Dos.2.º LIVA, and any operation for a legal person not acting as a business or for a public administration. **Why:** For these operations the regulation removes every exception to the duty to invoice, even when the customer is not a business. **Applies to:** The operations listed in art. 2.2 b) to f) of the RD 1619/2012. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 2.2 b) a f) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a2-2) > «Deberá expedirse factura y copia de esta en todo caso en las siguientes operaciones: [...] b) Las entregas de bienes destinados a otro Estado miembro a que se refiere el artículo 25 de la Ley del Impuesto. [...] d) Las entregas de bienes expedidos o transportados fuera de la Comunidad Europea a que se refiere el artículo 21.1.º y 2.º de la Ley del Impuesto, excepto las efectuadas en las tiendas libres de impuestos [...] f) Aquellas de las que sean destinatarias personas jurídicas que no actúen como empresarios o profesionales» **Incorrect:** Exporting goods to a private buyer outside the EU and handing over only a delivery note. **Correct:** Invoicing the export, with the exemption stated on the invoice. **Related:** [CNT-001 · Every operation of the business is invoiced, exempt ones included](/rules/contents#cnt-001) · [CNT-002 · A business customer always gets an invoice, identifying it when asked](/rules/contents#cnt-002) · [TAX-004 · Intra-EU supplies of goods are exempt only with the buyer's EU VAT number](/rules/taxes#tax-004) ## CNT-024 · A duplicate for several recipients shows each one's share `Required` · Law · Impact: low · Responsibility: the issuing business. When one supply or service has several recipients and you hand each a copy of the invoice, the original and every duplicate state the share of the taxable base and of the tax that corresponds to each recipient, and every duplicate carries the word «duplicado». **Why:** Each recipient deducts only its own share; without it, the same tax could be deducted more than once. **Applies to:** One supply or service with several recipients, documented with an original and duplicates. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 14.2.a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a14) > «a) Cuando en una misma entrega de bienes o prestación de servicios concurriesen varios destinatarios. En este caso, deberá consignarse en el original y en cada uno de los duplicados la porción de base imponible y de cuota repercutida a cada uno de ellos.» **Incorrect:** Handing two co-owners of a flat the same invoice for a renovation, each as an original, with the whole amount on both. **Correct:** One original and one duplicate, each stating the base and the VAT that falls to each co-owner. **Related:** [CNT-011 · Only one original of each invoice exists](/rules/contents#cnt-011) ## CNT-025 · State the establishment when it decides how the operation is taxed `Required` · Law · Impact: low · Responsibility: the issuing business. When the issuer or the recipient has several fixed places of business, the invoice states the location of the head office or establishment the operation relates to whenever that matters for how the operation is taxed. **Why:** Where a service is located can depend on which establishment receives it; the invoice has to show the one that decides the tax. **Applies to:** invoice types `STANDARD`, `CORRECTIVE`; Issuers or recipients with several fixed places of business. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 6.1.e), párrafo segundo — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «Cuando el obligado a expedir factura o el destinatario de las operaciones dispongan de varios lugares fijos de negocio, deberá indicarse la ubicación de la sede de actividad o establecimiento al que se refieran aquéllas en los casos en que dicha referencia sea relevante para la determinación del régimen de tributación correspondiente a las citadas operaciones.» **Incorrect:** Invoicing a service to a group's Spanish branch with only the address of its head office abroad. **Correct:** Invoicing it with the address of the Spanish branch that receives the service. **Related:** [CNT-006 · A full invoice shows the address of both parties](/rules/contents#cnt-006) · [TAX-006 · Services to a business abroad are not subject to Spanish VAT](/rules/taxes#tax-006) ## CNT-026 · A recipient in the AEAT census is identified by NIF, not as not registered `Recommended` · AEAT criterion · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. Send a Spanish recipient that the AEAT census identifies with `nif`, not with a not-registered `alternative_id` (`NOT_REGISTERED`, type 07). BeeL. checks the DNI or NIE of a type 07 identifier, together with the recipient's name, against the census when the customer is saved and, with VeriFactu enabled, when the invoice is issued, before any number is spent; if the census identifies it, the request is rejected with `ALTERNATIVE_ID_ACTUALLY_IN_CENSUS`: send the same DNI or NIE in `nif` and retry. If the census does not answer, the identifier is not rejected. **Why:** Type 07 states that the person is not in the AEAT census. AEAT accepts a type 07 recipient only as an admissible error that has to be corrected. When the census does identify that DNI or NIE, the record is rejected when it is sent, after the invoice number has been used. **Applies to:** invoice types `STANDARD`, `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/customers`](/customers/createCompanyCustomer), [`POST /v1/customers`](/customers/createCustomer), [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice) **Error codes:** [`ALTERNATIVE_ID_ACTUALLY_IN_CENSUS`](/errors/ALTERNATIVE_ID_ACTUALLY_IN_CENSUS) **Legal basis:** - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 4.3.1 Tratamiento de los errores en remisión voluntaria VERI*FACTU — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Los registros de facturación con errores admisibles serán “aceptados” y registrados por los sistemas de la AEAT, pero deberán ser subsanados para poder llevar a cabo el tratamiento y validación de los mismos. [...] Los NIF informados en la agrupación Destinatario que sean correctos, pero no figuren censados en la AEAT, indicando el tipo de identificación “07” (“No censado”) en el campo “IDType” dentro del bloque “IDOtro”.» **Incorrect:** Creating a customer with a DNI that AEAT's census identifies as a not-registered alternative id: it is rejected with [`ALTERNATIVE_ID_ACTUALLY_IN_CENSUS`](/errors/ALTERNATIVE_ID_ACTUALLY_IN_CENSUS). ```json { "legal_name": "MARÍA GARCÍA LÓPEZ", "alternative_id": { "type": "NOT_REGISTERED", "number": "12345678Z", "country_code": "ES" } } ``` **Correct:** Sending that DNI as the customer's NIF. ```json { "legal_name": "MARÍA GARCÍA LÓPEZ", "nif": "12345678Z" } ``` **Related:** [CNT-020 · A Spanish recipient's NIF is in the AEAT census](/rules/contents#cnt-020) · [CNT-021 · A recipient without a Spanish NIF is identified by an alternative id](/rules/contents#cnt-021) **Explained in:** [International customers › Identifying foreign customers](/verifactu/international-customers#identifying-foreign-customers) [← All rules](/rules#all-rules) ## Related - [Amounts and rounding](/guides/amounts-and-rounding) — how BeeL. turns quantities, prices and rates into bases, taxes and totals: precision, the three ways to price a line, per-group tax rounding, IRPF, and the amounts that are rejected - [Simplified vs standard (F1 vs F2)](/verifactu/simplified-vs-standard) — when BeeL. issues a simplified invoice (F2) or a standard invoice (F1), the rules of the RD 1619/2012 behind them, and what BeeL. enforces at the API boundary - [Tax classification per line](/verifactu/tax-classification) — set `exemption_reason` on each line correctly, with the full mapping from BeeL. API values to AEAT codes (S1/S2/N1/N2/E1–E6) - [International customers](/verifactu/international-customers) — every cross-border scenario — intra-EU B2B, B2C with OSS, exports, services to non-EU — with the exact request shape BeeL. accepts --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Corrective invoices When an issued invoice has to be rectified, with which reason code, how the correction is shown and within which deadline. [← All rules](/rules#all-rules) A corrective invoice (factura rectificativa) is a new invoice that corrects one already issued, which stays as it was. The law decides when one is due and which reason code it carries; these rules say what each case requires and what the API checks. 24 rules: 19 from the law, 3 AEAT criteria, 2 BeeL. rules. [How to read a rule](/rules#how-to-read-a-rule). ## COR-001 · Wrong data on an issued invoice is fixed with a corrective `Required` · Law · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. Issue a corrective invoice when an issued invoice lacks a required detail, charged the wrong tax, or its taxable base changes after the operation. The corrective is issued against the original, which must be `ISSUED`, `SENT`, `PAID` or `RECTIFIED`. **Why:** The law makes the corrective mandatory in these cases, and it is the only way to change what an issued invoice says: the original and its record stay as they were. **Applies to:** invoice types `STANDARD`, `SIMPLIFIED`; statuses `ISSUED`, `SENT`, `PAID`, `RECTIFIED`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice) **Error codes:** [`INVOICE_NOT_CORRECTIBLE_IN_CURRENT_STATUS`](/errors/INVOICE_NOT_CORRECTIBLE_IN_CURRENT_STATUS) (`422`) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 15.1 y 15.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a15) > «Deberá expedirse una factura rectificativa en los casos en que la factura original no cumpla alguno de los requisitos que se establecen en los artículos 6 ó 7 [...] 2. Igualmente, será obligatoria la expedición de una factura rectificativa en los casos en que las cuotas impositivas repercutidas se hubiesen determinado incorrectamente o se hubieran producido las circunstancias que, según lo dispuesto en el artículo 80 de la Ley del Impuesto, dan lugar a la modificación de la base imponible.» **Incorrect:** Voiding an invoice for a sale that did happen because it was charged at 10 % instead of 21 %, and issuing a new one. **Correct:** Issuing an `R1` corrective against it: a `PARTIAL` one with the lines that settle the difference, or a `TOTAL` one followed by a new invoice at the right rate. **Related:** [COR-002 · Pick the reason code: R1–R4 for standard invoices, R5 for simplified](/rules/corrective#cor-002) · [COR-006 · Issue the corrective as soon as you know, within 4 years](/rules/corrective#cor-006) · [LIF-001 · An issued invoice is never edited or deleted](/rules/lifecycle#lif-001) · [VOI-001 · Void only an invoice that should never have been issued](/rules/void#voi-001) **Explained in:** [Cancel vs amend › Corrective invoice (rectificativa)](/verifactu/cancel-and-fix#rectificativa-corrective) · [Corrective invoices (R1–R5)](/verifactu/corrective-invoices) ## COR-002 · Pick the reason code: R1–R4 for standard invoices, R5 for simplified `Required` · Law · Impact: critical · Checked by the API: a request that breaks it is rejected with the error codes listed. Send the `rectification_code` that matches the cause: `R1` for an error founded in law or art. 80 Uno, Dos and Seis LIVA, `R2` for insolvency, `R3` for bad debt, `R4` for the rest. A simplified invoice is always corrected with `R5`, and `R5` corrects nothing else. **Why:** The code tells AEAT why the base or the tax changed. A standard invoice corrected with `R5`, or a simplified one with `R1`–`R4`, is a record of the wrong type. **Applies to:** invoice types `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice) **Error codes:** [`RECTIFICATIVA_R5_ONLY_SIMPLIFICADA`](/errors/RECTIFICATIVA_R5_ONLY_SIMPLIFICADA) (`422`), [`RECTIFICATIVA_R1R4_NOT_SIMPLIFICADA`](/errors/RECTIFICATIVA_R1R4_NOT_SIMPLIFICADA) (`422`) **Legal basis:** - Orden HAC/1177/2024, anexo, lista L2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2024-22138) > «R1 Factura Rectificativa (Error fundado en derecho y art. 80 Uno Dos y Seis LIVA). R2 Factura Rectificativa (art. 80.3). R3 Factura Rectificativa (art. 80.4). R4 Factura Rectificativa (Resto). R5 Factura Rectificativa en facturas simplificadas.» - AEAT, Preguntas frecuentes SIF y VERI*FACTU, Procedimientos de facturación: Tipo de facturas — [source](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/procedimientos-facturacion.html) > «La rectificación de una factura simplificada se registrará con la clave R5 cualquiera que sea el motivo de la misma.» **Incorrect:** Correcting a simplified invoice with `R1`: the API answers [`RECTIFICATIVA_R1R4_NOT_SIMPLIFICADA`](/errors/RECTIFICATIVA_R1R4_NOT_SIMPLIFICADA). ```json { "rectification_type": "TOTAL", "rectification_code": "R1", "reason": "Ticket issued for the wrong table" } ``` **Correct:** Correcting the same simplified invoice with `R5`. ```json { "rectification_type": "TOTAL", "rectification_code": "R5", "reason": "Ticket issued for the wrong table" } ``` **Related:** [COR-001 · Wrong data on an issued invoice is fixed with a corrective](/rules/corrective#cor-001) · [COR-008 · A bad-debt corrective (R3) needs the legal conditions first](/rules/corrective#cor-008) · [COR-009 · An insolvency corrective (R2) needs a declaration of insolvency](/rules/corrective#cor-009) · [COR-010 · A provisional price is rectified once the final one is known](/rules/corrective#cor-010) **Explained in:** [Corrective invoices (R1–R5) › Pick the reason (R1–R5)](/verifactu/corrective-invoices#pick-the-reason-r1r5) · [Corrective invoices (R1–R5) › Validation rules BeeL. applies](/verifactu/corrective-invoices#validation-rules-beel-applies) ## COR-003 · A corrective shows the difference or the amounts after the correction `Required` · Law · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed. A corrective states the correction either as the difference, whatever its sign, or as the amounts after the correction together with the amount rectified. In the API, a `PARTIAL` corrective carries the difference as `lines`, and a `TOTAL` corrective takes no `lines`: it rectifies what is still invoiced on the original ([COR-023](/rules/corrective#cor-023)), line by line. **Why:** The corrective has to meet every requirement of an invoice and show what changed. A `PARTIAL` without lines states no correction, and a `TOTAL` with lines is refused. **Applies to:** invoice types `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice) **Error codes:** [`RECTIFICATIVA_PARCIAL_SIN_LINEAS`](/errors/RECTIFICATIVA_PARCIAL_SIN_LINEAS) (`422`), [`RECTIFICATIVA_TOTAL_CON_LINEAS`](/errors/RECTIFICATIVA_TOTAL_CON_LINEAS) (`422`) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 15.5 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a15) > «La factura rectificativa deberá cumplir los requisitos que se establecen en los artículos 6 ó 7, según proceda. Cuando lo que se expida sea una factura rectificativa, los datos a los que se refiere el artículo 6.1.f), g) y h) expresarán la rectificación efectuada. En particular, los datos que se regulan en los párrafos f) y h) del citado artículo 6.1 se podrán consignar, bien indicando directamente el importe de la rectificación, con independencia de su signo, bien tal y como queden tras la rectificación efectuada, señalando igualmente en este caso el importe de dicha rectificación.» **Incorrect:** A `PARTIAL` corrective with no lines: the API answers [`RECTIFICATIVA_PARCIAL_SIN_LINEAS`](/errors/RECTIFICATIVA_PARCIAL_SIN_LINEAS). ```json { "rectification_type": "PARTIAL", "rectification_code": "R1", "reason": "Discount agreed after delivery" } ``` **Correct:** The same `PARTIAL` corrective with the difference as a negative line. ```json { "rectification_type": "PARTIAL", "rectification_code": "R1", "reason": "Discount agreed after delivery", "lines": [{ "description": "Discount", "quantity": -1, "unit_price": 50, "main_tax": { "type": "IVA", "percentage": 21 } }] } ``` **Related:** [COR-004 · The corrective record says whether it substitutes or adds a difference](/rules/corrective#cor-004) · [COR-001 · Wrong data on an issued invoice is fixed with a corrective](/rules/corrective#cor-001) **Explained in:** [Corrective invoices (R1–R5) › The two axes](/verifactu/corrective-invoices#the-two-axes) · [Corrective invoices (R1–R5) › Validation rules BeeL. applies](/verifactu/corrective-invoices#validation-rules-beel-applies) ## COR-004 · The corrective record says whether it substitutes or adds a difference `Required` · AEAT criterion · Impact: low · Checked by the API: BeeL. applies it. Every corrective record declares whether it rectifies by substitution (`S`) or by differences (`I`). BeeL. records every corrective by differences, whatever its `rectification_type`: a `PARTIAL` corrective carries the difference as its lines, and a `TOTAL` one carries the original's lines with the opposite sign, which is the difference that cancels it. A record by differences carries no rectified base or rectified tax. **Why:** AEAT reads the corrective's amounts differently in each mode: by substitution the breakdown holds the amounts after the correction, by differences it holds the correction itself. Declaring a negated breakdown as a substitution would record twice the intended effect. **Applies to:** invoice types `CORRECTIVE`; VeriFactu enabled. **Legal basis:** - AEAT, Preguntas frecuentes SIF y VERI*FACTU, Procedimientos de facturación: ¿Cómo registra el emisor una factura rectificativa? — [source](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/procedimientos-facturacion.html) > «Asimismo, se deberá identificar el tipo de factura rectificativa con las claves “S- sustitución” o “I- por diferencias”.» - AEAT, Preguntas frecuentes SIF y VERI*FACTU, Procedimientos de facturación: ¿Cómo registra el emisor una factura rectificativa por diferencias “I”? — [source](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/procedimientos-facturacion.html) > «Para ello se deberá informar en un solo registro de la factura rectificativa con la clave “I”. En este caso no se deben rellenar los campos adicionales “Base rectificada” y “Cuota rectificada”.» **Incorrect:** Building your own corrective record and leaving out whether it substitutes or adds a difference. **Correct:** Choosing `rectification_type` on the request and letting BeeL. build the record by differences. **Related:** [COR-003 · A corrective shows the difference or the amounts after the correction](/rules/corrective#cor-003) · [REC-001 · Each issued invoice gets a billing record built from its data](/rules/records#rec-001) **Explained in:** [Corrective invoices (R1–R5) › The two axes](/verifactu/corrective-invoices#the-two-axes) ## COR-005 · A corrective identifies the invoice it rectifies `Required` · Law · Impact: medium · Checked by the API: BeeL. applies it. A corrective states the number and the issue date of the invoice it rectifies. In the API a corrective is always created against its original, the `{invoice_id}` of the request, and each corrective rectifies one invoice; BeeL. prints the original's number and issue date on the corrective's PDF and, under VeriFactu, sends them in its billing record. **Why:** Without an unambiguous reference to the original, neither the customer nor AEAT can tell what is being corrected. **Applies to:** invoice types `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 15.4 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a15) > «La rectificación se realizará mediante la emisión de una nueva factura en la que se haga constar los datos identificativos de la factura rectificada.» - RD 1619/2012 (Reglamento de facturación), art. 7.1.h) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a7) > «En caso de facturas rectificativas, la referencia expresa e inequívoca de la factura rectificada y de las especificaciones que se modifican.» **Incorrect:** Issuing a standard invoice with negative amounts and the original's number written in the notes. **Correct:** Creating the corrective on the original's own path, so it is linked to it. ```http POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective ``` **Related:** [COR-001 · Wrong data on an issued invoice is fixed with a corrective](/rules/corrective#cor-001) · [COR-011 · Discounts and rebates granted after the sale go on a corrective](/rules/corrective#cor-011) **Explained in:** [Corrective invoices (R1–R5)](/verifactu/corrective-invoices) ## COR-006 · Issue the corrective as soon as you know, within 4 years `Required` · Law · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed. Issue a corrective as soon as you learn of the cause, and never later than 4 years after the tax accrued or, for art. 80 LIVA causes, after the circumstance occurred. The API counts from the original's operation date (its `operation_date`, or its `issue_date` when it has none) unless you declare `circumstance_date` for an `R1`, `R2`, `R3` or `R5` corrective; the last day is the anniversary itself. Past it the corrective is refused with `CORRECTIVE_OUT_OF_TIME`. A refund from a payment integration is a circumstance of the day it is refunded. **Why:** Past that deadline the tax charged can no longer be rectified, and a late corrective does not change it. Counting from the operation when no circumstance is declared is the stricter reading of the two the law allows. **Applies to:** invoice types `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice) **Error codes:** [`CORRECTIVE_OUT_OF_TIME`](/errors/CORRECTIVE_OUT_OF_TIME) (`422`), [`CORRECTIVE_CIRCUMSTANCE_DATE_NOT_APPLICABLE`](/errors/CORRECTIVE_CIRCUMSTANCE_DATE_NOT_APPLICABLE) (`422`), [`CORRECTIVE_CIRCUMSTANCE_DATE_OUT_OF_RANGE`](/errors/CORRECTIVE_CIRCUMSTANCE_DATE_OUT_OF_RANGE) (`422`) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 15.3 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a15) > «La expedición de la factura rectificativa deberá efectuarse tan pronto como el obligado a expedirla tenga constancia de las circunstancias que, conforme a los apartados anteriores, obligan a su expedición, siempre que no hubiesen transcurrido cuatro años a partir del momento en que se devengó el Impuesto o, en su caso, se produjeron las circunstancias a que se refiere el artículo 80 de la Ley del Impuesto.» - AEAT, Preguntas frecuentes SIF y VERI*FACTU, Procedimientos de facturación: tipo de facturas, R4 — [source](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/procedimientos-facturacion.html) > «Cuando se haya producido una modificación de la base imponible del IVA por causas distintas a las previstas en el artículo 80 LIVA y no se deba a un error fundado de derecho deberá emitirse una factura rectificativa con serie específica cuya información se registrará con el tipo de factura R4.» **Incorrect:** Correcting in 2026, with `R4`, an invoice whose operation took place in 2021: the API answers [`CORRECTIVE_OUT_OF_TIME`](/errors/CORRECTIVE_OUT_OF_TIME). **Correct:** Correcting in 2026 an invoice of 2021 for a price change agreed in 2024, declaring when it was agreed. ```json { "rectification_type": "PARTIAL", "rectification_code": "R1", "reason": "Price reduction agreed with the customer on 2024-06-01", "circumstance_date": "2024-06-01", "lines": [{ "description": "Price reduction", "quantity": -1, "unit_price": 100, "main_tax": { "type": "IVA", "percentage": 21 } }] } ``` **Related:** [COR-001 · Wrong data on an issued invoice is fixed with a corrective](/rules/corrective#cor-001) · [COR-008 · A bad-debt corrective (R3) needs the legal conditions first](/rules/corrective#cor-008) · [COR-014 · A corrective keeps the operation date of the original](/rules/corrective#cor-014) ## COR-007 · A wrong corrective is fixed against the original, not corrected itself `Required` · BeeL. rule · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed. A corrective is never issued against another corrective. When a corrective is wrong, issue another corrective against the original invoice. **Why:** In BeeL. every corrective hangs from one original invoice, so the whole chain of corrections of an invoice stays readable from it. **Applies to:** invoice types `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice) **Error codes:** [`CORRECTIVE_NOT_RECTIFIABLE`](/errors/CORRECTIVE_NOT_RECTIFIABLE) (`422`) **Incorrect:** Calling the corrective operation with the id of a corrective: the API answers [`CORRECTIVE_NOT_RECTIFIABLE`](/errors/CORRECTIVE_NOT_RECTIFIABLE). ```http POST /v1/companies/{company_id}/invoices/{corrective_id}/corrective ``` **Correct:** Calling it with the id of the original invoice, with the lines that settle the difference. ```http POST /v1/companies/{company_id}/invoices/{original_invoice_id}/corrective ``` **Related:** [COR-001 · Wrong data on an issued invoice is fixed with a corrective](/rules/corrective#cor-001) · [COR-005 · A corrective identifies the invoice it rectifies](/rules/corrective#cor-005) **Explained in:** [Corrective invoices (R1–R5) › Validation rules BeeL. applies](/verifactu/corrective-invoices#validation-rules-beel-applies) ## COR-008 · A bad-debt corrective (R3) needs the legal conditions first `Required` · Law · Impact: medium · Responsibility: the issuing business. Issue an `R3` corrective only when the debt is uncollectable in the legal sense: 1 year since the tax accrued without payment (six months or one year for smaller businesses), the unpaid debt recorded in the VAT books, a court claim or notarial demand, and a recipient who is a business or a base above 50 €. Issue it within the following 6 months, send it to the customer and report it to AEAT; the cases the law excludes are in [COR-016](/rules/corrective#cor-016) and [COR-019](/rules/corrective#cor-019). The API checks the six months and the 50 € threshold ([COR-020](/rules/corrective#cor-020)); the rest is yours to meet. **Why:** Without these conditions the base cannot be reduced, and the tax the corrective gives back is still owed. **Applies to:** invoice types `CORRECTIVE`; `rectification_code` `R3`. **Legal basis:** - Ley 37/1992 del IVA, art. 80.Cuatro.A).1.ª, 3.ª y B) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a80) > «1.ª Que haya transcurrido un año desde el devengo del Impuesto repercutido sin que se haya obtenido el cobro de todo o parte del crédito derivado del mismo. [...] 3.ª Que el destinatario de la operación actúe en la condición de empresario o profesional, o, en otro caso, que la base imponible de aquella, Impuesto sobre el Valor Añadido excluido, sea superior a 50 euros. 4.ª Que el sujeto pasivo haya instado su cobro mediante reclamación judicial al deudor o por medio de requerimiento notarial al mismo» - Ley 37/1992 del IVA, art. 80.Cuatro.B) y 80.Cinco.2.ª — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a80) > «B) La modificación deberá realizarse en el plazo de los seis meses siguientes a la finalización del periodo de seis meses o un año a que se refiere la condición 1.ª anterior y comunicarse a la Agencia Estatal de Administración Tributaria en el plazo que se fije reglamentariamente. [...] Tampoco procederá la modificación de la base imponible cuando el destinatario de las operaciones no esté establecido en el territorio de aplicación del Impuesto, ni en Canarias, Ceuta o Melilla.» - Ley 37/1992 del IVA, art. 80.Cuatro.A).2.ª — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a80) > «2.ª Que esta circunstancia haya quedado reflejada en los Libros Registros exigidos para este Impuesto.» - RD 1624/1992 (Reglamento del IVA), art. 24.2.a).2.º — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28925#a24) > «El acreedor tendrá que comunicar por vía electrónica, a través del formulario disponible a tal efecto en la sede electrónica de la Agencia Estatal de Administración Tributaria, en el plazo de un mes contado desde la fecha de expedición de la factura rectificativa, la modificación de la base imponible practicada» **Incorrect:** Issuing an `R3` corrective two months after the due date because the customer stopped answering. **Correct:** Issuing it once the waiting period has passed and the debt has been claimed by notarial demand, and filing the communication with AEAT. **Related:** [COR-002 · Pick the reason code: R1–R4 for standard invoices, R5 for simplified](/rules/corrective#cor-002) · [COR-006 · Issue the corrective as soon as you know, within 4 years](/rules/corrective#cor-006) · [COR-009 · An insolvency corrective (R2) needs a declaration of insolvency](/rules/corrective#cor-009) · [COR-016 · Some unpaid debts never allow an R2 or R3 corrective](/rules/corrective#cor-016) · [COR-019 · Insolvency and bad-debt correctives need a recipient established in Spain](/rules/corrective#cor-019) · [COR-020 · A bad-debt corrective waits six months and needs a business recipient under 50 €](/rules/corrective#cor-020) **Explained in:** [Corrective invoices (R1–R5) › Scenario 3 — PARTIAL bad-debt write-off (R3)](/verifactu/corrective-invoices#scenario-3--partial-bad-debt-write-off-r3) ## COR-009 · An insolvency corrective (R2) needs a declaration of insolvency `Required` · Law · Impact: low · Responsibility: the issuing business. Issue an `R2` corrective only when the customer has not paid the tax charged and, after it accrued, a court has declared the customer insolvent (auto de declaración de concurso). Issue it within the two months that follow the end of the period the insolvency order gives creditors to report their claims, send a copy to the insolvency administrator, and report it to AEAT; the cases the law excludes are in [COR-016](/rules/corrective#cor-016). **Why:** The base can be reduced for insolvency only on that court decision and within that period; outside them the reduction has no legal footing. **Applies to:** invoice types `CORRECTIVE`; `rectification_code` `R2`. **Legal basis:** - Ley 37/1992 del IVA, art. 80.Tres — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a80) > «La base imponible podrá reducirse cuando el destinatario de las operaciones sujetas al Impuesto no haya hecho efectivo el pago de las cuotas repercutidas y siempre que, con posterioridad al devengo de la operación, se dicte auto de declaración de concurso.» - Ley 37/1992 del IVA, art. 80.Tres — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a80) > «La modificación, en su caso, no podrá efectuarse después de transcurrido el plazo de dos meses contados a partir del fin del plazo máximo fijado en el número 5.º del apartado 1 del artículo 21 de la Ley 22/2003, de 9 de julio, Concursal.» - RD 1624/1992 (Reglamento del IVA), art. 24.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28925#a24) > «En los supuestos del apartado tres del artículo 80 de la Ley del Impuesto, deberá expedirse y remitirse asimismo una copia de dicha factura a la administración concursal y en el mismo plazo.» - RD 1624/1992 (Reglamento del IVA), art. 24.2.a).2.º — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28925#a24) > «El acreedor tendrá que comunicar por vía electrónica, a través del formulario disponible a tal efecto en la sede electrónica de la Agencia Estatal de Administración Tributaria, en el plazo de un mes contado desde la fecha de expedición de la factura rectificativa, la modificación de la base imponible practicada» **Incorrect:** Issuing an `R2` corrective because the customer announced it is winding down. **Correct:** Issuing it after the court's declaration of insolvency, keeping a copy of the court order. **Related:** [COR-002 · Pick the reason code: R1–R4 for standard invoices, R5 for simplified](/rules/corrective#cor-002) · [COR-008 · A bad-debt corrective (R3) needs the legal conditions first](/rules/corrective#cor-008) · [COR-016 · Some unpaid debts never allow an R2 or R3 corrective](/rules/corrective#cor-016) **Explained in:** [Corrective invoices (R1–R5) › Scenario 2 — PARTIAL adjustment for bankruptcy (R2)](/verifactu/corrective-invoices#scenario-2--partial-adjustment-for-bankruptcy-r2) ## COR-010 · A provisional price is rectified once the final one is known `Required` · Law · Impact: low · Responsibility: the issuing business. When the price was not known when the tax accrued and you invoiced a provisional amount, issue an `R1` corrective once the final amount is known. **Why:** The provisional amount is only an estimate; the tax due is the one on the final price. **Applies to:** invoice types `CORRECTIVE`; `rectification_code` `R1`. **Legal basis:** - Ley 37/1992 del IVA, art. 80.Seis — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a80) > «Si el importe de la contraprestación no resultara conocido en el momento del devengo del impuesto, el sujeto pasivo deberá fijarlo provisionalmente aplicando criterios fundados, sin perjuicio de su rectificación cuando dicho importe fuera conocido.» **Incorrect:** Invoicing the balance of a job at a final price as a new standard invoice with no link to the provisional one. **Correct:** Issuing an `R1` `PARTIAL` corrective against the provisional invoice for the difference. **Related:** [COR-002 · Pick the reason code: R1–R4 for standard invoices, R5 for simplified](/rules/corrective#cor-002) · [COR-011 · Discounts and rebates granted after the sale go on a corrective](/rules/corrective#cor-011) **Explained in:** [Corrective invoices (R1–R5) › Pick the reason (R1–R5)](/verifactu/corrective-invoices#pick-the-reason-r1r5) ## COR-011 · Discounts and rebates granted after the sale go on a corrective `Required` · Law · Impact: medium · Responsibility: the issuing business. A discount, bonus or volume rebate granted after the operation reduces the base through a corrective invoice (`R1`), not through a negative standard invoice. **Why:** The reduction changes the taxable base of an invoice already issued, which only a corrective can do; a negative standard invoice is not a corrective. **Applies to:** invoice types `CORRECTIVE`; `rectification_code` `R1`. **Legal basis:** - Ley 37/1992 del IVA, art. 80.Uno.2.º — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a80) > «Los descuentos y bonificaciones otorgados con posterioridad al momento en que la operación se haya realizado siempre que sean debidamente justificados.» - AEAT, Aclaraciones a dudas de los desarrolladores (v1.3), 19. Rappels y rectificación — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/FAQs-Desarrolladores.pdf) > «Los rappels se documentan en facturas rectificativas.» **Incorrect:** Issuing a new standard invoice with a negative line for the rebate. **Correct:** Issuing a partial corrective against the invoice the rebate applies to. ```json { "rectification_type": "PARTIAL", "rectification_code": "R1", "reason": "Volume rebate for Q3", "lines": [{ "description": "Volume rebate Q3", "quantity": -1, "unit_price": 120, "main_tax": { "type": "IVA", "percentage": 21 } }] } ``` **Related:** [COR-002 · Pick the reason code: R1–R4 for standard invoices, R5 for simplified](/rules/corrective#cor-002) · [COR-012 · Returns can be netted only on a later supply to the same customer](/rules/corrective#cor-012) · [CNT-019 · Only a corrective invoice totals less than zero](/rules/contents#cnt-019) **Explained in:** [Corrective invoices (R1–R5) › Pick the reason (R1–R5)](/verifactu/corrective-invoices#pick-the-reason-r1r5) ## COR-012 · Returns can be netted only on a later supply to the same customer `Recommended` · Law · Impact: low · Responsibility: the issuing business. The API also answers the error codes listed. Document returned goods or packaging with a corrective. The law lets you net them on the invoice of a later supply instead only when it goes to the same customer and every operation carries the same VAT rate. The API accepts negative lines on a standard or simplified invoice for that netting, and for discounts not included in the unit price (art. 6.1.f), as long as the invoice total is not negative: a negative result is a correction and goes on a corrective ([CNT-019](/rules/contents#cnt-019)). **Why:** Outside that exception, a return changes the base of the invoice it came from and needs a corrective against it. An ordinary invoice with a negative total would be a credit note without the link to the invoice it corrects. **Applies to:** invoice types `STANDARD`, `CORRECTIVE` **Error codes:** [`NEGATIVE_TOTAL_REQUIRES_RECTIFICATIVE`](/errors/NEGATIVE_TOTAL_REQUIRES_RECTIFICATIVE) (`422`) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 15.2, párrafo segundo — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a15) > «cuando la modificación de la base imponible sea consecuencia de la devolución de mercancías o de envases y embalajes que se realicen con ocasión de un posterior suministro que tenga el mismo destinatario [...] no será necesaria la expedición de una factura rectificativa, sino que se podrá practicar la rectificación en la factura que se expida por dicho suministro [...] La rectificación se podrá realizar de este modo siempre que el tipo impositivo aplicable a todas las operaciones sea el mismo, con independencia de que su resultado sea positivo o negativo.» - RD 1619/2012 (Reglamento de facturación), art. 6.1.f) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «incluyendo el precio unitario sin Impuesto de dichas operaciones, así como cualquier descuento o rebaja que no esté incluido en dicho precio unitario.» **Incorrect:** Deducting returned crates from the next invoice to a different customer. **Correct:** A later supply of 500 € to the same customer at 21 % with a line of −60 € for returned crates at 21 %: total 440 € plus VAT. Or an `R1` `PARTIAL` corrective against the invoice the crates were delivered with. **Related:** [COR-011 · Discounts and rebates granted after the sale go on a corrective](/rules/corrective#cor-011) · [CNT-019 · Only a corrective invoice totals less than zero](/rules/contents#cnt-019) ## COR-013 · A corrective is only for the causes the law lists `Required` · Law · Impact: low · Responsibility: the issuing business. Do not issue a corrective for anything but a missing requirement, wrongly charged tax or an art. 80 LIVA change. An invoice issued for an operation that never took place is voided and, if needed, replaced by a new invoice; that replacement is never a corrective. Neither is an invoice issued in exchange for earlier simplified invoices, nor one that replaces an invoice only to remove a withholding ([COR-024](/rules/corrective#cor-024)). **Why:** Only those causes make an invoice a corrective; a corrective issued for anything else misreports what happened. An invoice for a sale that never took place does not fail a requirement: it should not exist, so it is voided. **Applies to:** invoice types `CORRECTIVE` **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 15.1 y 15.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a15) > «Deberá expedirse una factura rectificativa en los casos en que la factura original no cumpla alguno de los requisitos que se establecen en los artículos 6 ó 7 [...] 2. Igualmente, será obligatoria la expedición de una factura rectificativa en los casos en que las cuotas impositivas repercutidas se hubiesen determinado incorrectamente o se hubieran producido las circunstancias que, según lo dispuesto en el artículo 80 de la Ley del Impuesto, dan lugar a la modificación de la base imponible.» - RD 1619/2012 (Reglamento de facturación), art. 15.6 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a15) > «Únicamente tendrán la consideración de facturas rectificativas las que se expidan por alguna de las causas previstas en los apartados 1 y 2. No obstante, las facturas que se expidan en sustitución o canje de facturas simplificadas expedidas con anterioridad no tendrán la condición de rectificativas, siempre que las facturas simplificadas expedidas en su día cumpliesen los requisitos establecidos en el artículo 7.1.» **Incorrect:** Issuing a corrective to cancel an invoice for a sale that never happened. **Correct:** Voiding that invoice, because it should never have been issued. **Related:** [COR-001 · Wrong data on an issued invoice is fixed with a corrective](/rules/corrective#cor-001) · [COR-024 · A corrective does not change only the withholding](/rules/corrective#cor-024) · [SIM-007 · Exchanging a simplified invoice for a full one](/rules/simplified#sim-007) · [VOI-001 · Void only an invoice that should never have been issued](/rules/void#voi-001) **Explained in:** [Cancel vs amend](/verifactu/cancel-and-fix) ## COR-014 · A corrective keeps the operation date of the original `Required` · AEAT criterion · Impact: low · Checked by the API: BeeL. applies it. The operation date of a corrective is the date the original supply or service took place. BeeL. sets it from the original invoice: its `operation_date`, or its `issue_date` when the original declared no other operation date. Every corrective carries it, whoever asks for it. **Why:** The corrective adjusts the tax of that operation, so AEAT expects it dated like the operation, not like the day it was issued. An original without `operation_date` documents an operation of its issue date; leaving the corrective without one would date it on the day of the corrective instead. **Applies to:** invoice types `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice) **Legal basis:** - AEAT, Preguntas frecuentes SIF y VERI*FACTU, Procedimientos de facturación: R1 — [source](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/procedimientos-facturacion.html) > «Se incluirá como fecha de operación la fecha en que se realizó la entrega o prestó el servicio, indicada en la factura inicial. En el caso de rectificar varias facturas con una única factura rectificativa se indicará la fecha más reciente.» - AEAT, Preguntas frecuentes SIF y VERI*FACTU, Procedimientos de facturación: fecha de operación de una rectificativa — [source](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/procedimientos-facturacion.html) > «¿Qué fecha de operación debe hacerse constar en una factura rectificativa? La fecha de realización de la operación correspondiente a la factura original que se está rectificando.» - RD 1619/2012 (Reglamento de facturación), art. 6.1.i — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «i) La fecha en que se hayan efectuado las operaciones que se documentan o en la que, en su caso, se haya recibido el pago anticipado, siempre que se trate de una fecha distinta a la de expedición de la factura.» **Incorrect:** Recording the corrective of a March delivery as an operation of the day the corrective was issued. **Correct:** An invoice issued on 7 May for a service done that day, without `operation_date`, is corrected in October: the corrective carries 7 May as its operation date. **Related:** [DAT-004 · Send the operation date when it differs from the issue date](/rules/dates#dat-004) · [COR-005 · A corrective identifies the invoice it rectifies](/rules/corrective#cor-005) ## COR-015 · Do not raise the VAT charged to a consumer through a corrective `Required` · Law · Impact: low · Responsibility: the issuing business. Do not issue a corrective that increases the VAT charged to a recipient who is not a business, unless it follows an art. 80 LIVA cause or a legal rise of the tax rate. **Why:** The law does not let the issuer pass its own tax error on to a consumer after the sale. **Applies to:** invoice types `CORRECTIVE`; Recipient who is not a business. **Legal basis:** - Ley 37/1992 del IVA, art. 89.Tres.1.º — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a89) > «Cuando la rectificación no esté motivada por las causas previstas en el artículo 80 de esta Ley, implique un aumento de las cuotas repercutidas y los destinatarios de las operaciones no actúen como empresarios o profesionales, salvo en supuestos de elevación legal de los tipos impositivos» **Incorrect:** Charging a consumer, through an `R5` corrective, the VAT you forgot to add to a ticket. **Correct:** Absorbing the error, or correcting it only if the rise comes from a legal change of the rate. **Related:** [COR-001 · Wrong data on an issued invoice is fixed with a corrective](/rules/corrective#cor-001) · [TAX-001 · Apply the VAT rate in force when the operation took place](/rules/taxes#tax-001) ## COR-016 · Some unpaid debts never allow an R2 or R3 corrective `Required` · Law · Impact: low · Responsibility: the issuing business. Do not reduce the base for insolvency (`R2`) or bad debt (`R3`) for the part of a debt secured by a real guarantee, guaranteed by a credit institution or covered by credit or surety insurance, or for debts between related parties. Debts owed or guaranteed by public entities are excluded from `R2`, and an `R3` is not issued for operations accrued before the customer was declared insolvent. A recipient not established in Spain is covered by [COR-019](/rules/corrective#cor-019). **Why:** The law excludes these debts from the reduction of the base; a corrective issued for them gives back a tax that is still owed. **Applies to:** invoice types `CORRECTIVE`; `rectification_code` `R2` or `R3`. **Legal basis:** - Ley 37/1992 del IVA, art. 80.Cinco.1.ª — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a80) > «1.ª No procederá la modificación de la base imponible en los casos siguientes: a) Créditos que disfruten de garantía real, en la parte garantizada. b) Créditos afianzados por entidades de crédito o sociedades de garantía recíproca o cubiertos por un contrato de seguro de crédito o de caución, en la parte afianzada o asegurada. c) Créditos entre personas o entidades vinculadas definidas en el artículo 79, apartado cinco, de esta Ley. d) Créditos adeudados o afianzados por Entes públicos.» - Ley 37/1992 del IVA, art. 80.Cinco.2.ª y 3.ª — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a80) > «2.ª Tampoco procederá la modificación de la base imponible cuando el destinatario de las operaciones no esté establecido en el territorio de aplicación del Impuesto, ni en Canarias, Ceuta o Melilla. [...] 3.ª Tampoco procederá la modificación de la base imponible de acuerdo con el apartado cuatro del artículo 80 de esta Ley con posterioridad al auto de declaración de concurso para los créditos correspondientes a cuotas repercutidas por operaciones cuyo devengo se produzca con anterioridad a dicho auto.» **Incorrect:** Issuing an `R3` corrective for an unpaid invoice to a subsidiary of the same group. **Correct:** Leaving the invoice to the related company as it is and pursuing the debt, without reducing the base. **Related:** [COR-008 · A bad-debt corrective (R3) needs the legal conditions first](/rules/corrective#cor-008) · [COR-009 · An insolvency corrective (R2) needs a declaration of insolvency](/rules/corrective#cor-009) · [COR-019 · Insolvency and bad-debt correctives need a recipient established in Spain](/rules/corrective#cor-019) ## COR-017 · A corrective keeps the recipient, except to correct the recipient's data `Required` · Law · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed. A corrective goes to the recipient of the invoice it rectifies, with the data recorded on that invoice, and takes no `recipient`. The exception is correcting that recipient's own data when the invoice recorded them wrong (name, tax ID or address of the right recipient): send `recipient` with the corrected data, `rectification_type` `PARTIAL`, `rectification_code` `R4` and no `lines`. That corrective carries the corrected recipient, leaves the amounts unchanged (its lines negate what is still invoiced and repeat it, so each rate nets to zero) and leaves the original `RECTIFIED`. When the original went to a registered customer, the corrected recipient must be that same customer (`CORRECTIVE_RECIPIENT_IS_ANOTHER_PERSON` otherwise), and data identical to the recorded ones are refused with `CORRECTIVE_RECIPIENT_UNCHANGED`. Any other `recipient` is refused with `CORRECTIVE_RECIPIENT_NOT_ACCEPTED`. If the invoice was issued to another person altogether, correct it in full with a `TOTAL` corrective and issue a new invoice to the right customer. **Why:** An invoice with the recipient's data wrong does not meet the invoice requirements, and the law fixes that with a corrective; voiding it and issuing another leaves the defective invoice standing. Changing the person, instead, is not a correction of data: the operation with the first person did not happen, so that invoice is credited and the right one is issued. **Applies to:** invoice types `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice) **Error codes:** [`CORRECTIVE_RECIPIENT_NOT_ACCEPTED`](/errors/CORRECTIVE_RECIPIENT_NOT_ACCEPTED) (`422`), [`CORRECTIVE_RECIPIENT_IS_ANOTHER_PERSON`](/errors/CORRECTIVE_RECIPIENT_IS_ANOTHER_PERSON) (`422`), [`CORRECTIVE_RECIPIENT_UNCHANGED`](/errors/CORRECTIVE_RECIPIENT_UNCHANGED) (`422`) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 15.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a15) > «1. Deberá expedirse una factura rectificativa en los casos en que la factura original no cumpla alguno de los requisitos que se establecen en los artículos 6 ó 7, sin perjuicio de lo establecido en el apartado 6 de este artículo.» - RD 1619/2012 (Reglamento de facturación), art. 6.1.c) y e) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «c) Nombre y apellidos, razón o denominación social completa, tanto del obligado a expedir factura como del destinatario de las operaciones. [...] e) Domicilio, tanto del obligado a expedir factura como del destinatario de las operaciones.» - AEAT, Preguntas frecuentes SIF y VERI*FACTU, Procedimientos de facturación: tipo de facturas, R4 — [source](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/procedimientos-facturacion.html) > «"R4": Factura Rectificativa (Resto). Se indicará tipo de factura R4 en estas situaciones: [...] Cuando se haya consignado erróneamente algún dato no monetario de la factura» **Incorrect:** Voiding an invoice whose customer's tax ID was mistyped and issuing it again: the defective invoice stays on file uncorrected. **Correct:** Correcting the mistyped tax ID with an `R4` corrective that carries the corrected recipient. ```json { "rectification_type": "PARTIAL", "rectification_code": "R4", "reason": "The customer's tax ID was mistyped", "recipient": { "customer_id": "8f1e…" } } ``` **Related:** [COR-005 · A corrective identifies the invoice it rectifies](/rules/corrective#cor-005) · [COR-001 · Wrong data on an issued invoice is fixed with a corrective](/rules/corrective#cor-001) · [REC-009 · Check the data AEAT accepted with errors](/rules/records#rec-009) · [VOI-002 · Void an issued invoice through the void operation; delete a draft](/rules/void#voi-002) **Explained in:** [Corrective invoices (R1–R5)](/verifactu/corrective-invoices) ## COR-018 · A corrective can always correct what the original declared `Required` · Law · Impact: high · Checked by the API: BeeL. applies it. A corrective is judged against the treatment its original already had, not against the rules that BeeL. applies to new invoices. A regime key, exemption reason, withholding rate or surcharge rate that a new invoice can no longer use is accepted in the corrective only if the original carried it on one of its lines; the corrective is then registered as the original was. Anything the original did not carry is judged as on a new invoice. The checks AEAT itself makes on the record still apply, and a corrective, like any invoice, needs at least one NORMAL line. **Why:** The law makes the corrective mandatory whenever the original was wrong or its amounts change, so refusing it would leave the original with no way to be corrected. What a new invoice may no longer use is exactly what a corrective has to reverse. **Applies to:** invoice types `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 15.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a15) > «Deberá expedirse una factura rectificativa en los casos en que la factura original no cumpla alguno de los requisitos que se establecen en los artículos 6 ó 7, sin perjuicio de lo establecido en el apartado 6 de este artículo.» - RD 1619/2012 (Reglamento de facturación), art. 15.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a15) > «Igualmente, será obligatoria la expedición de una factura rectificativa en los casos en que las cuotas impositivas repercutidas se hubiesen determinado incorrectamente o se hubieran producido las circunstancias que, según lo dispuesto en el artículo 80 de la Ley del Impuesto, dan lugar a la modificación de la base imponible.» **Incorrect:** A partial corrective of an invoice issued under regime key `01` without withholding adds a line under key `03` with a 15 % withholding: it is judged as a new invoice and rejected. **Correct:** The full corrective of an old invoice carries the same regime key, exemption reason and withholding rate, negated, and is registered with the same breakdown the original had. **Related:** [COR-014 · A corrective keeps the operation date of the original](/rules/corrective#cor-014) · [TAX-016 · Regime keys 03, 06 and 14 are not accepted](/rules/taxes#tax-016) · [TAX-018 · An issued invoice does not use the intra-EU acquisition exemption](/rules/taxes#tax-018) · [TAX-019 · An issuer that is not an individual never bears the IRPF rates of individuals](/rules/taxes#tax-019) ## COR-019 · Insolvency and bad-debt correctives need a recipient established in Spain `Required` · Law · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed. Do not issue an `R2` (insolvency) or `R3` (bad debt) corrective when the recipient is not established in Spain, the Canary Islands, Ceuta or Melilla. The exception is an insolvency declared by a court of another EU member state under Regulation (EU) 2015/848, which may reduce the base as an insolvency: an `R2` accepts a recipient of another member state, an `R3` does not. The API reads where the recipient is established from its address, or from the country of its identifier when there is no address (a Spanish NIF is Spain), and refuses the corrective with `CORRECTIVE_RECIPIENT_NOT_ESTABLISHED` when that is elsewhere or unknown. **Why:** The law does not allow the base to be reduced for these debts, so the VAT the corrective gives back is still owed. **Applies to:** invoice types `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice); `rectification_code` `R2` or `R3`. **Error codes:** [`CORRECTIVE_RECIPIENT_NOT_ESTABLISHED`](/errors/CORRECTIVE_RECIPIENT_NOT_ESTABLISHED) (`422`) **Legal basis:** - Ley 37/1992 del IVA, art. 80.Cinco.2.ª — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a80) > «Cinco. En relación con los supuestos de modificación de la base imponible comprendidos en los apartados tres y cuatro anteriores, se aplicarán las siguientes reglas: [...] 2.ª Tampoco procederá la modificación de la base imponible cuando el destinatario de las operaciones no esté establecido en el territorio de aplicación del Impuesto, ni en Canarias, Ceuta o Melilla. Quedan excluidos de lo dispuesto en el párrafo anterior los supuestos de créditos incobrables como consecuencia de un proceso de insolvencia declarado por un órgano jurisdiccional de otro Estado miembro cuando se trate de procedimientos de insolvencia a los que resulte de aplicación el Reglamento (UE) 2015/848 del Parlamento Europeo y del Consejo, de 20 de mayo de 2015, sobre procedimientos de insolvencia, que podrán dar lugar, en su caso, a la modificación de la base imponible del sujeto pasivo en los términos previstos en el artículo 80.tres de esta ley.» **Incorrect:** An `R3` corrective for an unpaid invoice to a customer based in France: the API answers [`CORRECTIVE_RECIPIENT_NOT_ESTABLISHED`](/errors/CORRECTIVE_RECIPIENT_NOT_ESTABLISHED). **Correct:** An `R2` corrective for a French customer declared insolvent by a French court, once the conditions of article 80.Tres are met. **Related:** [COR-009 · An insolvency corrective (R2) needs a declaration of insolvency](/rules/corrective#cor-009) · [COR-008 · A bad-debt corrective (R3) needs the legal conditions first](/rules/corrective#cor-008) · [COR-016 · Some unpaid debts never allow an R2 or R3 corrective](/rules/corrective#cor-016) **Explained in:** [Corrective invoices (R1–R5)](/verifactu/corrective-invoices) ## COR-020 · A bad-debt corrective waits six months and needs a business recipient under 50 € `Required` · Law · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed. Do not issue an `R3` corrective before six months have passed since the tax accrued: the API counts them from the original's operation date and refuses an earlier one with `CORRECTIVE_BAD_DEBT_TOO_EARLY`, giving the first possible day. Six months is the period only for a business whose turnover the year before did not exceed 6,010,121.04 €; otherwise it is one year, and applying it is the issuer's responsibility. When the base of the operation is 50 € or less, the recipient must have acted as a business or professional: declare it with `recipient_is_business`, or the corrective is refused with `CORRECTIVE_BAD_DEBT_BASE_TOO_LOW`. **Why:** Before the waiting period, or for a consumer's debt of 50 € or less, the debt is not uncollectable in the legal sense and the base cannot be reduced. **Applies to:** invoice types `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice); `rectification_code` `R3`. **Error codes:** [`CORRECTIVE_BAD_DEBT_TOO_EARLY`](/errors/CORRECTIVE_BAD_DEBT_TOO_EARLY) (`422`), [`CORRECTIVE_BAD_DEBT_BASE_TOO_LOW`](/errors/CORRECTIVE_BAD_DEBT_BASE_TOO_LOW) (`422`) **Legal basis:** - Ley 37/1992 del IVA, art. 80.Cuatro.A).1.ª — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a80) > «1.ª Que haya transcurrido un año desde el devengo del Impuesto repercutido sin que se haya obtenido el cobro de todo o parte del crédito derivado del mismo. [...] Cuando el titular del derecho de crédito cuya base imponible se pretende reducir sea un empresario o profesional cuyo volumen de operaciones, calculado conforme a lo dispuesto en el artículo 121 de esta Ley, no hubiese excedido durante el año natural inmediato anterior de 6.010.121,04 euros, el plazo a que se refiere esta condición 1.ª podrá ser, de seis meses o un año.» - Ley 37/1992 del IVA, art. 80.Cuatro.A).3.ª — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a80) > «3.ª Que el destinatario de la operación actúe en la condición de empresario o profesional, o, en otro caso, que la base imponible de aquella, Impuesto sobre el Valor Añadido excluido, sea superior a 50 euros.» **Incorrect:** An `R3` corrective in March for a service invoiced in January: the API answers [`CORRECTIVE_BAD_DEBT_TOO_EARLY`](/errors/CORRECTIVE_BAD_DEBT_TOO_EARLY) with the first day it is possible. **Correct:** An `R3` corrective for an unpaid 40 € service to a self-employed customer, declaring that the customer acted as a business. ```json { "rectification_type": "TOTAL", "rectification_code": "R3", "reason": "Unpaid for more than six months; notarial demand sent on 2026-05-04", "recipient_is_business": true } ``` **Related:** [COR-008 · A bad-debt corrective (R3) needs the legal conditions first](/rules/corrective#cor-008) · [COR-019 · Insolvency and bad-debt correctives need a recipient established in Spain](/rules/corrective#cor-019) · [COR-006 · Issue the corrective as soon as you know, within 4 years](/rules/corrective#cor-006) **Explained in:** [Corrective invoices (R1–R5) › Scenario 3 — PARTIAL bad-debt write-off (R3)](/verifactu/corrective-invoices#scenario-3--partial-bad-debt-write-off-r3) ## COR-021 · An identical corrective a moment after another is taken as a double submission `Recommended` · BeeL. rule · Impact: low · Checked by the API: a request that breaks it is rejected with the error codes listed. A corrective identical to another live one of the same invoice (same type, reason code, reason, taxable base and amount payable, disbursements included) created less than two minutes earlier is refused with `CORRECTIVE_RECENT_DUPLICATE`: it is a double click or a retry. After that window an identical corrective is issued, since two refunds of the same amount are two correctives. To retry a request safely at any time, send an `Idempotency-Key`. Correctives that come from a payment integration carry their own identity and are not checked this way. **Why:** A double submission would issue a second fiscal document for the same correction. Blocking identical correctives for a whole day, instead, refused legitimate repeated refunds. **Applies to:** invoice types `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice) **Error codes:** [`CORRECTIVE_RECENT_DUPLICATE`](/errors/CORRECTIVE_RECENT_DUPLICATE) (`422`) **Incorrect:** Retrying a corrective after a timeout without an `Idempotency-Key`, a few seconds later: the API answers [`CORRECTIVE_RECENT_DUPLICATE`](/errors/CORRECTIVE_RECENT_DUPLICATE) with the number of the one already issued. **Correct:** Retrying with the same `Idempotency-Key`: the API returns the corrective already issued instead of a new one. ```http POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective Idempotency-Key: 5f0c2d1e-refund-0042 ``` **Related:** [COR-023 · A corrective never rectifies more than was invoiced](/rules/corrective#cor-023) · [LIF-004 · Retry writes with the same Idempotency-Key](/rules/lifecycle#lif-004) ## COR-022 · An invoice whose record AEAT rejected is fixed before it is corrected `Required` · AEAT criterion · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed. When AEAT rejected the record of the original invoice and it has not been resubmitted, fix it and resubmit it first; a corrective against it is refused with `CORRECTIVE_ORIGINAL_RECORD_REJECTED`. An original whose record is still being processed, or that was issued outside VeriFactu, can be corrected. **Why:** A rejected record never reaches AEAT's books. A corrective states the difference from the original, so issued first it would be recorded on its own, as a correction of an invoice AEAT does not have. **Applies to:** invoice types `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice); VeriFactu enabled for the original invoice. **Error codes:** [`CORRECTIVE_ORIGINAL_RECORD_REJECTED`](/errors/CORRECTIVE_ORIGINAL_RECORD_REJECTED) (`422`) **Legal basis:** - AEAT, Aclaraciones a dudas de los desarrolladores (v1.3), 17. Aclaraciones, caso 2.a) — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/FAQs-Desarrolladores.pdf) > «En el probable caso de que el RF generado de la “factura errónea” fuera rechazado por la AEAT (lo que podría servir para que el usuario se percatara del error cometido), ese RF rechazado no figuraría jamás en los sistemas de la AEAT (aunque constaría un rechazo).» - AEAT, Aclaraciones a dudas de los desarrolladores (v1.3), 17. Aclaraciones, caso 2.b) — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/FAQs-Desarrolladores.pdf) > «Si el RF generado de la “factura errónea” fuera rechazado por la AEAT (lo que podría servir para que el usuario se percatara del error cometido), habría que [...] corregir la factura original y generar un RF de alta de subsanación, sin registro previo en la AEAT (ya que el RF “original” fue rechazado y no existe en la AEAT).» **Incorrect:** Issuing a corrective for an invoice whose record AEAT rejected for a wrong recipient NIF: the API answers [`CORRECTIVE_ORIGINAL_RECORD_REJECTED`](/errors/CORRECTIVE_ORIGINAL_RECORD_REJECTED). **Correct:** Fixing the recipient's data, resubmitting the original's record and, once AEAT accepts it, issuing the corrective if one is still due. **Related:** [REC-008 · Follow submission_status and fix what AEAT rejects](/rules/records#rec-008) · [REC-009 · Check the data AEAT accepted with errors](/rules/records#rec-009) · [COR-005 · A corrective identifies the invoice it rectifies](/rules/corrective#cor-005) **Explained in:** [Handling AEAT rejections](/verifactu/handling-rejections) ## COR-023 · A corrective never rectifies more than was invoiced `Required` · Law · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. A corrective rectifies what is still invoiced: the original invoice plus the correctives already issued against it, voided ones excluded. A `TOTAL` corrective rectifies that remaining balance, negating every line of the original and of its live correctives, and is refused with `CORRECTIVE_NOTHING_LEFT_TO_RECTIFY` when previous correctives already left nothing. A `PARTIAL` corrective may raise any amount, but may not take the taxable base of any rate (tax, rate and equivalence surcharge) below zero: that is refused with `CORRECTIVE_EXCEEDS_INVOICED_AMOUNT`, which names the rate and how much of it is left. A `PARTIAL` corrective carries no disbursements (`SUPLIDO` lines): a disbursement is outside the taxable base, so there is nothing in it to rectify, and such a line is refused with `CORRECTIVE_PARTIAL_SUPLIDO_NOT_ALLOWED`. An amount invoiced as a disbursement that was not one was part of the taxable base, and is rectified as a `NORMAL` line with its tax. A `TOTAL` corrective carries the original's disbursements, negated, as they were. **Why:** The taxable base of an operation changes by the amount that corresponds to what changed. After a partial credit of 300 on an invoice of 1,000, what is left invoiced is 700; a corrective that negated the 1,000 again would give back 1,300 and a tax that was never charged. **Applies to:** invoice types `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice) **Error codes:** [`CORRECTIVE_EXCEEDS_INVOICED_AMOUNT`](/errors/CORRECTIVE_EXCEEDS_INVOICED_AMOUNT) (`422`), [`CORRECTIVE_NOTHING_LEFT_TO_RECTIFY`](/errors/CORRECTIVE_NOTHING_LEFT_TO_RECTIFY) (`422`), [`CORRECTIVE_PARTIAL_SUPLIDO_NOT_ALLOWED`](/errors/CORRECTIVE_PARTIAL_SUPLIDO_NOT_ALLOWED) **Legal basis:** - Ley 37/1992 del IVA, art. 80.Dos — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a80) > «Dos. Cuando por resolución firme, judicial o administrativa o con arreglo a Derecho o a los usos de comercio queden sin efecto total o parcialmente las operaciones gravadas o se altere el precio después del momento en que la operación se haya efectuado, la base imponible se modificará en la cuantía correspondiente.» - RD 1619/2012 (Reglamento de facturación), art. 15.5 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a15) > «Cuando lo que se expida sea una factura rectificativa, los datos a los que se refiere el artículo 6.1.f), g) y h) expresarán la rectificación efectuada.» - Ley 37/1992 del IVA, art. 78.Tres.3.º — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a78) > «Las sumas pagadas en nombre y por cuenta del cliente en virtud de mandato expreso del mismo. El sujeto pasivo vendrá obligado a justificar la cuantía efectiva de tales gastos y no podrá proceder a la deducción del impuesto que eventualmente los hubiera gravado.» - RD 1619/2012 (Reglamento de facturación), art. 15.6 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a15) > «Únicamente tendrán la consideración de facturas rectificativas las que se expidan por alguna de las causas previstas en los apartados 1 y 2.» **Incorrect:** Rectifying an invoice of 1,000 that already has a −300 `PARTIAL` corrective with a `PARTIAL` of −800 at the same rate: it would take the base to −100, and the API answers [`CORRECTIVE_EXCEEDS_INVOICED_AMOUNT`](/errors/CORRECTIVE_EXCEEDS_INVOICED_AMOUNT). **Correct:** Issuing a `TOTAL` corrective on that invoice: it negates the 1,000 and the −300, rectifies 700 and leaves the invoice at zero. ```json { "rectification_type": "TOTAL", "rectification_code": "R1", "reason": "Order cancelled by agreement with the customer" } ``` **Related:** [COR-003 · A corrective shows the difference or the amounts after the correction](/rules/corrective#cor-003) · [COR-001 · Wrong data on an issued invoice is fixed with a corrective](/rules/corrective#cor-001) · [COR-007 · A wrong corrective is fixed against the original, not corrected itself](/rules/corrective#cor-007) **Explained in:** [Corrective invoices (R1–R5)](/verifactu/corrective-invoices) ## COR-024 · A corrective does not change only the withholding `Required` · Law · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed. A `PARTIAL` corrective whose lines negate operations of the invoice and repeat them unchanged (same description, amount and rate) except for the income tax withholding is refused with `CORRECTIVE_WITHHOLDING_ONLY`. The withholding is not one of the details an invoice must contain, nor a VAT amount, so correcting it alone is not a cause for a corrective. When an invoice carried a withholding it should not have, void it and issue a new invoice without it. Moving part of the price between a line with withholding and one without it corrects the operations themselves and is accepted. **Why:** Only an invoice that fails a legal requirement, charges the wrong VAT or needs an art. 80 LIVA change is a corrective. A document issued for any other reason and filed as a corrective misreports what happened, and its billing record carries no amount at all, because the record has no withholding. **Applies to:** invoice types `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice) **Error codes:** [`CORRECTIVE_WITHHOLDING_ONLY`](/errors/CORRECTIVE_WITHHOLDING_ONLY) (`422`) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 15.1 y 15.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a15) > «Deberá expedirse una factura rectificativa en los casos en que la factura original no cumpla alguno de los requisitos que se establecen en los artículos 6 ó 7 [...] 2. Igualmente, será obligatoria la expedición de una factura rectificativa en los casos en que las cuotas impositivas repercutidas se hubiesen determinado incorrectamente o se hubieran producido las circunstancias que, según lo dispuesto en el artículo 80 de la Ley del Impuesto, dan lugar a la modificación de la base imponible.» - RD 1619/2012 (Reglamento de facturación), art. 15.6 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a15) > «Únicamente tendrán la consideración de facturas rectificativas las que se expidan por alguna de las causas previstas en los apartados 1 y 2.» **Incorrect:** A `PARTIAL` corrective that negates a line of 1,000 at 21% with 15% withholding and adds it again with no withholding: the API answers [`CORRECTIVE_WITHHOLDING_ONLY`](/errors/CORRECTIVE_WITHHOLDING_ONLY). **Correct:** Voiding the invoice, confirming it was issued in error, and issuing a new one without the withholding. **Related:** [COR-001 · Wrong data on an issued invoice is fixed with a corrective](/rules/corrective#cor-001) · [COR-013 · A corrective is only for the causes the law lists](/rules/corrective#cor-013) · [VOI-001 · Void only an invoice that should never have been issued](/rules/void#voi-001) **Explained in:** [Cancel vs amend](/verifactu/cancel-and-fix) [← All rules](/rules#all-rules) ## Related - [Corrective invoices (R1–R5)](/verifactu/corrective-invoices) — pick the right rectification type and code, and see the canonical request shapes BeeL. accepts for each scenario - [Cancel vs amend](/verifactu/cancel-and-fix) — decide between cancelling an invoice (void) and issuing a corrective invoice, two operations with different fiscal weight - [Handling AEAT rejections](/verifactu/handling-rejections) — how to read a REJECTED invoice (and an accepted one that carries an error code), what to do for each family of AEAT codes, and how to make sure you never miss one --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Dates and deadlines The dates an invoice carries and the deadlines for issuing it, sending it and charging its VAT. [← All rules](/rules#all-rules) An invoice has two dates: the issue date, which BeeL. sets when you issue, and the operation date, which you send when the sale happened on another day. The law also sets when an invoice has to be issued and delivered; those deadlines are the issuer's to keep. 14 rules: 11 from the law, 2 AEAT criteria, 1 BeeL. rule. [How to read a rule](/rules#how-to-read-a-rule). ## DAT-001 · Do not send an issue date `Required` · BeeL. rule · Impact: critical · Checked by the API: BeeL. applies it. The API has no writable issue date: an invoice is dated the day it is issued, and a scheduled one the day it is scheduled for. To record when the sale happened, send `operation_date`. **Why:** Backdating or postdating an invoice is not possible: the issue date is the day its billing record is generated. An integration that tries to set it ends up with invoices dated differently from what it expects. **Applies to:** operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice), [`PATCH /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/patchCompanyInvoice) **Incorrect:** Trying to send an issue date set to the last day of the previous month to close the month's invoicing. **Correct:** Issuing today, with the date the service was provided as `operation_date`. ```json { "operation_date": "2026-08-31", "lines": [{ "description": "August maintenance", "quantity": 1, "unit_price": 300, "main_tax": { "type": "IVA", "percentage": 21 } }] } ``` **Related:** [DAT-002 · The issue date is the day the billing record is generated](/rules/dates#dat-002) · [DAT-004 · Send the operation date when it differs from the issue date](/rules/dates#dat-004) · [LIF-002 · Only a draft can be issued](/rules/lifecycle#lif-002) **Explained in:** [Invoice lifecycle › Dates](/guides/invoice-lifecycle#dates) ## DAT-002 · The issue date is the day the billing record is generated `Required` · AEAT criterion · Impact: high · Checked by the API: BeeL. applies it. An invoice's issue date is the date its billing record is generated, which is also, as a rule, the day the record is sent: it cannot be later than today nor set to an earlier day. BeeL. dates the invoice when you issue it. **Why:** An issue date that does not match the record's makes the record inconsistent; AEAT rejects an issue date in the future. **Applies to:** statuses `ISSUED`; Invoices under VeriFactu. **Legal basis:** - AEAT, Preguntas frecuentes SIF y VERI*FACTU, Sistemas VERI*FACTU — [source](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/sistemas-verifactu.html) > «La fecha de expedición de la factura debe coincidir con la de generación del registro de facturación. Ambas fechas, generalmente deben corresponderse con la fecha en que se remite el Registro de facturación.» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.1 Agrupación IDFactura — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «La FechaExpedicionFactura no podrá ser superior a la fecha actual.» - RD 1007/2023 (RRSIF), art. 9 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2023-24840#a9) > «deberán generar automáticamente un registro de facturación de alta de forma simultánea o inmediatamente anterior a la expedición de cada factura.» **Incorrect:** Keeping a month of invoices as drafts and expecting them to carry the dates of each sale when you issue them at month end. **Correct:** Issuing each invoice when the sale happens, or issuing later with each sale's date as `operation_date` and within the deadlines. **Related:** [DAT-001 · Do not send an issue date](/rules/dates#dat-001) · [DAT-006 · Invoice businesses before day 16 of the following month](/rules/dates#dat-006) · [REC-002 · The record goes to AEAT as soon as the invoice is issued](/rules/records#rec-002) **Explained in:** [What AEAT receives from your invoice › Dates and late submission](/verifactu/what-aeat-receives#dates-and-late-submission) · [Invoice lifecycle › Dates](/guides/invoice-lifecycle#dates) ## DAT-003 · The operation date is never after the issue date nor over twenty years old `Required` · AEAT criterion · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed. `operation_date` is the day the operation took place or the advance payment was received, so it cannot be later than the issue date. It cannot be more than twenty years before the issue date either. To bill before delivering, invoice the advance payment with the day you received it. **Why:** AEAT does not accept an operation dated in the future except in two special regimes, nor one dated more than twenty years back; an invoice dated before the operation it documents is not consistent. **Applies to:** operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`PATCH /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/patchCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice) **Error codes:** [`OPERATION_DATE_AFTER_ISSUE_DATE`](/errors/OPERATION_DATE_AFTER_ISSUE_DATE) (`422`), [`OPERATION_DATE_TOO_OLD`](/errors/OPERATION_DATE_TOO_OLD) **Legal basis:** - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.7 FechaOperacion — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «el campo FechaOperacion solo podrá ser superior a la fecha actual, si ClaveRegimen= "14" o "15”.» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.7 FechaOperacion — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «La FechaOperacion no debe ser inferior a la fecha actual menos veinte años y no debe ser superior al año siguiente de la fecha actual.» **Incorrect:** Issuing today an invoice for next week's delivery with that date as `operation_date`: the API answers [`OPERATION_DATE_AFTER_ISSUE_DATE`](/errors/OPERATION_DATE_AFTER_ISSUE_DATE). **Correct:** Issuing the invoice on the delivery day, or invoicing now the advance payment you already received. **Related:** [DAT-004 · Send the operation date when it differs from the issue date](/rules/dates#dat-004) · [DAT-010 · Invoice advance payments when you receive them](/rules/dates#dat-010) **Explained in:** [Invoice lifecycle › Dates](/guides/invoice-lifecycle#dates) ## DAT-004 · Send the operation date when it differs from the issue date `Required` · Law · Impact: high · Responsibility: your integration. When the goods were delivered, the service provided or the advance received on a day other than the issue date, send that day as `operation_date`. Omitted, the invoice takes the issue date as the operation date. **Why:** The operation date decides the VAT rate and the tax period. Without it, an invoice issued in October for a September sale says the sale happened in October. **Applies to:** operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`PATCH /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/patchCompanyInvoice) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 6.1.i) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «La fecha en que se hayan efectuado las operaciones que se documentan o en la que, en su caso, se haya recibido el pago anticipado, siempre que se trate de una fecha distinta a la de expedición de la factura.» **Incorrect:** Issuing on 2 October the invoice for work finished on 30 September without `operation_date`. **Correct:** Sending the day the work was finished. ```json { "operation_date": "2026-09-30", "lines": [{ "description": "Website redesign", "quantity": 1, "unit_price": 2400, "main_tax": { "type": "IVA", "percentage": 21 } }] } ``` **Related:** [DAT-001 · Do not send an issue date](/rules/dates#dat-001) · [DAT-003 · The operation date is never after the issue date nor over twenty years old](/rules/dates#dat-003) · [TAX-001 · Apply the VAT rate in force when the operation took place](/rules/taxes#tax-001) **Explained in:** [Invoice lifecycle › Dates](/guides/invoice-lifecycle#dates) ## DAT-005 · Invoice consumers when the operation takes place `Required` · Law · Impact: medium · Responsibility: the issuing business. When the customer is a consumer, issue the invoice at the moment the operation is performed. **Why:** An invoice to a consumer issued days later breaks the issuing deadline, and under VeriFactu its record reaches AEAT late too. **Applies to:** Operations with a recipient that is not a business or professional acting as such. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 11.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a11) > «Las facturas deberán ser expedidas en el momento de realizarse la operación.» **Incorrect:** An online shop collects the day's orders and issues their invoices the following week. **Correct:** The shop issues each invoice when the order is completed. **Related:** [DAT-006 · Invoice businesses before day 16 of the following month](/rules/dates#dat-006) · [DAT-002 · The issue date is the day the billing record is generated](/rules/dates#dat-002) ## DAT-006 · Invoice businesses before day 16 of the following month `Required` · Law · Impact: medium · Responsibility: the issuing business. When the customer is a business or professional, issue the invoice before day 16 of the month after the one in which the VAT accrued. **Why:** An invoice issued after the deadline breaches the invoicing obligations and can be sanctioned, even though the sale was declared. **Applies to:** Operations with a business or professional acting as such. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 11.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a11) > «No obstante, cuando el destinatario de la operación sea un empresario o profesional que actúe como tal, las facturas deberán expedirse antes del día 16 del mes siguiente a aquél en que se haya producido el devengo del Impuesto correspondiente a la citada operación.» **Incorrect:** Invoicing on 20 October a service to a company that was completed on 25 September. **Correct:** Issuing that invoice by 15 October, with `operation_date` set to 25 September. **Related:** [DAT-005 · Invoice consumers when the operation takes place](/rules/dates#dat-005) · [DAT-007 · One invoice for a month of operations, issued in time](/rules/dates#dat-007) · [DAT-008 · Deliver the invoice to the customer in time](/rules/dates#dat-008) · [DAT-013 · Intra-EU supplies of goods are invoiced by the month after transport starts](/rules/dates#dat-013) · [DAT-014 · Under the cash-basis regime, the deadline runs from the operation, not the payment](/rules/dates#dat-014) ## DAT-007 · One invoice for a month of operations, issued in time `Required` · Law · Impact: low · Responsibility: the issuing business. You may put several operations for the same customer in one invoice only if they all took place in the same calendar month. Issue it by the last day of that month or, when the customer is a business, before day 16 of the next one. **Why:** Grouping operations from different months in one invoice, or issuing it late, breaches the invoicing rules even when every operation is on it. **Applies to:** Recapitulative invoices: several operations for the same customer in one invoice. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 13.1 y 13.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a13) > «Podrán incluirse en una sola factura distintas operaciones realizadas en distintas fechas para un mismo destinatario, siempre que las mismas se hayan efectuado dentro de un mismo mes natural. 2. Estas facturas deberán ser expedidas como máximo el último día del mes natural en el que se hayan efectuado las operaciones que se documenten en ellas.» **Incorrect:** One invoice to a company for deliveries made between 20 August and 10 September. **Correct:** One invoice for the August deliveries and another for the September ones, each issued in time. **Related:** [DAT-006 · Invoice businesses before day 16 of the following month](/rules/dates#dat-006) · [DAT-004 · Send the operation date when it differs from the issue date](/rules/dates#dat-004) ## DAT-008 · Deliver the invoice to the customer in time `Required` · Law · Impact: low · Responsibility: the issuing business. Send the original invoice to the customer when you issue it or, when the customer is a business, before day 16 of the month after the accrual. BeeL. can email it for you. **Why:** An invoice the customer never receives cannot be deducted by them, and delivering it is an obligation of the issuer. **Applies to:** statuses `ISSUED`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/send`](/invoices/sendCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/deliveries`](/invoices/createCompanyInvoiceDelivery) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 18 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a18) > «La obligación de remisión de las facturas que se establece en el artículo 17 deberá cumplirse en el mismo momento de su expedición o bien, cuando el destinatario sea un empresario o profesional que actúe como tal, antes del día 16 del mes siguiente a aquél en que se haya producido el devengo del Impuesto» **Incorrect:** Issuing invoices through the API and never delivering them, assuming AEAT's record reaches the customer. **Correct:** Emailing the PDF from BeeL. once it is ready, or delivering it through your own channel. **Related:** [DAT-006 · Invoice businesses before day 16 of the following month](/rules/dates#dat-006) · [CNT-018 · Invoices go by email only with the recipient's consent](/rules/contents#cnt-018) **Explained in:** [Sending email](/guides/sending-email) ## DAT-009 · VAT is charged by invoice within 1 year of accrual `Required` · Law · Impact: low · Responsibility: the issuing business. VAT is passed on to the customer through an invoice, and the right to charge it is lost 1 year after the VAT accrued. The duty to invoice the operation remains after that. **Why:** Invoicing or correcting upwards after that window leaves the issuer paying a VAT it can no longer charge to the customer. **Applies to:** Every operation that accrues VAT. **Legal basis:** - Ley 37/1992 del IVA, art. 88.Cuatro — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a88) > «Se perderá el derecho a la repercusión cuando haya transcurrido un año desde la fecha del devengo.» **Incorrect:** Leaving an operation uninvoiced for more than a year, so the VAT on it can no longer be charged to the customer. **Correct:** Reconciling unbilled operations every month, so each is invoiced within the deadlines. **Related:** [DAT-006 · Invoice businesses before day 16 of the following month](/rules/dates#dat-006) · [COR-006 · Issue the corrective as soon as you know, within 4 years](/rules/corrective#cor-006) ## DAT-010 · Invoice advance payments when you receive them `Required` · Law · Impact: low · Responsibility: the issuing business. A payment received before the operation is invoiced too, with the day you received it as `operation_date`; the final invoice then covers the rest. Exempt intra-EU supplies of goods are the exception. **Why:** VAT accrues when an advance is received, so an advance without its invoice leaves VAT accrued and never charged. **Applies to:** Payments received before the goods are delivered or the service is provided. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 2.1, párrafo segundo — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a2-2) > «También deberá expedirse factura y copia de esta por los pagos recibidos con anterioridad a la realización de las entregas de bienes o prestaciones de servicios por las que deba asimismo cumplirse esta obligación conforme al párrafo anterior, a excepción de las entregas de bienes exentas del Impuesto sobre el Valor Añadido por aplicación de lo dispuesto en el artículo 25 de la Ley del Impuesto.» **Incorrect:** Collecting a 30 % deposit on a kitchen installation and invoicing everything only when the work is finished. **Correct:** Invoicing the deposit the day it is received, and the remaining 70 % when the installation is completed. **Related:** [DAT-003 · The operation date is never after the issue date nor over twenty years old](/rules/dates#dat-003) · [DAT-004 · Send the operation date when it differs from the issue date](/rules/dates#dat-004) ## DAT-011 · Adapted billing systems are mandatory from 1 January 2027 or 1 July 2027 `Required` · Law · Impact: medium · Responsibility: the issuing business. Corporate-tax payers must invoice with a billing system adapted to the regulation before 1 January 2027, and the other taxpayers of its art. 3.1 before 1 July 2027. **Why:** These dates were set by the RD-ley 15/2025, which amended the RD 1007/2023; from them on, these taxpayers invoice through an adapted billing system. **Applies to:** Taxpayers under the billing-systems regulation; those keeping their VAT books through the SII are outside it. **Legal basis:** - RD 1007/2023 (RRSIF), disposición final cuarta — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2023-24840#df-4) > «los obligados tributarios a que se refiere el artículo 3.1.a) deberán tener adaptados los sistemas informáticos a las características y requisitos establecidos en este reglamento y en su normativa de desarrollo antes del 1 de enero de 2027. El resto de obligados tributarios mencionados en el artículo 3.1 deberán tener operativos los citados sistemas informáticos antes del 1 de julio de 2027.» - Real Decreto-ley 15/2025, disposición final primera — [source](https://www.boe.es/diario_boe/txt.php?id=BOE-A-2025-24446) > «Disposición final primera. Modificación del Real Decreto 1007/2023, de 5 de diciembre. La disposición final cuarta queda redactada en los siguientes términos:» **Incorrect:** A company subject to corporate tax plans its switch to an adapted billing system for spring 2027. **Correct:** The company enables VeriFactu and tests its integration in the sandbox during 2026. **Related:** [REC-001 · Each issued invoice gets a billing record built from its data](/rules/records#rec-001) · [LIF-003 · Test in the sandbox, never with real invoices](/rules/lifecycle#lif-003) **Explained in:** [Overview › At a glance](/verifactu#at-a-glance) ## DAT-012 · Plan for mandatory B2B electronic invoices `Recommended` · Law · Impact: low · Responsibility: the issuing business. Once the ministerial order that RD 238/2026 depends on is in force, businesses will have to issue structured electronic invoices to other Spanish businesses, first the largest ones and later the rest. Until that order is published the obligation does not apply; watch for it. **Why:** The deadline starts counting from an order that has not been published yet, and adapting invoicing to structured formats takes time. **Applies to:** Invoices to businesses and professionals established in Spain, once RD 238/2026 applies. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 8 bis.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a8-2) > «Será obligatoria la factura electrónica en las condiciones establecidas en la Ley 56/2007, de 28 de diciembre, de Medidas de Impulso de la sociedad de la Información, y en su normativa de desarrollo cuando el destinatario de la operación sea un empresario o profesional que tenga en España la sede de su actividad económica» - RD 238/2026, disposición final cuarta — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2026-7295#df-4) > «la aplicación efectiva de este real decreto quedará diferida en los siguientes términos, contados desde la entrada en vigor de la orden ministerial prevista en el apartado 1 de la disposición final tercera» **Incorrect:** Assuming a PDF sent by email will keep being enough for every business customer indefinitely. **Correct:** Tracking the publication of the ministerial order and planning a structured format for invoices to Spanish businesses. **Related:** [CNT-018 · Invoices go by email only with the recipient's consent](/rules/contents#cnt-018) · [QRC-010 · A structured e-invoice carries the QR URL as a field](/rules/qr#qrc-010) ## DAT-013 · Intra-EU supplies of goods are invoiced by the month after transport starts `Required` · Law · Impact: low · Responsibility: the issuing business. Invoice an intra-EU supply of goods before day 16 of the month after the one in which the goods start to be shipped or transported to the buyer, also when several supplies go on one recapitulative invoice. **Why:** For these supplies the deadline runs from the start of the transport, not from the general rule of the month after accrual. **Applies to:** Intra-EU supplies of goods exempt under art. 25 LIVA. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 11.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a11) > «En las entregas de bienes comprendidas en el artículo 75.Uno.8.º de la Ley del Impuesto, las facturas deberán expedirse antes del día 16 del mes siguiente a aquél en que se inicie la expedición o el transporte de los bienes con destino al adquirente.» - RD 1619/2012 (Reglamento de facturación), art. 13.3 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a13) > «En las entregas de bienes comprendidas en el artículo 75.Uno.8.º de la Ley del Impuesto, las facturas deberán expedirse antes del día 16 del mes siguiente a aquél en que se inicie la expedición o el transporte de los bienes con destino al adquirente.» **Incorrect:** Goods leave for a buyer in Germany on 28 September and the invoice is issued on 20 October. **Correct:** The same invoice issued by 15 October. **Related:** [DAT-006 · Invoice businesses before day 16 of the following month](/rules/dates#dat-006) · [DAT-007 · One invoice for a month of operations, issued in time](/rules/dates#dat-007) · [TAX-004 · Intra-EU supplies of goods are exempt only with the buyer's EU VAT number](/rules/taxes#tax-004) ## DAT-014 · Under the cash-basis regime, the deadline runs from the operation, not the payment `Required` · Law · Impact: low · Responsibility: the issuing business. Under the special cash-basis regime, issue the invoice when the operation takes place or, when the customer is a business or professional acting as such, before day 16 of the month after the one in which the operation took place, even though the VAT accrues on payment. **Why:** Under this regime the VAT accrues later, but the invoicing deadline does not move with it. **Applies to:** Operations under the special cash-basis regime (regime key `07`). **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 11.3 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a11) > «En las operaciones acogidas al régimen especial del criterio de caja regulado en el Capítulo X del Título IX de la Ley del Impuesto, la expedición de la factura deberá realizarse en el momento de la realización de tales operaciones, salvo cuando el destinatario de la operación sea un empresario o profesional que actúe como tal, en cuyo caso deberán expedirse antes del día 16 del mes siguiente a aquel en que se haya realizado la operación.» **Incorrect:** A cash-basis business waits for a client's payment in November to invoice a service delivered in August. **Correct:** It invoices the service by 15 September, with regime key `07`. **Related:** [DAT-006 · Invoice businesses before day 16 of the following month](/rules/dates#dat-006) · [CNT-013 · A cash-basis invoice carries the mention «régimen especial del criterio de caja»](/rules/contents#cnt-013) · [TAX-016 · Regime keys 03, 06 and 14 are not accepted](/rules/taxes#tax-016) [← All rules](/rules#all-rules) ## Related - [Invoice lifecycle](/guides/invoice-lifecycle) — every invoice status, which operations each one allows, and the difference between the fiscal steps (issue, void, correct) and the commercial ones (sent, paid) - [Sending email](/guides/sending-email) — how BeeL. delivers invoice emails — the sandbox recipient restriction, per-account send quotas, queued delivery, and bulk limits - [Overview](/verifactu) — how BeeL. handles VeriFactu compliance — what BeeL. does for you, what you control, and where to learn each scenario - [What AEAT receives from your invoice](/verifactu/what-aeat-receives) — how BeeL. turns your invoice into the record AEAT registers — the description, the total, the number, the recipient and the late-submission flag — and why some of them differ from what you see on the invoice --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Fiscal rules 147 fiscal and VeriFactu rules for invoicing integrations, as pages and as data for your AI assistant, the MCP server or CI. **A set of 147 rules your invoicing integration has to follow, as data your AI agent can check your code against.** Each one comes from the law, from AEAT or from BeeL., has a stable id (`LIF-001`), says who checks it, and lists the errors the API answers when it catches it. The guides explain how to do things; these pages say what must and must not happen. ## Use the rules in your tools **In Claude Code**, install the [BeeL. plugin](/claude-code) and ask it for a rule: ```text /plugin marketplace add beel-es/claude-plugins /plugin install beel-api@beel /beel-api:rules COR-002 ``` **With the BeeL. MCP server** (shown for Claude Code; [other clients](/mcp)), add it and ask in plain words. Its [rules tools](/mcp/tools#helper-tools) answer, and a failed call names the rule behind its error: ```bash claude mcp add --transport http beel https://mcp.beel.es/mcp ``` ```text Which BeeL. rules apply to voiding an invoice, and which are up to my integration? ``` **In any AI assistant** (Cursor, Copilot, ChatGPT…), paste this prompt, or keep the critical rules in every session with the [AGENTS.md block](/ai-agents#give-your-agent-the-rules): ```text Review my BeeL. integration against https://docs.beel.es/api/rules.json and list every rule it breaks, with its id and the fix. ``` **In your CI**, read the catalogue as JSON ([its format](/api/rules.schema.json)): ```bash curl -s https://docs.beel.es/api/rules.json ``` Each rule is also Markdown at `/rules/.md` (for example [`/rules/LIF-001.md`](/rules/LIF-001.md)), and all of them are in [`/rules/llms-full.txt`](/rules/llms-full.txt). ## How to read a rule - **Severity.** *Required* or *Recommended*. - **Source.** *Law* and *AEAT criterion* quote the norm verbatim, with its link. *BeeL. rule* is how BeeL.'s API works. - **Error codes.** What the API answers when it catches the rule. Each one links to its page. ### What each responsibility asks of you | Responsibility | What you do | |---|---| | **Checked by the API** (`api`) | Handle the error codes the rule lists: the API rejects the request or applies the rule for you. | | **Checked by AEAT** (`aeat`) | Track the invoice's submission status. See [Handling rejections](/verifactu/handling-rejections). | | **Your integration** (`integrator`) | Meet it in your code, and check it in review and tests. See [Software built on the API](/verifactu/compliance-and-responsibilities#software-built-on-the-api). | | **The issuing business** (`issuer`) | A decision of the business that issues the invoice: your integration can ask for it or show it. See [The issuing business](/verifactu/compliance-and-responsibilities#the-issuing-business). | ## All rules ### [Invoice lifecycle](/rules/lifecycle) - [LIF-001 · An issued invoice is never edited or deleted](/rules/lifecycle#lif-001) — `Required`, Law, Checked by the API - [LIF-002 · Only a draft can be issued](/rules/lifecycle#lif-002) — `Required`, BeeL. rule, Checked by the API - [LIF-003 · Test in the sandbox, never with real invoices](/rules/lifecycle#lif-003) — `Required`, AEAT criterion, Responsibility: your integration - [LIF-004 · Retry writes with the same Idempotency-Key](/rules/lifecycle#lif-004) — `Recommended`, BeeL. rule, Responsibility: your integration - [LIF-005 · Duplicating an invoice creates a new one, not a copy](/rules/lifecycle#lif-005) — `Required`, BeeL. rule, Responsibility: your integration ### [Voiding](/rules/void) - [VOI-001 · Void only an invoice that should never have been issued](/rules/void#voi-001) — `Required`, AEAT criterion, Responsibility: the issuing business - [VOI-002 · Void an issued invoice through the void operation; delete a draft](/rules/void#voi-002) — `Required`, BeeL. rule, Checked by the API - [VOI-003 · A void adds a cancellation record; the original stays](/rules/void#voi-003) — `Required`, Law, Checked by the API - [VOI-004 · An emailed or paid invoice is voided only confirming it was issued by mistake](/rules/void#voi-004) — `Required`, AEAT criterion, Checked by the API - [VOI-005 · A corrected invoice, or a total corrective, is not voided](/rules/void#voi-005) — `Required`, AEAT criterion, Checked by the API ### [Corrective invoices](/rules/corrective) - [COR-001 · Wrong data on an issued invoice is fixed with a corrective](/rules/corrective#cor-001) — `Required`, Law, Checked by the API - [COR-002 · Pick the reason code: R1–R4 for standard invoices, R5 for simplified](/rules/corrective#cor-002) — `Required`, Law, Checked by the API - [COR-003 · A corrective shows the difference or the amounts after the correction](/rules/corrective#cor-003) — `Required`, Law, Checked by the API - [COR-004 · The corrective record says whether it substitutes or adds a difference](/rules/corrective#cor-004) — `Required`, AEAT criterion, Checked by the API - [COR-005 · A corrective identifies the invoice it rectifies](/rules/corrective#cor-005) — `Required`, Law, Checked by the API - [COR-006 · Issue the corrective as soon as you know, within 4 years](/rules/corrective#cor-006) — `Required`, Law, Checked by the API - [COR-007 · A wrong corrective is fixed against the original, not corrected itself](/rules/corrective#cor-007) — `Required`, BeeL. rule, Checked by the API - [COR-008 · A bad-debt corrective (R3) needs the legal conditions first](/rules/corrective#cor-008) — `Required`, Law, Responsibility: the issuing business - [COR-009 · An insolvency corrective (R2) needs a declaration of insolvency](/rules/corrective#cor-009) — `Required`, Law, Responsibility: the issuing business - [COR-010 · A provisional price is rectified once the final one is known](/rules/corrective#cor-010) — `Required`, Law, Responsibility: the issuing business - [COR-011 · Discounts and rebates granted after the sale go on a corrective](/rules/corrective#cor-011) — `Required`, Law, Responsibility: the issuing business - [COR-012 · Returns can be netted only on a later supply to the same customer](/rules/corrective#cor-012) — `Recommended`, Law, Responsibility: the issuing business - [COR-013 · A corrective is only for the causes the law lists](/rules/corrective#cor-013) — `Required`, Law, Responsibility: the issuing business - [COR-014 · A corrective keeps the operation date of the original](/rules/corrective#cor-014) — `Required`, AEAT criterion, Checked by the API - [COR-015 · Do not raise the VAT charged to a consumer through a corrective](/rules/corrective#cor-015) — `Required`, Law, Responsibility: the issuing business - [COR-016 · Some unpaid debts never allow an R2 or R3 corrective](/rules/corrective#cor-016) — `Required`, Law, Responsibility: the issuing business - [COR-017 · A corrective keeps the recipient, except to correct the recipient's data](/rules/corrective#cor-017) — `Required`, Law, Checked by the API - [COR-018 · A corrective can always correct what the original declared](/rules/corrective#cor-018) — `Required`, Law, Checked by the API - [COR-019 · Insolvency and bad-debt correctives need a recipient established in Spain](/rules/corrective#cor-019) — `Required`, Law, Checked by the API - [COR-020 · A bad-debt corrective waits six months and needs a business recipient under 50 €](/rules/corrective#cor-020) — `Required`, Law, Checked by the API - [COR-021 · An identical corrective a moment after another is taken as a double submission](/rules/corrective#cor-021) — `Recommended`, BeeL. rule, Checked by the API - [COR-022 · An invoice whose record AEAT rejected is fixed before it is corrected](/rules/corrective#cor-022) — `Required`, AEAT criterion, Checked by the API - [COR-023 · A corrective never rectifies more than was invoiced](/rules/corrective#cor-023) — `Required`, Law, Checked by the API - [COR-024 · A corrective does not change only the withholding](/rules/corrective#cor-024) — `Required`, Law, Checked by the API ### [Numbering and series](/rules/numbering) - [NUM-001 · The number is assigned when the invoice is issued](/rules/numbering#num-001) — `Required`, BeeL. rule, Checked by the API - [NUM-002 · An issued number is never reused, even when the invoice is voided](/rules/numbering#num-002) — `Required`, AEAT criterion, Checked by the API - [NUM-003 · Numbers are correlative within each series](/rules/numbering#num-003) — `Required`, Law, Checked by the API - [NUM-004 · Separate series may be used when there is a reason for them](/rules/numbering#num-004) — `Recommended`, Law, Responsibility: the issuing business - [NUM-005 · Simplified invoices are numbered in their own series](/rules/numbering#num-005) — `Required`, Law, Checked by the API - [NUM-006 · Corrective invoices are numbered in their own series](/rules/numbering#num-006) — `Required`, Law, Checked by the API - [NUM-007 · A series cannot be renumbered once it has issued](/rules/numbering#num-007) — `Required`, BeeL. rule, Checked by the API - [NUM-008 · An invoice number fits AEAT's length and character set](/rules/numbering#num-008) — `Required`, AEAT criterion, Checked by the API - [NUM-009 · Reverse-charge supplies of metals and electronics go in a special series](/rules/numbering#num-009) — `Required`, Law, Responsibility: the issuing business ### [Invoice contents](/rules/contents) - [CNT-001 · Every operation of the business is invoiced, exempt ones included](/rules/contents#cnt-001) — `Required`, Law, Responsibility: the issuing business - [CNT-002 · A business customer always gets an invoice, identifying it when asked](/rules/contents#cnt-002) — `Required`, Law, Responsibility: the issuing business - [CNT-003 · A full invoice names both parties by their legal name](/rules/contents#cnt-003) — `Required`, Law, Checked by the API - [CNT-004 · Every invoice shows the issuer's NIF](/rules/contents#cnt-004) — `Required`, Law, Checked by the API - [CNT-005 · A full invoice identifies the recipient by NIF](/rules/contents#cnt-005) — `Required`, Law, Checked by the API - [CNT-006 · A full invoice shows the address of both parties](/rules/contents#cnt-006) — `Required`, Law, Checked by the API - [CNT-007 · Each line describes the operation, its unit price and any discount](/rules/contents#cnt-007) — `Required`, Law, Responsibility: your integration - [CNT-008 · The tax rate and the tax amount are shown apart from the base](/rules/contents#cnt-008) — `Required`, Law, Checked by the API - [CNT-009 · The base is broken down by rate and by kind of operation](/rules/contents#cnt-009) — `Required`, Law, Checked by the API - [CNT-010 · An exempt operation states why it is exempt](/rules/contents#cnt-010) — `Required`, Law, Checked by the API - [CNT-011 · Only one original of each invoice exists](/rules/contents#cnt-011) — `Required`, Law, Responsibility: the issuing business - [CNT-012 · A reverse-charge invoice carries the mention «inversión del sujeto pasivo»](/rules/contents#cnt-012) — `Required`, Law, Checked by the API - [CNT-013 · A cash-basis invoice carries the mention «régimen especial del criterio de caja»](/rules/contents#cnt-013) — `Required`, Law, Checked by the API - [CNT-014 · A used-goods, art or antiques invoice carries its regime mention](/rules/contents#cnt-014) — `Required`, Law, Responsibility: the issuing business - [CNT-015 · A travel-agency invoice carries the mention «régimen especial de las agencias de viajes»](/rules/contents#cnt-015) — `Required`, Law, Checked by the API - [CNT-016 · An intra-EU supply of a new means of transport describes the vehicle](/rules/contents#cnt-016) — `Required`, Law, Responsibility: the issuing business - [CNT-017 · An invoice may be in any language](/rules/contents#cnt-017) — `Recommended`, Law, Responsibility: the issuing business - [CNT-018 · Invoices go by email only with the recipient's consent](/rules/contents#cnt-018) — `Required`, Law, Responsibility: the issuing business - [CNT-019 · Only a corrective invoice totals less than zero](/rules/contents#cnt-019) — `Required`, BeeL. rule, Checked by the API - [CNT-020 · A Spanish recipient's NIF is in the AEAT census](/rules/contents#cnt-020) — `Recommended`, AEAT criterion, Checked by the API - [CNT-021 · A recipient without a Spanish NIF is identified by an alternative id](/rules/contents#cnt-021) — `Required`, AEAT criterion, Checked by the API - [CNT-022 · Invoices to Spanish public administrations are electronic](/rules/contents#cnt-022) — `Required`, Law, Responsibility: the issuing business - [CNT-023 · Some operations are always invoiced, whoever the customer](/rules/contents#cnt-023) — `Required`, Law, Responsibility: the issuing business - [CNT-024 · A duplicate for several recipients shows each one's share](/rules/contents#cnt-024) — `Required`, Law, Responsibility: the issuing business - [CNT-025 · State the establishment when it decides how the operation is taxed](/rules/contents#cnt-025) — `Required`, Law, Responsibility: the issuing business - [CNT-026 · A recipient in the AEAT census is identified by NIF, not as not registered](/rules/contents#cnt-026) — `Recommended`, AEAT criterion, Checked by the API ### [Simplified invoices](/rules/simplified) - [SIM-001 · A simplified invoice never exceeds 3,000 €](/rules/simplified#sim-001) — `Required`, AEAT criterion, Checked by the API - [SIM-002 · Above 400 €, a simplified invoice needs an art. 4.2 activity](/rules/simplified#sim-002) — `Required`, Law, Responsibility: the issuing business - [SIM-003 · Some operations can never go on a simplified invoice](/rules/simplified#sim-003) — `Required`, Law, Checked by the API - [SIM-004 · A simplified invoice still carries its minimum contents](/rules/simplified#sim-004) — `Required`, Law, Checked by the API - [SIM-005 · The record of a simplified invoice carries no recipient](/rules/simplified#sim-005) — `Required`, AEAT criterion, Checked by the API - [SIM-006 · An identified customer gets a standard invoice (F1)](/rules/simplified#sim-006) — `Required`, BeeL. rule, Checked by the API - [SIM-007 · Exchanging a simplified invoice for a full one](/rules/simplified#sim-007) — `Required`, Law, Checked by the API - [SIM-008 · A simplified invoice carries the same legal mentions as a full one](/rules/simplified#sim-008) — `Required`, Law, Responsibility: the issuing business - [SIM-009 · A customer who asks to be identified gets an invoice that identifies it](/rules/simplified#sim-009) — `Required`, Law, Responsibility: the issuing business - [SIM-010 · A simplified invoice with several VAT rates shows the base of each](/rules/simplified#sim-010) — `Required`, Law, Responsibility: your integration - [SIM-011 · No equivalence surcharge or IRPF withholding on a simplified invoice](/rules/simplified#sim-011) — `Required`, BeeL. rule, Checked by the API ### [Taxes and exemptions](/rules/taxes) - [TAX-001 · Apply the VAT rate in force when the operation took place](/rules/taxes#tax-001) — `Required`, Law, Responsibility: the issuing business - [TAX-002 · Reverse-charge operations are invoiced without charging VAT](/rules/taxes#tax-002) — `Required`, Law, Checked by the API - [TAX-003 · Reverse-charge lines carry no tax and never go on a simplified invoice](/rules/taxes#tax-003) — `Required`, AEAT criterion, Checked by the API - [TAX-004 · Intra-EU supplies of goods are exempt only with the buyer's EU VAT number](/rules/taxes#tax-004) — `Required`, Law, Checked by the API - [TAX-005 · Exempt and non-subject lines carry no VAT rate](/rules/taxes#tax-005) — `Required`, AEAT criterion, Checked by the API - [TAX-006 · Services to a business abroad are not subject to Spanish VAT](/rules/taxes#tax-006) — `Required`, Law, Responsibility: the issuing business - [TAX-007 · Sales declared through OSS use regime key 17](/rules/taxes#tax-007) — `Required`, AEAT criterion, Responsibility: the issuing business - [TAX-008 · Disbursements go as SUPLIDO lines, without tax](/rules/taxes#tax-008) — `Required`, AEAT criterion, Checked by the API - [TAX-009 · IRPF withholding is not part of the total AEAT receives](/rules/taxes#tax-009) — `Required`, AEAT criterion, Checked by the API - [TAX-010 · Set the IRPF withholding when the customer must withhold](/rules/taxes#tax-010) — `Recommended`, BeeL. rule, Responsibility: your integration - [TAX-012 · The tax and the billing record are expressed in euros](/rules/taxes#tax-012) — `Required`, Law, Checked by the API - [TAX-013 · Send every amount in euros](/rules/taxes#tax-013) — `Required`, BeeL. rule, Responsibility: your integration - [TAX-014 · Only the VAT rates AEAT accepts on the operation date](/rules/taxes#tax-014) — `Required`, AEAT criterion, Checked by the API - [TAX-015 · Regime key 08 means not subject to the line's tax](/rules/taxes#tax-015) — `Required`, AEAT criterion, Checked by the API - [TAX-016 · Regime keys 03, 06 and 14 are not accepted](/rules/taxes#tax-016) — `Required`, AEAT criterion, Checked by the API - [TAX-017 · Special regime keys carry the classification AEAT requires](/rules/taxes#tax-017) — `Required`, AEAT criterion, Checked by the API - [TAX-018 · An issued invoice does not use the intra-EU acquisition exemption](/rules/taxes#tax-018) — `Required`, Law, Checked by the API - [TAX-019 · An issuer that is not an individual never bears the IRPF rates of individuals](/rules/taxes#tax-019) — `Required`, Law, Checked by the API - [TAX-022 · Reduced withholding rates of Ceuta and Melilla derive from their base rate](/rules/taxes#tax-022) — `Required`, Law, Checked by the API - [TAX-023 · A software or electronic service sold to a business in the Canary Islands, Ceuta or Melilla is not subject to IVA](/rules/taxes#tax-023) — `Required`, Law, Checked by the API - [TAX-024 · A sale of goods to a buyer outside the territory where IVA applies is an export exempt under article 21](/rules/taxes#tax-024) — `Required`, Law, Checked by the API ### [Equivalence surcharge](/rules/surcharge) - [SUR-001 · The surcharge rate matches the VAT rate of its line](/rules/surcharge#sur-001) — `Required`, Law, Checked by the API - [SUR-002 · Supplies with the surcharge go on separate invoices](/rules/surcharge#sur-002) — `Required`, Law, Responsibility: the issuing business ### [Dates and deadlines](/rules/dates) - [DAT-001 · Do not send an issue date](/rules/dates#dat-001) — `Required`, BeeL. rule, Checked by the API - [DAT-002 · The issue date is the day the billing record is generated](/rules/dates#dat-002) — `Required`, AEAT criterion, Checked by the API - [DAT-003 · The operation date is never after the issue date nor over twenty years old](/rules/dates#dat-003) — `Required`, AEAT criterion, Checked by the API - [DAT-004 · Send the operation date when it differs from the issue date](/rules/dates#dat-004) — `Required`, Law, Responsibility: your integration - [DAT-005 · Invoice consumers when the operation takes place](/rules/dates#dat-005) — `Required`, Law, Responsibility: the issuing business - [DAT-006 · Invoice businesses before day 16 of the following month](/rules/dates#dat-006) — `Required`, Law, Responsibility: the issuing business - [DAT-007 · One invoice for a month of operations, issued in time](/rules/dates#dat-007) — `Required`, Law, Responsibility: the issuing business - [DAT-008 · Deliver the invoice to the customer in time](/rules/dates#dat-008) — `Required`, Law, Responsibility: the issuing business - [DAT-009 · VAT is charged by invoice within 1 year of accrual](/rules/dates#dat-009) — `Required`, Law, Responsibility: the issuing business - [DAT-010 · Invoice advance payments when you receive them](/rules/dates#dat-010) — `Required`, Law, Responsibility: the issuing business - [DAT-011 · Adapted billing systems are mandatory from 1 January 2027 or 1 July 2027](/rules/dates#dat-011) — `Required`, Law, Responsibility: the issuing business - [DAT-012 · Plan for mandatory B2B electronic invoices](/rules/dates#dat-012) — `Recommended`, Law, Responsibility: the issuing business - [DAT-013 · Intra-EU supplies of goods are invoiced by the month after transport starts](/rules/dates#dat-013) — `Required`, Law, Responsibility: the issuing business - [DAT-014 · Under the cash-basis regime, the deadline runs from the operation, not the payment](/rules/dates#dat-014) — `Required`, Law, Responsibility: the issuing business ### [QR code and PDF](/rules/qr) - [QRC-001 · Every invoice carries the tax QR code](/rules/qr#qrc-001) — `Required`, Law, Responsibility: your integration - [QRC-002 · Wait for the QR before you distribute the PDF](/rules/qr#qrc-002) — `Required`, BeeL. rule, Responsibility: your integration - [QRC-003 · The QR measures between 30 mm and 40 mm](/rules/qr#qrc-003) — `Required`, Law, Responsibility: your integration - [QRC-004 · The QR follows ISO/IEC 18004 with error correction M](/rules/qr#qrc-004) — `Required`, Law, Responsibility: your integration - [QRC-005 · Use qr_url exactly as returned](/rules/qr#qrc-005) — `Required`, Law, Checked by the API - [QRC-006 · The VeriFactu legend goes just below the QR](/rules/qr#qrc-006) — `Required`, Law, Responsibility: your integration - [QRC-007 · «QR tributario:» goes just above the QR](/rules/qr#qrc-007) — `Required`, AEAT criterion, Responsibility: your integration - [QRC-008 · The QR goes once, at the start of the first page](/rules/qr#qrc-008) — `Required`, AEAT criterion, Responsibility: your integration - [QRC-009 · Keep a blank margin around the QR](/rules/qr#qrc-009) — `Required`, AEAT criterion, Responsibility: your integration - [QRC-010 · A structured e-invoice carries the QR URL as a field](/rules/qr#qrc-010) — `Required`, Law, Responsibility: your integration ### [VeriFactu records](/rules/records) - [REC-001 · Each issued invoice gets a billing record built from its data](/rules/records#rec-001) — `Required`, Law, Checked by the API - [REC-002 · The record goes to AEAT as soon as the invoice is issued](/rules/records#rec-002) — `Required`, Law, Checked by the API - [REC-003 · VERI*FACTU is kept until the end of the year](/rules/records#rec-003) — `Required`, Law, Responsibility: the issuing business - [REC-004 · BeeL. generates the hash and the chain](/rules/records#rec-004) — `Required`, Law, Checked by the API - [REC-005 · One chain per NIF, one company per NIF](/rules/records#rec-005) — `Required`, Law, Responsibility: your integration - [REC-006 · No certificate is needed to sign records](/rules/records#rec-006) — `Recommended`, Law, Checked by the API - [REC-007 · Keep invoicing when AEAT is unreachable](/rules/records#rec-007) — `Required`, Law, Checked by the API - [REC-008 · Follow submission_status and fix what AEAT rejects](/rules/records#rec-008) — `Required`, BeeL. rule, Responsibility: your integration - [REC-009 · Check the data AEAT accepted with errors](/rules/records#rec-009) — `Required`, AEAT criterion, Responsibility: your integration - [REC-010 · Subsanación is only for errors that need no corrective](/rules/records#rec-010) — `Required`, AEAT criterion, Responsibility: your integration - [REC-011 · The NIF holder signs the AEAT representation first](/rules/records#rec-011) — `Required`, Law, Checked by the API - [REC-012 · Tax amounts are base times rate](/rules/records#rec-012) — `Required`, AEAT criterion, Checked by the API - [REC-013 · An invoice AEAT would reject is not numbered](/rules/records#rec-013) — `Required`, AEAT criterion, Checked by the API ### [Conservation](/rules/conservation) - [CON-001 · Keep copies of issued invoices for the limitation period](/rules/conservation#con-001) — `Required`, Law, Responsibility: the issuing business - [CON-002 · AEAT keeps the records, not your invoices](/rules/conservation#con-002) — `Required`, AEAT criterion, Responsibility: the issuing business - [CON-003 · Export your invoices before leaving](/rules/conservation#con-003) — `Required`, Law, Responsibility: the issuing business - [CON-004 · Invoices kept electronically are reachable on request](/rules/conservation#con-004) — `Required`, Law, Responsibility: the issuing business ### [Sanctions](/rules/sanctions) - [SAN-001 · Do not hold non-compliant or altered billing software](/rules/sanctions#san-001) — `Required`, Law, Responsibility: the issuing business - [SAN-002 · Invoicing breaches are fined in proportion to the operations](/rules/sanctions#san-002) — `Required`, Law, Responsibility: the issuing business - [SAN-003 · A substantial breach doubles the invoicing fine](/rules/sanctions#san-003) — `Required`, Law, Responsibility: the issuing business ## By domain --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Invoice lifecycle What can happen to an invoice before and after it is issued: editing, issuing, duplicating, testing and retrying. [← All rules](/rules#all-rules) Issuing is the fiscal line: before it, a draft is yours to change or delete; after it, the invoice and its record are fixed and only a later document can change what they say. These rules say what each side allows. 5 rules: 1 from the law, 1 AEAT criterion, 3 BeeL. rules. [How to read a rule](/rules#how-to-read-a-rule). ## What each status allows The fiscal actions on an invoice, by status. Each column comes from the rule that governs it; a refused action leaves the invoice as it was. | Status | Edit ([LIF-001](/rules/lifecycle#lif-001)) | Delete ([LIF-001](/rules/lifecycle#lif-001)) | Issue ([LIF-002](/rules/lifecycle#lif-002)) | Correct ([COR-001](/rules/corrective#cor-001)) | |---|---|---|---|---| | `DRAFT` | ✓ | ✓ | ✓ | — [`INVOICE_NOT_CORRECTIBLE_IN_CURRENT_STATUS`](/errors/INVOICE_NOT_CORRECTIBLE_IN_CURRENT_STATUS) | | `SCHEDULED` | ✓ | ✓ | — [`ONLY_DRAFT_EMITTABLE`](/errors/ONLY_DRAFT_EMITTABLE) | — [`INVOICE_NOT_CORRECTIBLE_IN_CURRENT_STATUS`](/errors/INVOICE_NOT_CORRECTIBLE_IN_CURRENT_STATUS) | | `ISSUED` | — [`STATUS_NOT_MODIFIABLE`](/errors/STATUS_NOT_MODIFIABLE) | — [`STATUS_NOT_DELETABLE`](/errors/STATUS_NOT_DELETABLE) | — [`ONLY_DRAFT_EMITTABLE`](/errors/ONLY_DRAFT_EMITTABLE) | ✓ | | `SENT` | — [`STATUS_NOT_MODIFIABLE`](/errors/STATUS_NOT_MODIFIABLE) | — [`STATUS_NOT_DELETABLE`](/errors/STATUS_NOT_DELETABLE) | — [`ONLY_DRAFT_EMITTABLE`](/errors/ONLY_DRAFT_EMITTABLE) | ✓ | | `PAID` | — [`STATUS_NOT_MODIFIABLE`](/errors/STATUS_NOT_MODIFIABLE) | — [`STATUS_NOT_DELETABLE`](/errors/STATUS_NOT_DELETABLE) | — [`ONLY_DRAFT_EMITTABLE`](/errors/ONLY_DRAFT_EMITTABLE) | ✓ | | `RECTIFIED` | — [`STATUS_NOT_MODIFIABLE`](/errors/STATUS_NOT_MODIFIABLE) | — [`STATUS_NOT_DELETABLE`](/errors/STATUS_NOT_DELETABLE) | — [`ONLY_DRAFT_EMITTABLE`](/errors/ONLY_DRAFT_EMITTABLE) | ✓ | | `VOIDED` | — [`STATUS_NOT_MODIFIABLE`](/errors/STATUS_NOT_MODIFIABLE) | — [`STATUS_NOT_DELETABLE`](/errors/STATUS_NOT_DELETABLE) | — [`ONLY_DRAFT_EMITTABLE`](/errors/ONLY_DRAFT_EMITTABLE) | — [`INVOICE_NOT_CORRECTIBLE_IN_CURRENT_STATUS`](/errors/INVOICE_NOT_CORRECTIBLE_IN_CURRENT_STATUS) | ## LIF-001 · An issued invoice is never edited or deleted `Required` · Law · Impact: critical · Checked by the API: a request that breaks it is rejected with the error codes listed. Once an invoice is issued, neither the invoice nor its billing record is changed or removed. Any correction goes through a later document: a corrective invoice or a void. **Why:** The billing record is chained and, under VeriFactu, already with AEAT. An edit would make the invoice say something its record does not, and deleting it would leave a hole in the series. **Applies to:** statuses `ISSUED`, `SENT`, `PAID`, `OVERDUE`, `RECTIFIED`, `VOIDED`; operations [`PATCH /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/patchCompanyInvoice), [`DELETE /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/deleteCompanyInvoice) **Error codes:** [`STATUS_NOT_MODIFIABLE`](/errors/STATUS_NOT_MODIFIABLE) (`422` or `400`), [`STATUS_NOT_DELETABLE`](/errors/STATUS_NOT_DELETABLE) (`400`) **Legal basis:** - RD 1007/2023 (RRSIF), art. 8.2.a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2023-24840#a8) > «Cualquier necesidad de corrección o anulación de los datos registrados deberá ser realizada mediante al menos un registro de facturación adicional posterior, de forma que se conserven inalterables los datos originalmente registrados.» **Incorrect:** Patching the amount of an invoice that is already `ISSUED`: the API answers [`STATUS_NOT_MODIFIABLE`](/errors/STATUS_NOT_MODIFIABLE). ```http PATCH /v1/companies/{company_id}/invoices/{invoice_id} { "lines": [{ "description": "Consulting", "quantity": 1, "unit_price": 900, "main_tax": { "type": "IVA", "percentage": 21 } }] } ``` **Correct:** Issuing a corrective invoice against it, which leaves the original as it was. ```http POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective { "rectification_type": "PARTIAL", "rectification_code": "R1", "reason": "Price agreed after delivery was lower", "lines": [{ "description": "Consulting (adjustment)", "quantity": -1, "unit_price": 100, "main_tax": { "type": "IVA", "percentage": 21 } }] } ``` **Related:** [LIF-002 · Only a draft can be issued](/rules/lifecycle#lif-002) · [VOI-001 · Void only an invoice that should never have been issued](/rules/void#voi-001) · [COR-001 · Wrong data on an issued invoice is fixed with a corrective](/rules/corrective#cor-001) **Explained in:** [Invoice lifecycle › What each status allows](/guides/invoice-lifecycle#what-each-status-allows) · [Amounts and rounding › Issued invoices are never recalculated](/guides/amounts-and-rounding#issued-invoices-are-never-recalculated) ## LIF-002 · Only a draft can be issued `Required` · BeeL. rule · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. Issue an invoice from `DRAFT`, or create and issue it in one call. Issuing assigns the number, sets the issue date to today and freezes every amount; a scheduled invoice is issued on its date, or returned to draft first. **Why:** Issuing is the step that creates the fiscal document. Everything the invoice says is fixed at that moment, so it can happen only once and only from a draft. **Applies to:** statuses `DRAFT`, `SCHEDULED`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice), [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice) **Error codes:** [`ONLY_DRAFT_EMITTABLE`](/errors/ONLY_DRAFT_EMITTABLE) (`422`) **Incorrect:** Calling the issue operation on a scheduled invoice to send it out today: it answers [`ONLY_DRAFT_EMITTABLE`](/errors/ONLY_DRAFT_EMITTABLE). **Correct:** Removing the schedule, which returns the invoice to `DRAFT`, and then issuing it. **Related:** [LIF-001 · An issued invoice is never edited or deleted](/rules/lifecycle#lif-001) · [NUM-001 · The number is assigned when the invoice is issued](/rules/numbering#num-001) · [DAT-001 · Do not send an issue date](/rules/dates#dat-001) **Explained in:** [Invoice lifecycle › Issuing](/guides/invoice-lifecycle#issuing) ## LIF-003 · Test in the sandbox, never with real invoices `Required` · AEAT criterion · Impact: critical · Responsibility: your integration. Do not issue test invoices with a production key. An invoice issued in production is a real invoice, sent to AEAT and numbered in your series, even if it was meant as a test; one issued by mistake has to be voided. **Why:** AEAT does not accept fictitious invoices from a billing system in production. A test issued there stays in the series and in AEAT's records, and only a void takes it out of the books. **Applies to:** Production API keys (`beel_sk_live_…`). **Legal basis:** - AEAT, Aclaraciones a dudas de los desarrolladores (v1.3), 11. Borradores de factura, pre-facturas, facturas proforma, albaranes, facturas de prueba — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/FAQs-Desarrolladores.pdf) > «las facturas de prueba o facturas de formación, elaboradas con un SIF adaptado, siempre que lleguen a ser facturas propiamente hablando (es decir que se generen de forma real, y que no sean simples borradores o prefacturas no confirmadas), deben ser tratadas como si de facturas reales se tratara a los efectos del RD 1007/23 y resto de normativa de desarrollo.» **Incorrect:** Running an end-to-end test suite against production that issues invoices to a dummy customer. **Correct:** Running the same suite with a sandbox key (`beel_sk_test_…`): invoices go to AEAT's test environment and never count. **Related:** [VOI-001 · Void only an invoice that should never have been issued](/rules/void#voi-001) · [NUM-002 · An issued number is never reused, even when the invoice is voided](/rules/numbering#num-002) **Explained in:** [Testing VeriFactu in sandbox](/verifactu/testing-in-sandbox) · [Proformas](/guides/proformas) ## LIF-004 · Retry writes with the same Idempotency-Key `Recommended` · BeeL. rule · Impact: critical · Responsibility: your integration. The API also answers the error codes listed. Send an `Idempotency-Key` header on every call that creates, issues, corrects or voids an invoice, and repeat the same key when you retry. A retried request returns the stored response of the first one, a `5xx` included, for 24 hours; a `4xx` answer frees the key, so the corrected request can reuse it. **Why:** Without it, a timeout followed by a retry can create or issue a second invoice. An issued duplicate consumes a number and a billing record, and can only be voided. A key longer than 255 characters, or with characters other than letters, digits, `-` and `_`, is refused with [`INVALID_IDEMPOTENCY_KEY`](/errors/INVALID_IDEMPOTENCY_KEY). **Applies to:** operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/void`](/invoices/voidCompanyInvoice) **Error codes:** [`IDEMPOTENCY_KEY_MISMATCH`](/errors/IDEMPOTENCY_KEY_MISMATCH) (`409`), [`IDEMPOTENCY_KEY_PROCESSING`](/errors/IDEMPOTENCY_KEY_PROCESSING) (`409`), [`INVALID_IDEMPOTENCY_KEY`](/errors/INVALID_IDEMPOTENCY_KEY) (`400`), [`INVOICE_DUPLICATE_EXTERNAL_REFERENCE`](/errors/INVOICE_DUPLICATE_EXTERNAL_REFERENCE) (`409`) **Incorrect:** Retrying a timed-out create call without a key, or with a new random key on each attempt. **Correct:** Deriving the key from your own order id, so every retry of the same order sends the same key. ```bash curl -X POST https://app.beel.es/api/v1/companies/{company_id}/invoices \ -H "Authorization: Bearer $BEEL_API_KEY" \ -H "Idempotency-Key: order-1042-invoice" \ -H "Content-Type: application/json" \ -d @invoice.json ``` **Related:** [LIF-001 · An issued invoice is never edited or deleted](/rules/lifecycle#lif-001) · [NUM-002 · An issued number is never reused, even when the invoice is voided](/rules/numbering#num-002) **Explained in:** [Idempotency](/guides/idempotency) ## LIF-005 · Duplicating an invoice creates a new one, not a copy `Required` · BeeL. rule · Impact: medium · Responsibility: your integration. Do not use the duplicate operation to replace a lost or damaged invoice. It creates a new draft that, once issued, is a different invoice with its own number and its own billing record; to hand over an invoice again, download the same PDF. **Why:** Issuing the copy would invoice the same operation twice, in the series and in AEAT's records. **Applies to:** operations [`POST /v1/companies/{company_id}/invoices/derivations`](/invoices/createCompanyInvoiceDerivation) **Incorrect:** The customer lost the invoice, so you duplicate it and issue the copy. **Correct:** You download the PDF of the original invoice again and send it. ```http GET /v1/companies/{company_id}/invoices/{invoice_id}/pdf ``` **Related:** [CNT-011 · Only one original of each invoice exists](/rules/contents#cnt-011) · [NUM-002 · An issued number is never reused, even when the invoice is voided](/rules/numbering#num-002) **Explained in:** [Invoice lifecycle › Duplicating an invoice](/guides/invoice-lifecycle#duplicating-an-invoice) [← All rules](/rules#all-rules) ## Related - [Invoice lifecycle](/guides/invoice-lifecycle) — every invoice status, which operations each one allows, and the difference between the fiscal steps (issue, void, correct) and the commercial ones (sent, paid) - [Amounts and rounding](/guides/amounts-and-rounding) — how BeeL. turns quantities, prices and rates into bases, taxes and totals: precision, the three ways to price a line, per-group tax rounding, IRPF, and the amounts that are rejected - [Idempotency](/guides/idempotency) — how to use idempotency keys to prevent duplicate operations in the BeeL. API - [Proformas](/guides/proformas) — send a customer a formal quote with no fiscal validity, then turn it into a real invoice once they accept — as a draft or issued in the same call --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Numbering and series How invoice numbers are assigned, which documents need their own series, and why a number is never reused. [← All rules](/rules#all-rules) An invoice number is fiscal data: it is assigned once, at issue, and it identifies the invoice in AEAT's records for good. These rules cover who assigns it, which documents go in separate series, and what a number may look like. 9 rules: 5 from the law, 2 AEAT criteria, 2 BeeL. rules. [How to read a rule](/rules#how-to-read-a-rule). ## NUM-001 · The number is assigned when the invoice is issued `Required` · BeeL. rule · Impact: critical · Checked by the API: BeeL. applies it. Do not expect or send an invoice number: a draft has none, and BeeL. assigns the next number of the chosen series when the invoice is issued. Read `invoice_number` from the response of the issue call. **Why:** Numbering at issue is what keeps the series free of gaps: a draft deleted before issuing never consumed a number. **Applies to:** statuses `DRAFT`, `SCHEDULED`, `ISSUED`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice), [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice) **Incorrect:** Storing the draft's id as the invoice number in your system, or computing the next number yourself before issuing. **Correct:** Issuing the draft and saving the `invoice_number` the issue call returns. ```http POST /v1/companies/{company_id}/invoices/{invoice_id}/issue ``` **Related:** [NUM-003 · Numbers are correlative within each series](/rules/numbering#num-003) · [NUM-002 · An issued number is never reused, even when the invoice is voided](/rules/numbering#num-002) · [LIF-002 · Only a draft can be issued](/rules/lifecycle#lif-002) **Explained in:** [Series and numbering › The number is assigned when you issue](/guides/series-and-numbering#the-number-is-assigned-when-you-issue) ## NUM-002 · An issued number is never reused, even when the invoice is voided `Required` · AEAT criterion · Impact: critical · Checked by the API: a request that breaks it is rejected with the error codes listed. Treat every issued number as consumed for good. A voided invoice, or a test issued in production, keeps its number in the series; the invoice that replaces it gets a new one. BeeL. never gives two invoices of a company the same number: a series whose format could print the numbers of another series of the company is rejected with [`SERIES_FORMAT_OVERLAPS`](/errors/SERIES_FORMAT_OVERLAPS). If AEAT already holds a record with the same number and issue date that is not this invoice, for example one issued with the software you used before, the invoice is not registered: its `verifactu.submission_status` is `REJECTED`, and it has to be issued again with a different series or number. **Why:** The number identifies the invoice in AEAT's records. A second invoice with the same number would be a duplicate that AEAT does not accept. **Applies to:** statuses `ISSUED`, `SENT`, `PAID`, `RECTIFIED`, `VOIDED`; operations [`POST /v1/companies/{company_id}/series`](/invoice-series/createCompanySeries), [`PATCH /v1/companies/{company_id}/series/{series_id}`](/invoice-series/patchCompanySeries), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice) **Error codes:** [`SERIES_FORMAT_OVERLAPS`](/errors/SERIES_FORMAT_OVERLAPS) (`409`), [`SERIES_NUMBER_COLLISION`](/errors/SERIES_NUMBER_COLLISION) (`400`) **Legal basis:** - AEAT, Preguntas frecuentes SIF y VERI*FACTU, Registros de facturación: anulación — [source](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/registros-facturacion-anulacion.html) > «Desde el punto de vista sustantivo, si las facturas se han emitido, aunque sean erróneas deben mantenerse, con su correspondiente numeración, y sin perjuicio de que se anulen posteriormente y se sustituyan por nuevas facturas correctas.» - AEAT, Aclaraciones a dudas de los desarrolladores (v1.3), 6. Prohibición de numeración duplicada de un registro — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/FAQs-Desarrolladores.pdf) > «ya NO es posible reutilizar la numeración de ninguna factura expedida, aunque sean facturas expedidas "de prueba".» **Incorrect:** Creating a series with the fixed format `F-{YYYY}-{NUM:4}` next to series `F`, whose format is `{CODIGO}-{YYYY}-{NUM:4}`: both would print `F-2026-0042`, and the new series is rejected with [`SERIES_FORMAT_OVERLAPS`](/errors/SERIES_FORMAT_OVERLAPS). **Correct:** Voiding `F-2026-0042` and issuing the replacement as a new invoice, which takes the next number of the series. **Related:** [NUM-001 · The number is assigned when the invoice is issued](/rules/numbering#num-001) · [VOI-001 · Void only an invoice that should never have been issued](/rules/void#voi-001) · [LIF-003 · Test in the sandbox, never with real invoices](/rules/lifecycle#lif-003) **Explained in:** [Series and numbering › The number is assigned when you issue](/guides/series-and-numbering#the-number-is-assigned-when-you-issue) ## NUM-003 · Numbers are correlative within each series `Required` · Law · Impact: high · Checked by the API: BeeL. applies it. Within a series, invoice numbers follow one another without gaps or jumps. BeeL. takes the next number of the series at issue, gives it back if the issue fails, and applies the series' initial number only to the first period the series numbers in: later periods start at 1. Numbers are only correlative if every invoice of that series is issued through BeeL. **Why:** A gap or a jump in a series is what an inspection reads as a missing invoice. **Applies to:** invoice types `STANDARD`, `SIMPLIFIED`, `CORRECTIVE` **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 6.1.a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «Número y, en su caso, serie. La numeración de las facturas dentro de cada serie será correlativa.» **Incorrect:** Issuing some invoices of series `A` from another system while BeeL. issues the rest of the same series. **Correct:** Giving each system its own series, or continuing an old sequence in BeeL. by setting the series' initial number before its first invoice. **Related:** [NUM-001 · The number is assigned when the invoice is issued](/rules/numbering#num-001) · [NUM-004 · Separate series may be used when there is a reason for them](/rules/numbering#num-004) · [NUM-007 · A series cannot be renumbered once it has issued](/rules/numbering#num-007) **Explained in:** [Series and numbering › How the counter works](/guides/series-and-numbering#how-the-counter-works) · [Series and numbering › Continuing a sequence from another system](/guides/series-and-numbering#continuing-a-sequence-from-another-system) ## NUM-004 · Separate series may be used when there is a reason for them `Recommended` · Law · Impact: low · Responsibility: the issuing business. You may number invoices in separate series when there is a reason, such as several establishments or operations of a different nature. Create one series per establishment or line of business and pick it when you create the invoice. **Why:** Mixing establishments in one series makes the sequence hard to follow; the law lets you keep them apart. **Applies to:** operations [`POST /v1/companies/{company_id}/series`](/invoice-series/createCompanySeries) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 6.1.a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «Se podrán expedir facturas mediante series separadas cuando existan razones que lo justifiquen y, entre otros supuestos, cuando el obligado a su expedición cuente con varios establecimientos desde los que efectúe sus operaciones y cuando el obligado a su expedición realice operaciones de distinta naturaleza.» **Incorrect:** Creating a new series every month to restart the count, with no establishment or kind of operation behind it. **Correct:** Creating series `SHOP` and `ONLINE` for a business that sells in a shop and on the web, and sending each invoice's `series_id`. **Related:** [NUM-003 · Numbers are correlative within each series](/rules/numbering#num-003) · [NUM-005 · Simplified invoices are numbered in their own series](/rules/numbering#num-005) · [NUM-006 · Corrective invoices are numbered in their own series](/rules/numbering#num-006) **Explained in:** [Series and numbering › Default series per document type](/guides/series-and-numbering#default-series-per-document-type) ## NUM-005 · Simplified invoices are numbered in their own series `Required` · Law · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. A business that issues both full and simplified invoices in the same calendar year numbers them in separate series. A BeeL. series numbers only documents of its own type: a simplified invoice in a series of another type, or in an older `UNASSIGNED` series, is rejected with [`SERIES_INCOMPATIBLE_DOC_TYPE`](/errors/SERIES_INCOMPATIBLE_DOC_TYPE), when it is created, edited or issued. Without `series_id`, the company's default series for simplified invoices is used, and it is created on first use if the company has none. A series that has already numbered invoices cannot change its type ([`SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES`](/errors/SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES)), and a new series of type `UNASSIGNED` is rejected with [`SERIES_UNASSIGNED_TYPE_NOT_ALLOWED`](/errors/SERIES_UNASSIGNED_TYPE_NOT_ALLOWED). **Why:** Full and simplified invoices sharing a series would leave neither sequence correlative. **Applies to:** invoice types `SIMPLIFIED`, `STANDARD`; operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`PATCH /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/patchCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice), [`POST /v1/companies/{company_id}/series`](/invoice-series/createCompanySeries), [`PATCH /v1/companies/{company_id}/series/{series_id}`](/invoice-series/patchCompanySeries) **Error codes:** [`SERIES_INCOMPATIBLE_DOC_TYPE`](/errors/SERIES_INCOMPATIBLE_DOC_TYPE) (`422`), [`SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES`](/errors/SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES) (`400`), [`SERIES_UNASSIGNED_TYPE_NOT_ALLOWED`](/errors/SERIES_UNASSIGNED_TYPE_NOT_ALLOWED) (`422`) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 7.1.a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a7) > «Cuando el empresario o profesional expida facturas conforme a este artículo y al artículo 6 para la documentación de las operaciones efectuadas en un mismo año natural, será obligatoria la expedición mediante series separadas de unas y otras.» **Incorrect:** Creating a `SIMPLIFIED` invoice with the `series_id` of your standard-invoice series: it is rejected with [`SERIES_INCOMPATIBLE_DOC_TYPE`](/errors/SERIES_INCOMPATIBLE_DOC_TYPE), and so is issuing or updating an invoice in such a series. **Correct:** Omitting `series_id` on a simplified invoice: it is numbered in the company's simplified series, created with code `S` (or the next free code) the first time it is needed. **Related:** [NUM-004 · Separate series may be used when there is a reason for them](/rules/numbering#num-004) · [NUM-006 · Corrective invoices are numbered in their own series](/rules/numbering#num-006) · [SIM-001 · A simplified invoice never exceeds 3,000 €](/rules/simplified#sim-001) **Explained in:** [Series and numbering › Default series per document type](/guides/series-and-numbering#default-series-per-document-type) ## NUM-006 · Corrective invoices are numbered in their own series `Required` · Law · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. Corrective invoices go in a series specific to correctives, never in the series of the invoice they correct nor in an older `UNASSIGNED` series. Without a `series_id`, BeeL. numbers a corrective in the company's default corrective series, which is created on first use (code `R`, or the next free code whose numbers cannot repeat another series') if the company has none. An explicit series of another type is rejected with [`SERIES_INCOMPATIBLE_DOC_TYPE`](/errors/SERIES_INCOMPATIBLE_DOC_TYPE); a series that has already numbered invoices cannot change its type ([`SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES`](/errors/SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES)); a new series of type `UNASSIGNED` is rejected with [`SERIES_UNASSIGNED_TYPE_NOT_ALLOWED`](/errors/SERIES_UNASSIGNED_TYPE_NOT_ALLOWED). **Why:** The law requires correctives to be told apart from ordinary invoices by their series. **Applies to:** invoice types `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice), [`POST /v1/companies/{company_id}/series`](/invoice-series/createCompanySeries), [`PATCH /v1/companies/{company_id}/series/{series_id}`](/invoice-series/patchCompanySeries) **Error codes:** [`SERIES_INCOMPATIBLE_DOC_TYPE`](/errors/SERIES_INCOMPATIBLE_DOC_TYPE) (`422`), [`SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES`](/errors/SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES) (`400`), [`SERIES_UNASSIGNED_TYPE_NOT_ALLOWED`](/errors/SERIES_UNASSIGNED_TYPE_NOT_ALLOWED) (`422`) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 6.1.a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «No obstante, será obligatoria, en todo caso, la expedición en series específicas de las facturas siguientes: [...] 2.º Las rectificativas.» **Incorrect:** Passing the `series_id` of your ordinary series when creating a corrective invoice. **Correct:** Omitting `series_id` on the corrective: it goes in the company's corrective series, created the first time it is needed. ```http POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective { "rectification_type": "TOTAL", "rectification_code": "R1", "reason": "Invoice issued with the wrong VAT rate" } ``` **Related:** [NUM-005 · Simplified invoices are numbered in their own series](/rules/numbering#num-005) · [COR-002 · Pick the reason code: R1–R4 for standard invoices, R5 for simplified](/rules/corrective#cor-002) **Explained in:** [Series and numbering › Correctives and proformas](/guides/series-and-numbering#correctives-and-proformas) ## NUM-007 · A series cannot be renumbered once it has issued `Required` · BeeL. rule · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed. Once a series has issued an invoice, its code, format, reset policy, initial number and document type are fixed. Design the series before its first invoice; to number differently, or another type, create a new series. **Why:** Changing how an issued series is numbered would rewrite numbers already registered with AEAT or break the sequence. **Applies to:** operations [`PATCH /v1/companies/{company_id}/series/{series_id}`](/invoice-series/patchCompanySeries) **Error codes:** [`SERIES_CODE_LOCKED_HAS_INVOICES`](/errors/SERIES_CODE_LOCKED_HAS_INVOICES) (`400`), [`SERIES_FORMAT_LOCKED_HAS_INVOICES`](/errors/SERIES_FORMAT_LOCKED_HAS_INVOICES) (`400`), [`SERIES_RESET_LOCKED_HAS_INVOICES`](/errors/SERIES_RESET_LOCKED_HAS_INVOICES) (`400`), [`SERIES_INITIAL_NUMBER_LOCKED_HAS_INVOICES`](/errors/SERIES_INITIAL_NUMBER_LOCKED_HAS_INVOICES) (`400`), [`SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES`](/errors/SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES) (`400`), [`SERIES_NUMBERING_FROZEN`](/errors/SERIES_NUMBERING_FROZEN) (`400`) **Incorrect:** Changing the format of series `A` after it has issued invoices, to add the year: it is rejected with [`SERIES_FORMAT_LOCKED_HAS_INVOICES`](/errors/SERIES_FORMAT_LOCKED_HAS_INVOICES). **Correct:** Creating a new series with the new format and making it the default for new invoices. **Related:** [NUM-003 · Numbers are correlative within each series](/rules/numbering#num-003) · [NUM-004 · Separate series may be used when there is a reason for them](/rules/numbering#num-004) **Explained in:** [Series and numbering › A series locks once it has issued](/guides/series-and-numbering#a-series-locks-once-it-has-issued) ## NUM-008 · An invoice number fits AEAT's length and character set `Required` · AEAT criterion · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. The full invoice number, series prefix included, is at most 60 characters and uses only printable ASCII characters, without double quotes, single quotes, less-than, greater-than or equals signs. BeeL. checks the longest number a series can generate when you create it or change its code or format, counting the counter as at least nine digits ([`SERIES_FORMAT_NUMBER_TOO_LONG`](/errors/SERIES_FORMAT_NUMBER_TOO_LONG)), and checks the actual number again at issue: an invoice whose number AEAT would not accept is not issued, and the number is not consumed ([`INVOICE_NUMBER_TOO_LONG`](/errors/INVOICE_NUMBER_TOO_LONG)). **Why:** AEAT identifies the invoice by this number, in the record and in the QR, and does not accept a number outside these limits. **Applies to:** operations [`POST /v1/companies/{company_id}/series`](/invoice-series/createCompanySeries), [`PATCH /v1/companies/{company_id}/series/{series_id}`](/invoice-series/patchCompanySeries), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice) **Error codes:** [`SERIES_FORMAT_NUMBER_TOO_LONG`](/errors/SERIES_FORMAT_NUMBER_TOO_LONG) (`422`), [`SERIES_FORMAT_INVALID_CHARACTERS`](/errors/SERIES_FORMAT_INVALID_CHARACTERS) (`422`), [`INVOICE_NUMBER_TOO_LONG`](/errors/INVOICE_NUMBER_TOO_LONG) (`422`), [`INVOICE_NUMBER_INVALID_CHARACTERS`](/errors/INVOICE_NUMBER_INVALID_CHARACTERS) (`422`) **Legal basis:** - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.1 Agrupación IDFactura — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «NumSerieFactura solo puede contener caracteres ASCII del 32 a 126 (caracteres imprimibles), no permitiéndose la existencia de los siguientes caracteres:» - AEAT, Detalle de las especificaciones técnicas del código QR de la factura (v0.5.0), apartado 6, parámetro numserie — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/DetalleEspecificacTecnCodigoQRfactura.pdf) > «numserie Cadena de Máximo 60 Sí Nº Serie + Nº Factura» **Incorrect:** A series with a 50-character code and the format `{CODIGO}-{YYYY}-{NUM:4}`: its longest number reaches 65 characters, and the series is rejected with [`SERIES_FORMAT_NUMBER_TOO_LONG`](/errors/SERIES_FORMAT_NUMBER_TOO_LONG). **Correct:** A series format that produces short numbers such as `SHOP-2026-0001`. **Related:** [NUM-007 · A series cannot be renumbered once it has issued](/rules/numbering#num-007) · [QRC-005 · Use qr_url exactly as returned](/rules/qr#qrc-005) **Explained in:** [Series and numbering › The format](/guides/series-and-numbering#the-format) ## NUM-009 · Reverse-charge supplies of metals and electronics go in a special series `Required` · Law · Impact: low · Responsibility: the issuing business. Invoices for supplies of silver, platinum, palladium, mobile phones, game consoles, laptops or tablets in which the buyer is liable for the VAT are issued in a special series. Keep a dedicated series for these invoices. **Why:** The law requires these reverse-charge supplies to be documented in their own series; mixing them with other invoices breaks that requirement. **Applies to:** invoice types `STANDARD`; Supplies of silver, platinum, palladium, mobile phones, game consoles, laptops or tablets where the buyer is liable for VAT. **Legal basis:** - Ley 37/1992 del IVA, art. 84.Uno.2.º g) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a84) > «Las entregas de dichos bienes, en los casos en que sean sujetos pasivos del Impuesto sus destinatarios conforme a lo establecido en este número 2.°, deberán documentarse en una factura mediante serie especial.» - RD 1619/2012 (Reglamento de facturación), art. 6.1.a) 4.º — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «4.º Las que se expidan conforme a lo previsto en el artículo 84, apartado uno, número 2.º, letra g), de la Ley 37/1992, de 28 de diciembre, del Impuesto sobre el Valor Añadido.» **Incorrect:** Invoicing a batch of laptops to a reseller in the same series as the rest of your sales. **Correct:** Creating a series such as `ISP-G` and issuing those invoices in it. **Related:** [NUM-004 · Separate series may be used when there is a reason for them](/rules/numbering#num-004) · [TAX-002 · Reverse-charge operations are invoiced without charging VAT](/rules/taxes#tax-002) · [CNT-012 · A reverse-charge invoice carries the mention «inversión del sujeto pasivo»](/rules/contents#cnt-012) [← All rules](/rules#all-rules) ## Related - [Series and numbering](/guides/series-and-numbering) — when an invoice gets its number, how the format and counter resets work, default series per document type, and why a series locks once it has issued --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # QR code and PDF The tax QR code on every invoice: when it exists, what it encodes, and how any document that carries it presents it. [← All rules](/rules#all-rules) Every invoice issued with a billing system carries a QR code that lets its recipient check it with AEAT. The API returns the QR data with the invoice; these rules apply to any document that carries it. 10 rules: 6 from the law, 3 AEAT criteria, 1 BeeL. rule. [How to read a rule](/rules#how-to-read-a-rule). ## QRC-001 · Every invoice carries the tax QR code `Required` · Law · Impact: high · Responsibility: your integration. An invoice issued with a billing system carries the tax QR code, whether it is a full or a simplified invoice, on any document of the invoice. The invoice's `verifactu` block returns the QR data: `qr_url` and `qr_base64`. **Why:** The QR is how the recipient checks the invoice with AEAT. A document without it is not the invoice the regulation describes. **Applies to:** Invoices of a company under VeriFactu, full or simplified. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 6.5.a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «La representación gráfica del contenido parcial de la factura mediante un código “QR”.» - RD 1619/2012 (Reglamento de facturación), art. 7.5 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a7) > «deberá incluirse, además, lo contenido en el apartado 5 del artículo 6 de este Reglamento.» **Incorrect:** Sending the customer a document of your own with the invoice data and no QR. **Correct:** Printing the invoice's QR (`qr_base64`, or `qr_url` encoded) on every document of the invoice you hand over. **Related:** [QRC-002 · Wait for the QR before you distribute the PDF](/rules/qr#qrc-002) · [QRC-005 · Use qr_url exactly as returned](/rules/qr#qrc-005) · [QRC-003 · The QR measures between 30 mm and 40 mm](/rules/qr#qrc-003) **Explained in:** [QR code and the invoice PDF](/verifactu/qr-and-pdf) · [QR code and the invoice PDF › Rendering your own PDF](/verifactu/qr-and-pdf#rendering-your-own-pdf) ## QRC-002 · Wait for the QR before you distribute the PDF `Required` · BeeL. rule · Impact: critical · Responsibility: your integration. The API also answers the error codes listed. Do not render or send a document of an invoice under VeriFactu before its QR data exists. Wait for the `invoice.pdf.generated` webhook, or read the invoice until `verifactu.qr_url` is present. The API applies the same rule to its own PDF: it is painted once, with the QR, and never modified afterwards — voiding or correcting the invoice does not change it. Asking for the PDF of an invoice whose record ended without QR data answers `INVOICE_NOT_REGISTERED_NO_PDF`; an email requested before the PDF exists is accepted with `202` and sent when the PDF is stored, or recorded as failed if the record ends without QR data. **Why:** A document rendered without the QR data cannot carry the QR the invoice needs. **Applies to:** operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice), [`GET /v1/companies/{company_id}/invoices/{invoice_id}/pdf`](/invoices/getCompanyInvoicePdf), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/send`](/invoices/sendCompanyInvoice); Invoices of a company under VeriFactu. **Error codes:** [`INVOICE_NOT_REGISTERED_NO_PDF`](/errors/INVOICE_NOT_REGISTERED_NO_PDF) (`400`) **Incorrect:** Rendering your own PDF before the invoice carries `qr_url`. **Correct:** Waiting for the `invoice.pdf.generated` webhook, or reading the invoice again until `verifactu.qr_url` is present. **Related:** [QRC-001 · Every invoice carries the tax QR code](/rules/qr#qrc-001) · [REC-008 · Follow submission_status and fix what AEAT rejects](/rules/records#rec-008) **Explained in:** [QR code and the invoice PDF › The PDF and the QR](/verifactu/qr-and-pdf#the-pdf-and-the-qr) · [QR code and the invoice PDF › The QR exists from PENDING](/verifactu/qr-and-pdf#the-qr-exists-from-pending) ## QRC-003 · The QR measures between 30 mm and 40 mm `Required` · Law · Impact: medium · Responsibility: your integration. The QR code printed on an invoice measures at least 30 mm × 30 mm and at most 40 mm × 40 mm. **Why:** A smaller QR may not scan, and the Orden fixes the range: neither smaller nor larger. **Applies to:** Any document that carries the QR, including one you render. **Legal basis:** - Orden HAC/1177/2024, art. 21.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2024-22138#a2-3) > «El código «QR» deberá tener un tamaño entre 30x30 y 40x40 milímetros y seguir las especificaciones de la norma ISO/IEC 18004.» - AEAT, Preguntas frecuentes SIF y VERI*FACTU, Remisión de información por el receptor / QR — [source](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/posibilidad-remision-informacion-factura-parte-receptor.html) > «no puede ser menor de 30x30 mm no puede ser mayor de 40x40 mm.» **Incorrect:** Scaling the `qr_base64` image down to fit a narrow header. **Correct:** Placing the image at a fixed physical size inside the range, whatever the page layout. **Related:** [QRC-004 · The QR follows ISO/IEC 18004 with error correction M](/rules/qr#qrc-004) · [QRC-009 · Keep a blank margin around the QR](/rules/qr#qrc-009) · [QRC-008 · The QR goes once, at the start of the first page](/rules/qr#qrc-008) **Explained in:** [QR code and the invoice PDF › Rendering your own PDF](/verifactu/qr-and-pdf#rendering-your-own-pdf) ## QRC-004 · The QR follows ISO/IEC 18004 with error correction M `Required` · Law · Impact: low · Responsibility: your integration. A QR code generated for an invoice follows ISO/IEC 18004 and uses error-correction level M. Set it when you encode `qr_url` with your own library. **Why:** Other levels change the density of the code, and the Orden fixes this one. **Applies to:** A QR you generate yourself from `qr_url`. **Legal basis:** - Orden HAC/1177/2024, art. 21.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2024-22138#a2-3) > «Para la generación del código «QR» se empleará el nivel M (medio) de corrección de errores.» **Incorrect:** Encoding `qr_url` with a library that defaults to error-correction level L. **Correct:** Encoding it with level M, or printing `qr_base64` unchanged. **Related:** [QRC-003 · The QR measures between 30 mm and 40 mm](/rules/qr#qrc-003) · [QRC-005 · Use qr_url exactly as returned](/rules/qr#qrc-005) **Explained in:** [QR code and the invoice PDF › Rendering your own PDF](/verifactu/qr-and-pdf#rendering-your-own-pdf) ## QRC-005 · Use qr_url exactly as returned `Required` · Law · Impact: high · Checked by the API: BeeL. applies it. Do not build or change the URL the QR encodes: use `qr_url` as BeeL. returns it. It carries only the four parameters AEAT requires, the issuer NIF, the number, the issue date and the amount AEAT registered. **Why:** The URL has to match the registered record. A URL built from your own invoice total, or with extra parameters, points AEAT at an invoice that does not exist. **Applies to:** Invoices of a company under VeriFactu. **Legal basis:** - Orden HAC/1177/2024, art. 21.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2024-22138#a2-3) > «b) Información de la factura que formará parte de la «URL»: 1.º NIF del obligado a expedir la factura. 2.º Número de serie y número de la factura expedida. 3.º Fecha de expedición de la factura. 4.º Importe total de la factura.» - AEAT, Detalle de las especificaciones técnicas del código QR de la factura (v0.5.0), apartado 6 — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/DetalleEspecificacTecnCodigoQRfactura.pdf) > «IMPORTANTE: este parámetro nunca podrá incorporarse en la «URL» que va en el código «QR» de la factura» **Incorrect:** Rebuilding the URL from your own data, with the invoice total including IRPF, or adding `formato=json`. **Correct:** Encoding the `qr_url` string from the invoice, unchanged. ```json { "verifactu": { "qr_url": "https://www2.agenciatributaria.gob.es/wlpl/TIKE-CONT/ValidarQR?nif=B27534239&numserie=S-2026-0001&fecha=19-09-2026&importe=121.00" } } ``` **Related:** [QRC-001 · Every invoice carries the tax QR code](/rules/qr#qrc-001) · [QRC-004 · The QR follows ISO/IEC 18004 with error correction M](/rules/qr#qrc-004) **Explained in:** [QR code and the invoice PDF › Rendering your own PDF](/verifactu/qr-and-pdf#rendering-your-own-pdf) · [What AEAT receives from your invoice › The total](/verifactu/what-aeat-receives#the-total) ## QRC-006 · The VeriFactu legend goes just below the QR `Required` · Law · Impact: medium · Responsibility: your integration. Just below the QR, print «Factura verificable en la sede electrónica de la AEAT» or «VERI*FACTU», preferably centred on it. The Orden asks for a type and size clearly visible and similar to the rest of the invoice data; AEAT's specification, for one equal to or larger than it. Print it only on invoices whose record goes to AEAT. **Why:** The legend tells the recipient the invoice was sent to AEAT and can be checked there; on an invoice that was not, it would say something false. **Applies to:** Any document that carries the QR of an invoice registered under VeriFactu. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 6.5.b) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «Estas facturas, sean electrónicas o no, incorporarán además la frase “Factura verificable en la sede electrónica de la AEAT” o “VERI*FACTU” únicamente en aquellos casos en los que el sistema informático realice la remisión de todos los registros de facturación a la Agencia Estatal de Administración Tributaria» - Orden HAC/1177/2024, art. 20.1.b) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2024-22138#a2-2) > «la frase «Factura verificable en la sede electrónica de la AEAT» o «VERI*FACTU», que deberá tener un tipo de letra y tamaño bien visibles, similares a los del resto de datos de la factura.» - AEAT, Detalle de las especificaciones técnicas del código QR de la factura (v0.5.0), apartado 3 — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/DetalleEspecificacTecnCodigoQRfactura.pdf) > «justo debajo del código «QR» deberá aparecer la frase «Factura verificable en la sede electrónica de la AEAT» o «VERI*FACTU», preferiblemente centrada con respecto al código «QR».» - AEAT, Detalle de las especificaciones técnicas del código QR de la factura (v0.5.0), apartado 3 — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/DetalleEspecificacTecnCodigoQRfactura.pdf) > «deberán tener un tipo de letra y tamaño legibles, siempre iguales o superiores a los del resto de datos de la factura.» **Incorrect:** Printing the legend in small print in the footer, away from the QR. **Correct:** Printing «Factura verificable en la sede electrónica de la AEAT» centred just below the QR, as large as the invoice lines. **Related:** [QRC-007 · «QR tributario:» goes just above the QR](/rules/qr#qrc-007) · [QRC-003 · The QR measures between 30 mm and 40 mm](/rules/qr#qrc-003) **Explained in:** [QR code and the invoice PDF › The legend next to the QR](/verifactu/qr-and-pdf#the-legend-next-to-the-qr) ## QRC-007 · «QR tributario:» goes just above the QR `Required` · AEAT criterion · Impact: medium · Responsibility: your integration. Above the QR, print the text «QR tributario:», preferably centred on it, in a legible type size equal to or larger than the rest of the invoice data. **Why:** AEAT's specification presents the QR with this label, so that the recipient knows which code to scan. **Applies to:** Any document that carries the QR, including one you render. **Legal basis:** - AEAT, Detalle de las especificaciones técnicas del código QR de la factura (v0.5.0), apartado 3 — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/DetalleEspecificacTecnCodigoQRfactura.pdf) > «La presentación del código «QR» incluirá también un texto que siempre deberá ir precediéndolo: «QR tributario:», y que se situará encima del propio código «QR» (preferiblemente centrado con respecto a este)» - AEAT, Detalle de las especificaciones técnicas del código QR de la factura (v0.5.0), apartado 3 — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/DetalleEspecificacTecnCodigoQRfactura.pdf) > «Tanto el texto que siempre debe preceder al código «QR», como, en su caso, la frase que habrán de incluir los sistemas «VERI*FACTU» deberán tener un tipo de letra y tamaño legibles, siempre iguales o superiores a los del resto de datos de la factura.» **Incorrect:** Printing the QR on its own, or with a label in a smaller font than the invoice lines. **Correct:** Printing «QR tributario:» centred above the QR, at the same size as the invoice data. **Related:** [QRC-006 · The VeriFactu legend goes just below the QR](/rules/qr#qrc-006) · [QRC-008 · The QR goes once, at the start of the first page](/rules/qr#qrc-008) **Explained in:** [QR code and the invoice PDF › Rendering your own PDF](/verifactu/qr-and-pdf#rendering-your-own-pdf) ## QRC-008 · The QR goes once, at the start of the first page `Required` · AEAT criterion · Impact: medium · Responsibility: your integration. Place the QR at the beginning of the invoice, before its content. On a portrait page it goes near the top margin, preferably centred (otherwise top left); on a landscape page, on the left, preferably near the top-left corner (otherwise centred between the top and bottom margins). On an invoice of several pages it appears once, on the first page. **Why:** AEAT's specification fixes where the recipient finds the code; a QR repeated or buried in the footer departs from it. **Applies to:** Any document that carries the QR, including one you render. **Legal basis:** - AEAT, Detalle de las especificaciones técnicas del código QR de la factura (v0.5.0), apartado 3 — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/DetalleEspecificacTecnCodigoQRfactura.pdf) > «Si la factura ocupara varias páginas, el código «QR» aparecería una única vez, en la primera página.» - AEAT, Preguntas frecuentes SIF y VERI*FACTU, Remisión de información por el receptor / QR — [source](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/posibilidad-remision-informacion-factura-parte-receptor.html) > «El QR tributario solo debe aparecer una vez, al principio de la factura y antes del contenido de esta.» - AEAT, Detalle de las especificaciones técnicas del código QR de la factura (v0.5.0), apartado 3 — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/DetalleEspecificacTecnCodigoQRfactura.pdf) > «En el caso de utilizar un formato de orientación horizontal (apaisado) para la factura, el código «QR» se situará a la izquierda de esta, preferiblemente cercana al margen superior-izquierdo (o, si no, centrada respecto a los márgenes superior e inferior de la factura).» **Incorrect:** Repeating the QR in the footer of every page. **Correct:** Printing it once, at the top of page one, centred between the margins. **Related:** [QRC-007 · «QR tributario:» goes just above the QR](/rules/qr#qrc-007) · [QRC-009 · Keep a blank margin around the QR](/rules/qr#qrc-009) **Explained in:** [QR code and the invoice PDF › Rendering your own PDF](/verifactu/qr-and-pdf#rendering-your-own-pdf) ## QRC-009 · Keep a blank margin around the QR `Required` · AEAT criterion · Impact: low · Responsibility: your integration. Leave at least 2 mm of blank space on all four sides of the QR (6 mm recommended), with enough contrast against the background. **Why:** Without a quiet zone, text or lines next to the code stop it from scanning. **Applies to:** Any document that carries the QR, including one you render. **Legal basis:** - AEAT, Detalle de las especificaciones técnicas del código QR de la factura (v0.5.0), apartado 3 — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/DetalleEspecificacTecnCodigoQRfactura.pdf) > «se deben mantener como mínimo 2 milímetros de espacio vacío (en blanco) alrededor de los cuatro lados del código «QR», recomendándose que sean 6 milímetros.» **Incorrect:** Placing the QR flush against a table border. **Correct:** Keeping a white margin around it on every side. **Related:** [QRC-003 · The QR measures between 30 mm and 40 mm](/rules/qr#qrc-003) · [QRC-008 · The QR goes once, at the start of the first page](/rules/qr#qrc-008) **Explained in:** [QR code and the invoice PDF › Rendering your own PDF](/verifactu/qr-and-pdf#rendering-your-own-pdf) ## QRC-010 · A structured e-invoice carries the QR URL as a field `Required` · Law · Impact: low · Responsibility: your integration. When you send an invoice as a structured electronic invoice, include the `qr_url` as a separate field; the QR image itself is then not needed. A PDF still shows the QR image. **Why:** In a structured file there is no image to scan: the URL is how the recipient reaches AEAT's check. **Applies to:** Invoices you send as structured e-invoices (Facturae, UBL and similar). **Legal basis:** - Orden HAC/1177/2024, art. 20.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2024-22138#a2-2) > «En caso de tratarse de una factura electrónica, destinada al intercambio de su información de forma estructurada» - Orden HAC/1177/2024, art. 20.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2024-22138#a2-2) > «se deberá incluir como un campo independiente la «URL» contenida en el código «QR», no siendo necesario incluir el propio código «QR».» **Incorrect:** Converting the invoice to a structured format and dropping the QR data. **Correct:** Mapping `verifactu.qr_url` to its own field of the structured invoice. **Related:** [QRC-005 · Use qr_url exactly as returned](/rules/qr#qrc-005) · [QRC-001 · Every invoice carries the tax QR code](/rules/qr#qrc-001) **Explained in:** [QR code and the invoice PDF › Rendering your own PDF](/verifactu/qr-and-pdf#rendering-your-own-pdf) [← All rules](/rules#all-rules) ## Related - [QR code and the invoice PDF](/verifactu/qr-and-pdf) — when the VeriFactu QR code data is available, how the PDF relates to it, and what applies to any document that carries the QR - [What AEAT receives from your invoice](/verifactu/what-aeat-receives) — how BeeL. turns your invoice into the record AEAT registers — the description, the total, the number, the recipient and the late-submission flag — and why some of them differ from what you see on the invoice --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # VeriFactu records The billing record behind each invoice under VeriFactu: how it is generated, chained and sent to AEAT, and what to do with AEAT's answer. [← All rules](/rules#all-rules) Under VeriFactu every issued invoice produces a billing record that goes to AEAT. BeeL. generates, chains and submits it; these rules cover what that asks of your integration and of the issuing business. 13 rules: 8 from the law, 4 AEAT criteria, 1 BeeL. rule. [How to read a rule](/rules#how-to-read-a-rule). ## REC-001 · Each issued invoice gets a billing record built from its data `Required` · Law · Impact: high · Checked by the API: BeeL. applies it. When an invoice is issued, its billing record (registro de alta) is generated at that moment from the invoice's own data: issuer, recipient, number, dates, type, description, totals, regime and the tax breakdown of each line. BeeL. generates it; you classify each line correctly. **Why:** The record is what AEAT registers. A line classified wrongly on the invoice is registered wrongly too, and only a later document can change it. **Applies to:** operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice); Invoices of a company under VeriFactu. **Legal basis:** - RD 1007/2023 (RRSIF), art. 9 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2023-24840#a9) > «deberán generar automáticamente un registro de facturación de alta de forma simultánea o inmediatamente anterior a la expedición de cada factura.» - RD 1007/2023 (RRSIF), art. 10.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2023-24840#a1-2) > «El registro informático de facturación de alta incluirá la siguiente información:» **Incorrect:** Classifying an exempt line as a 0 % taxed line: AEAT registers a taxed operation. **Correct:** Sending the exemption reason on the line, so the record carries the exempt base and its cause. **Related:** [REC-002 · The record goes to AEAT as soon as the invoice is issued](/rules/records#rec-002) · [REC-004 · BeeL. generates the hash and the chain](/rules/records#rec-004) · [LIF-001 · An issued invoice is never edited or deleted](/rules/lifecycle#lif-001) **Explained in:** [Compliance and responsibilities › What BeeL. does for each invoice](/verifactu/compliance-and-responsibilities#what-beel-does-for-each-invoice) · [What AEAT receives from your invoice](/verifactu/what-aeat-receives) ## REC-002 · The record goes to AEAT as soon as the invoice is issued `Required` · Law · Impact: high · Checked by the API: BeeL. applies it. Every billing record is sent to AEAT continuously and automatically, as the invoice is issued. BeeL. submits it without a call from you; issue each invoice when the operation happens rather than holding drafts to issue in batches. **Why:** Under VERI*FACTU the immediacy of the submission is part of the record's security. There is no per-invoice switch and no later submit step. **Applies to:** operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice); Invoices of a company under VeriFactu. **Legal basis:** - RD 1007/2023 (RRSIF), art. 16.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2023-24840#a1-8) > «de forma continuada, segura, correcta, íntegra, automática, consecutiva, instantánea y fehaciente todos los registros de facturación generados» - AEAT, Preguntas frecuentes SIF y VERI*FACTU, Sistemas VERI*FACTU — [source](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/sistemas-verifactu.html) > «La inmediatez del envío a VERI*FACTU es parte del sistema de seguridad de los registros de facturación, por lo que se aplica en todos los casos.» **Incorrect:** Keeping a day's sales as drafts and issuing them all at midnight. **Correct:** Issuing each invoice when the sale happens, so its record goes out with it. **Related:** [REC-001 · Each issued invoice gets a billing record built from its data](/rules/records#rec-001) · [REC-007 · Keep invoicing when AEAT is unreachable](/rules/records#rec-007) · [DAT-005 · Invoice consumers when the operation takes place](/rules/dates#dat-005) **Explained in:** [Auto-submit policy](/verifactu/auto-submit) ## REC-003 · VERI*FACTU is kept until the end of the year `Required` · Law · Impact: medium · Responsibility: the issuing business. Once a NIF has sent its first record under VERI*FACTU, it keeps that modality at least until 31 December of that year. Leaving it is declared in a submission before the year ends. **Why:** The option is annual: switching a NIF off in the middle of the year breaks the obligation it took on with its first submission. **Applies to:** A NIF that has started sending records under VERI*FACTU. **Legal basis:** - RD 1007/2023 (RRSIF), art. 16.5 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2023-24840#a1-8) > «La opción en el uso de los «Sistemas de emisión de facturas verificables» se prolongará, al menos, hasta la finalización del año natural en el que se haya producido, de forma efectiva, el primer envío de los registros de facturación.» - Orden HAC/1177/2024, art. 17.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2024-22138#a1-9) > «El funcionamiento como «VERI*FACTU» deberá mantenerse siempre al menos hasta el final del último año en que haya funcionado como tal, es decir, hasta el 31 de diciembre de dicho año.» **Incorrect:** Planning to leave VERI*FACTU in the same year the NIF sent its first record. **Correct:** Deciding before year end whether the NIF continues next year. **Related:** [REC-002 · The record goes to AEAT as soon as the invoice is issued](/rules/records#rec-002) · [DAT-011 · Adapted billing systems are mandatory from 1 January 2027 or 1 July 2027](/rules/dates#dat-011) **Explained in:** [Compliance and responsibilities › VERI*FACTU modality](/verifactu/compliance-and-responsibilities#verifactu-modality-only) · [Enabling VeriFactu for a NIF](/verifactu/enabling-verifactu) ## REC-004 · BeeL. generates the hash and the chain `Required` · Law · Impact: high · Checked by the API: BeeL. applies it. Do not compute a hash or chain records yourself. Each record carries a hash and refers to the previous record of the same issuer; BeeL. generates both when the invoice is issued. **Why:** The chain is what makes the records traceable from the first to the last. A second chain kept by your system would not be the one AEAT receives. **Applies to:** Invoices of a company under VeriFactu. **Legal basis:** - RD 1007/2023 (RRSIF), art. 8.2.b) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2023-24840#a8) > «La trazabilidad de los registros de facturación, que deberán estar encadenados de manera que pueda verificarse su rastro siguiendo su secuencia de creación desde el primero al último.» - RD 1007/2023 (RRSIF), art. 12 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2023-24840#a1-4) > «deberán añadir una huella o «hash» a los registros de facturación de alta y de anulación» - Orden HAC/1177/2024, art. 7.a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2024-22138#a7) > «4.º Los primeros 64 caracteres de la huella o «hash» del registro de facturación inmediatamente anterior.» **Incorrect:** Computing a SHA-256 over your own invoice fields and sending it with the invoice. **Correct:** Issuing through BeeL. and reading `verifactu.invoice_hash` from the invoice if you need it. **Related:** [REC-001 · Each issued invoice gets a billing record built from its data](/rules/records#rec-001) · [REC-005 · One chain per NIF, one company per NIF](/rules/records#rec-005) **Explained in:** [Integrating BeeL. into your ERP › Who generates the record, the hash and the chain](/guides/erp-integration#who-generates-the-record-the-hash-and-the-chain) ## REC-005 · One chain per NIF, one company per NIF `Required` · Law · Impact: high · Responsibility: your integration. Records of each taxpayer are kept apart, in a chain of their own. Create one company per NIF and issue each invoice from the company of the NIF that issues it; show your users which one they are operating. **Why:** A system used by several taxpayers must keep their records separate and meet the requirements for each one; an invoice issued from the wrong company lands in another taxpayer's chain. **Applies to:** Accounts that invoice for several NIFs. **Legal basis:** - RD 1007/2023 (RRSIF), art. 7.a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2023-24840#a7) > «siempre que los registros de facturación de cada obligado tributario se encuentren diferenciados y se cumplan los requisitos exigidos en este Reglamento por separado para cada uno de los obligados tributarios» - Orden HAC/1177/2024, art. 7.c) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2024-22138#a7) > «Para un determinado obligado tributario, cada sistema informático producirá una única cadena de registros de facturación» **Incorrect:** Issuing the invoices of two businesses from one company, told apart by a series prefix. **Correct:** Creating a company per NIF and targeting each call at the right one. **Related:** [REC-004 · BeeL. generates the hash and the chain](/rules/records#rec-004) · [REC-011 · The NIF holder signs the AEAT representation first](/rules/records#rec-011) **Explained in:** [Overview › The model](/multi-nif#the-model) ## REC-006 · No certificate is needed to sign records `Recommended` · Law · Impact: low · Checked by the API: BeeL. applies it. Records sent under VERI*FACTU need no electronic signature: their hash is enough. Neither the issuer nor the integrator hands BeeL. a digital certificate for the submissions. **Why:** Integrations that plan a signing step, or ask their customers for a certificate, add work the regulation does not require. **Applies to:** Invoices of a company under VeriFactu. **Legal basis:** - RD 1007/2023 (RRSIF), art. 16.3 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2023-24840#a1-8) > «no tendrán la obligación de realizar la firma electrónica de los registros de facturación a la que se refiere el artículo 12 de este Reglamento, siendo suficiente con que calculen la huella o «hash» de dichos registros.» **Incorrect:** Asking each customer to upload a certificate so that their invoices can be signed. **Correct:** Asking the NIF holder to sign the AEAT representation once, and nothing else. **Related:** [REC-011 · The NIF holder signs the AEAT representation first](/rules/records#rec-011) · [REC-004 · BeeL. generates the hash and the chain](/rules/records#rec-004) **Explained in:** [FAQ › Do I or my customers need a digital certificate?](/faq#do-i-need-a-digital-certificate) · [Compliance and responsibilities › Representation, not a certificate](/verifactu/compliance-and-responsibilities#representation-not-a-certificate) ## REC-007 · Keep invoicing when AEAT is unreachable `Required` · Law · Impact: medium · Checked by the API: BeeL. applies it. Do not stop invoicing because AEAT is unavailable. The invoice is issued and numbered as usual, the submission is retried, and a record that goes out on a later day than the issue date is flagged as a late submission. **Why:** An incident in the submission never justifies stopping invoicing, and records have to be sent as soon as it is possible, in order and flagged as late. **Applies to:** Invoices of a company under VeriFactu. **Legal basis:** - Orden HAC/1177/2024, art. 16.4 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2024-22138#a1-8) > «se deberá proceder a la remisión de los registros de facturación en cuanto sea posible, respetando el orden temporal de generación de los registros de facturación.» - AEAT, Preguntas frecuentes SIF y VERI*FACTU, Sistemas VERI*FACTU — [source](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/sistemas-verifactu.html) > «Incidencias como las mencionada, que afectan a la remisión a la AEAT , NO suponen en ningún caso que deba interrumpirse la facturación de la empresa.» **Incorrect:** Queueing sales in your system until AEAT is back, then issuing them with the day's date. **Correct:** Issuing through BeeL. as usual and following each invoice with the `verifactu.status.updated` webhook. **Related:** [REC-002 · The record goes to AEAT as soon as the invoice is issued](/rules/records#rec-002) · [REC-008 · Follow submission_status and fix what AEAT rejects](/rules/records#rec-008) · [DAT-002 · The issue date is the day the billing record is generated](/rules/dates#dat-002) **Explained in:** [Integrating BeeL. into your ERP › AEAT does not answer](/guides/erp-integration#aeat-does-not-answer) · [What AEAT receives from your invoice › Dates and late submission](/verifactu/what-aeat-receives#dates-and-late-submission) ## REC-008 · Follow submission_status and fix what AEAT rejects `Required` · BeeL. rule · Impact: critical · Responsibility: your integration. Track each issued invoice's `verifactu.submission_status` (`NOT_SUBMITTED`, `PENDING`, `ACCEPTED`, `ACCEPTED_WITH_ERRORS`, `REJECTED`, `VOIDED`) through the `verifactu.status.updated` webhook and a periodic reconciliation. A transient AEAT error keeps the invoice `PENDING` while BeeL. retries it. A `REJECTED` invoice is not registered: read its `error_message`, and its `error_code` when AEAT gave one, and fix it. An `ACCEPTED_WITH_ERRORS` invoice is registered but flagged: handle it as [REC-009](/rules/records#rec-009) says. `GET /v1/companies/{company_id}/invoices/{invoice_id}/verifactu-records` lists each record of the invoice, its cancellation included, with its own status. **Why:** A `200` on issue means BeeL. accepted the invoice, not that AEAT registered it. A rejection nobody reads leaves an invoice outside AEAT's records. **Applies to:** operations [`GET /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/getCompanyInvoice); Invoices of a company under VeriFactu. **Incorrect:** Treating the `200` of the issue call as proof that AEAT registered the invoice. **Correct:** Subscribing to `verifactu.status.updated` and, on a schedule, listing invoices `REJECTED`, `ACCEPTED_WITH_ERRORS` or still `NOT_SUBMITTED` to reconcile them. **Related:** [REC-009 · Check the data AEAT accepted with errors](/rules/records#rec-009) · [REC-010 · Subsanación is only for errors that need no corrective](/rules/records#rec-010) · [QRC-002 · Wait for the QR before you distribute the PDF](/rules/qr#qrc-002) **Explained in:** [Submission states › The fiscal states](/verifactu/submission-states#the-fiscal-states) · [Handling AEAT rejections › Reconcile, do not only listen](/verifactu/handling-rejections#reconcile-do-not-only-listen) ## REC-009 · Check the data AEAT accepted with errors `Required` · AEAT criterion · Impact: medium · Responsibility: your integration. When AEAT accepts a record but reports an error (`ACCEPTED_WITH_ERRORS`, with an `error_code`), check the data it flagged, usually the recipient's tax ID and name. If it was right, nothing else is needed. If it was wrong, fix it in the customer's data and correct the invoice already recorded with an `R4` corrective that carries the corrected recipient ([COR-017](/rules/corrective#cor-017)); the following invoices take the fixed data. **Why:** A record accepted with errors stays in AEAT with those errors until a later document fixes them, and for a recipient's data that document is a corrective. **Applies to:** Invoices `ACCEPTED_WITH_ERRORS`. **Legal basis:** - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 4.3.1 — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Los registros de facturación con errores admisibles serán “aceptados” y registrados por los sistemas de la AEAT, pero deberán ser subsanados para poder llevar a cabo el tratamiento y validación de los mismos.» **Incorrect:** Reading `ACCEPTED_WITH_ERRORS` as if it were a clean `ACCEPTED` and ignoring the `error_code` next to it. **Correct:** Reading `error_message`, confirming the customer's tax ID was mistyped, fixing it in the customer's data and issuing the `R4` corrective of the recipient's data for the invoice already recorded. **Related:** [REC-008 · Follow submission_status and fix what AEAT rejects](/rules/records#rec-008) · [COR-017 · A corrective keeps the recipient, except to correct the recipient's data](/rules/corrective#cor-017) **Explained in:** [Handling AEAT rejections › Accepted with errors](/verifactu/handling-rejections#accepted-with-errors) ## REC-010 · Subsanación is only for errors that need no corrective `Required` · AEAT criterion · Impact: medium · Responsibility: your integration. A subsanación replaces a registration record with a corrected one, and applies only when the error needs no corrective invoice. When AEAT refused the record for a cause outside the invoice's data, such as an issuer not yet in the census, fix the cause and contact BeeL. with the invoice. Any error in what the invoice says is fixed with a corrective. **Why:** AEAT allows a subsanación only when the cause does not require a corrective invoice; a wrong amount, customer or description does. **Applies to:** Records rejected or accepted with errors. **Legal basis:** - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 4.3.1 — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Solo podrá llevarse a cabo una subsanación cuando no se trate de una causa que exija la emisión de una factura rectificativa (u otro mecanismo contemplado en el Reglamento de Facturación).» - AEAT, Preguntas frecuentes SIF y VERI*FACTU, Registros de facturación: alta — [source](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/registros-facturacion-alta.html) > «podrá ser una anulación completa del registro inicial o una subsanación / sustitución (es decir sustitución del “registro de alta” por otro registro subsanado)» **Incorrect:** Asking for a subsanación of an invoice whose recipient NIF was wrong. **Correct:** Getting the issuing NIF registered in the AEAT census, then contacting BeeL. with the invoice ID. **Related:** [REC-008 · Follow submission_status and fix what AEAT rejects](/rules/records#rec-008) · [COR-001 · Wrong data on an issued invoice is fixed with a corrective](/rules/corrective#cor-001) · [VOI-001 · Void only an invoice that should never have been issued](/rules/void#voi-001) **Explained in:** [Handling AEAT rejections › When to contact support](/verifactu/handling-rejections#when-to-contact-support) · [Cancel vs amend](/verifactu/cancel-and-fix) ## REC-011 · The NIF holder signs the AEAT representation first `Required` · Law · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. Before a NIF issues real invoices under VeriFactu, its holder signs the AEAT representation that lets BeeL. submit the records on the taxpayer's behalf. Enabling VeriFactu without it is rejected with [`VERIFACTU_REPRESENTATION_REQUIRED`](/errors/VERIFACTU_REPRESENTATION_REQUIRED); issuing is rejected with [`EMISSION_NOT_READY`](/errors/EMISSION_NOT_READY), with [`NIF_REPRESENTATION_REQUIRED`](/errors/NIF_REPRESENTATION_REQUIRED) among the blockers in `details`. **Why:** Records are sent by the taxpayer or by someone acting as its representative. Without the signed representation there is nobody entitled to send them. **Applies to:** operations [`POST /v1/companies/{company_id}/representation`](/companies/generateCompanyRepresentation), [`POST /v1/companies/{company_id}/representation/submit`](/companies/submitCompanyRepresentation), [`PUT /v1/companies/{company_id}/verifactu-configuration`](/verifactu/updateCompanyVeriFactuConfiguration), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice); Production (Live) NIFs; sandbox needs no representation. **Error codes:** [`VERIFACTU_REPRESENTATION_REQUIRED`](/errors/VERIFACTU_REPRESENTATION_REQUIRED) (`422`), [`EMISSION_NOT_READY`](/errors/EMISSION_NOT_READY) (`422`), [`NIF_REPRESENTATION_REQUIRED`](/errors/NIF_REPRESENTATION_REQUIRED) **Legal basis:** - Orden HAC/1177/2024, art. 5 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2024-22138#a5) > «La remisión podrá ser efectuada por el propio obligado tributario o por un tercero que actúe en su representación» **Incorrect:** Enabling VeriFactu in Live for a new NIF straight after creating it: the API answers [`VERIFACTU_REPRESENTATION_REQUIRED`](/errors/VERIFACTU_REPRESENTATION_REQUIRED). **Correct:** Generating the representation document, having the holder sign it, uploading it, and then enabling VeriFactu. **Related:** [REC-006 · No certificate is needed to sign records](/rules/records#rec-006) · [REC-005 · One chain per NIF, one company per NIF](/rules/records#rec-005) **Explained in:** [Compliance and responsibilities › Representation, not a certificate](/verifactu/compliance-and-responsibilities#representation-not-a-certificate) · [Enabling VeriFactu for a NIF › Sign the AEAT representation](/verifactu/enabling-verifactu#sign-the-aeat-representation) ## REC-012 · Tax amounts are base times rate `Required` · AEAT criterion · Impact: low · Checked by the API: BeeL. applies it. The tax amount of each breakdown equals its base times its rate, with the same sign as the base. BeeL. computes it from the rate of each line: the API takes rates, never tax amounts. **Why:** AEAT checks the tax amount against base × rate, allowing 10 € of difference, and rejects the record beyond it. **Applies to:** Every taxed line. **Legal basis:** - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.7 CuotaRepercutida — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «CuotaRepercutida y BaseImponibleOimporteNoSujeto deben tener el mismo signo.» **Incorrect:** Keeping a tax amount computed by your system and expecting BeeL. to register it. **Correct:** Sending the rate on each line (`main_tax`) and reading the computed amounts from the response. **Related:** [REC-001 · Each issued invoice gets a billing record built from its data](/rules/records#rec-001) · [TAX-001 · Apply the VAT rate in force when the operation took place](/rules/taxes#tax-001) **Explained in:** [Amounts and rounding › Taxes are rounded per group, not per line](/guides/amounts-and-rounding#taxes-are-rounded-per-group-not-per-line) ## REC-013 · An invoice AEAT would reject is not numbered `Required` · AEAT criterion · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. Before an invoice recorded with VeriFactu takes its number, BeeL. builds the billing record it will send and checks it against AEAT's validations: the invoice type, the recipient, the correction, the tax breakdown (at most 12 groups, rates with two decimals, the rate and surcharge accepted on the operation date, what each regime key admits), the operation date and the total amount. AEAT requires the Macrodato flag on a record of 100,000,000.00 EUR or more in absolute value; such an invoice, a corrective one included, answers [`INVOICE_TOTAL_TOO_LARGE_FOR_VERIFACTU`](/errors/INVOICE_TOTAL_TOO_LARGE_FOR_VERIFACTU) and is not numbered. If AEAT would reject the record, the invoice is not issued and the number is not used: the API answers `422` with the specific code, or [`VERIFACTU_RECORD_NOT_DECLARABLE`](/errors/VERIFACTU_RECORD_NOT_DECLARABLE) with the AEAT section in its message when there is no specific one. The record that is checked is exactly the one that is sent. **Why:** AEAT rejects a record after the invoice already has its number, and a gap in the numbering cannot be repaired. **Applies to:** operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice); Invoices recorded with VeriFactu. **Error codes:** [`VERIFACTU_RECORD_NOT_DECLARABLE`](/errors/VERIFACTU_RECORD_NOT_DECLARABLE), [`INVOICE_TAX_BREAKDOWN_TOO_LONG`](/errors/INVOICE_TAX_BREAKDOWN_TOO_LONG), [`INVOICE_TOTAL_TOO_LARGE_FOR_VERIFACTU`](/errors/INVOICE_TOTAL_TOO_LARGE_FOR_VERIFACTU), [`INVOICE_TAX_RATE_TOO_MANY_DECIMALS`](/errors/INVOICE_TAX_RATE_TOO_MANY_DECIMALS) (`422`), [`EXEMPTION_INCOMPATIBLE_WITH_REGIME`](/errors/EXEMPTION_INCOMPATIBLE_WITH_REGIME) (`400`), [`VAT_RATE_NOT_ACCEPTED_ON_DATE`](/errors/VAT_RATE_NOT_ACCEPTED_ON_DATE) (`422`), [`SURCHARGE_RATE_NOT_ACCEPTED_ON_DATE`](/errors/SURCHARGE_RATE_NOT_ACCEPTED_ON_DATE) (`422`), [`OPERATION_DATE_TOO_OLD`](/errors/OPERATION_DATE_TOO_OLD), [`INVOICE_REQUIRES_AT_LEAST_ONE_NORMAL_LINE`](/errors/INVOICE_REQUIRES_AT_LEAST_ONE_NORMAL_LINE) (`422`) **Legal basis:** - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.13 Agrupación Destinatarios — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Si TipoFactura es “F2” o “R5”, la agrupación Destinatarios no puede estar cumplimentada.» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.4 CalificacionOperacion — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Si CalificacionOperacion es “S2”, TipoFactura solo puede ser “F1”, “F3”, “R1”, “R2”, “R3” y “R4”.» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.5 OperacionExenta — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Si Impuesto = “01” (IVA), “03” (IGIC) o no se cumplimenta (considerándose “01” - IVA), y ClaveRegimen es igual a “01”, no pueden marcarse los valores de OperacionExenta “E2” y “E3”.» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.10 Macrodato — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Campo obligatorio si ImporteTotal >= |100.000.000,00| (valor absoluto).» **Incorrect:** Issuing a draft saved before a rule existed, with an exemption under article 21 and regime key `01`: the API answers [`EXEMPTION_INCOMPATIBLE_WITH_REGIME`](/errors/EXEMPTION_INCOMPATIBLE_WITH_REGIME) and the draft keeps no number. **Correct:** Fixing the draft (regime key `02` for an export) and issuing it again. **Related:** [REC-001 · Each issued invoice gets a billing record built from its data](/rules/records#rec-001) · [TAX-014 · Only the VAT rates AEAT accepts on the operation date](/rules/taxes#tax-014) · [TAX-017 · Special regime keys carry the classification AEAT requires](/rules/taxes#tax-017) [← All rules](/rules#all-rules) ## Related - [Compliance and responsibilities](/verifactu/compliance-and-responsibilities) — what BeeL. does for each invoice, who signs its declaración responsable, the rules that apply to software built on the API and to the issuing business, the VERI*FACTU modality, and what BeeL. keeps for each record - [Handling AEAT rejections](/verifactu/handling-rejections) — how to read a REJECTED invoice (and an accepted one that carries an error code), what to do for each family of AEAT codes, and how to make sure you never miss one - [Integrating BeeL. into your ERP](/guides/erp-integration) — the decisions every ERP integration makes — who issues the invoice, who renders the PDF and sends the email, how to continue your numbering, how to correct an invoice, and how to hear back from AEAT - [Enabling VeriFactu for a NIF](/verifactu/enabling-verifactu) — put a NIF under the VeriFactu regime in Live — the steps, the configuration fields that tell you where you are, the errors you can hit, and the blockers that stop issuing --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Sanctions The fines the General Tax Law sets for invoicing breaches and for billing software that does not comply. [← All rules](/rules#all-rules) These rules restate what the General Tax Law fines, so that an integration knows what is at stake. They are not legal advice. 3 rules: 3 from the law. [How to read a rule](/rules#how-to-read-a-rule). ## SAN-001 · Do not hold non-compliant or altered billing software `Required` · Law · Impact: medium · Responsibility: the issuing business. Holding billing software that does not meet art. 29.2.j) of the General Tax Law, when it is not certified although the regulation requires it or when certified devices have been altered, is an infringement of its own, fined 50,000 € per financial year. **Why:** The fine applies to holding such software, whatever it was used for. **Applies to:** Every business subject to the billing-system regulation. **Legal basis:** - Ley 58/2003 General Tributaria, art. 201 bis.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2003-23186#a2-2) > «Constituye infracción tributaria la tenencia de los sistemas o programas informáticos o electrónicos que no se ajusten a lo establecido en el artículo 29.2.j) de esta Ley, cuando los mismos no estén debidamente certificados teniendo que estarlo por disposición reglamentaria o cuando se hayan alterado o modificado los dispositivos certificados.» - Ley 58/2003 General Tributaria, art. 201 bis.4 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2003-23186#a2-2) > «La infracción señalada en el apartado 2 anterior, se sancionará con multa pecuniaria fija de 50.000 euros por cada ejercicio» **Incorrect:** Keeping a tool that edits or deletes issued invoices next to the invoicing flow. **Correct:** Issuing, correcting and voiding only through documents the system records. **Related:** [LIF-001 · An issued invoice is never edited or deleted](/rules/lifecycle#lif-001) · [SAN-002 · Invoicing breaches are fined in proportion to the operations](/rules/sanctions#san-002) ## SAN-002 · Invoicing breaches are fined in proportion to the operations `Required` · Law · Impact: medium · Responsibility: the issuing business. Breaching the invoicing obligations (issuing, delivering, correcting and keeping invoices) is fined at 1 % of the operations involved; at 2 % when invoices were not issued or not kept, or 300 € per operation when their amount cannot be known; and at 75 % when invoices carry false or falsified data. **Why:** A flow that skips invoices, or corrects them by issuing new ones with altered data, turns into a fine proportional to the amounts involved. **Applies to:** Every business with invoicing obligations. **Legal basis:** - Ley 58/2003 General Tributaria, art. 201.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2003-23186#a201) > «Constituye infracción tributaria el incumplimiento de las obligaciones de facturación, entre otras, la de expedición, remisión, rectificación y conservación de facturas, justificantes o documentos sustitutivos.» - Ley 58/2003 General Tributaria, art. 201.2.a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2003-23186#a201) > «La sanción consistirá en multa pecuniaria proporcional del uno por ciento del importe del conjunto de las operaciones que hayan originado la infracción.» - Ley 58/2003 General Tributaria, art. 201.2.b) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2003-23186#a201) > «b) Cuando el incumplimiento consista en la falta de expedición o en la falta de conservación de facturas, justificantes o documentos sustitutivos. La sanción consistirá en multa pecuniaria proporcional del dos por ciento del importe del conjunto de las operaciones que hayan originado la infracción. Cuando no sea posible conocer el importe de las operaciones a que se refiere la infracción, la sanción será de 300 euros por cada operación respecto de la que no se haya emitido o conservado la correspondiente factura o documento.» - Ley 58/2003 General Tributaria, art. 201.3 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2003-23186#a201) > «La infracción prevista en el apartado 1 de este artículo será muy grave cuando el incumplimiento consista en la expedición de facturas o documentos sustitutivos con datos falsos o falseados. La sanción consistirá en multa pecuniaria proporcional del 75 por ciento del importe del conjunto de las operaciones que hayan originado la infracción.» **Incorrect:** Leaving sales without an invoice, or fixing a mistake by issuing a second invoice for the same sale. **Correct:** Invoicing every operation and fixing mistakes with a corrective invoice. **Related:** [SAN-001 · Do not hold non-compliant or altered billing software](/rules/sanctions#san-001) · [CNT-001 · Every operation of the business is invoiced, exempt ones included](/rules/contents#cnt-001) · [COR-001 · Wrong data on an issued invoice is fixed with a corrective](/rules/corrective#cor-001) · [SAN-003 · A substantial breach doubles the invoicing fine](/rules/sanctions#san-003) ## SAN-003 · A substantial breach doubles the invoicing fine `Required` · Law · Impact: low · Responsibility: the issuing business. The fines for invoicing breaches are increased by 100 % when the breach of the invoicing obligations is substantial. **Why:** A breach that runs through the invoicing as a whole, rather than an isolated one, is fined at twice the proportional amount. **Applies to:** Every business with invoicing obligations. **Legal basis:** - Ley 58/2003 General Tributaria, art. 201.5 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2003-23186#a201) > «Las sanciones impuestas de acuerdo con lo dispuesto en este artículo se graduarán incrementando la cuantía resultante en un 100 por ciento si se produce el incumplimiento sustancial de las obligaciones anteriores.» **Incorrect:** Leaving most of a year's sales uninvoiced and treating the fine as the proportional one alone. **Correct:** Invoicing every operation within its deadline, so no breach builds up. **Related:** [SAN-002 · Invoicing breaches are fined in proportion to the operations](/rules/sanctions#san-002) [← All rules](/rules#all-rules) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Simplified invoices When a simplified invoice (F2) may replace a full one, what it must carry and what it can never document. [← All rules](/rules#all-rules) A simplified invoice (factura simplificada, F2) is the ticket of a sale to an unidentified customer. The law caps its amount and excludes some operations; once the customer is identified on it, AEAT registers it as F1. 11 rules: 7 from the law, 2 AEAT criteria, 2 BeeL. rules. [How to read a rule](/rules#how-to-read-a-rule). ## SIM-001 · A simplified invoice never exceeds 3,000 € `Required` · AEAT criterion · Impact: critical · Checked by the API: a request that breaks it is rejected with the error codes listed. Do not issue a simplified invoice whose total, VAT included, is above 3,000 €. Above it, issue a standard invoice (F1) with the customer identified. **Why:** The law allows a simplified invoice up to that amount only for the operations of art. 4.2, or in other cases AEAT authorises (art. 4.3), and AEAT's validations reject an F2 record above it unless it carries a billing agreement. **Applies to:** invoice types `SIMPLIFIED`; operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`PATCH /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/patchCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice) **Error codes:** [`SIMPLIFIED_INVOICE_EXCEEDS_LEGAL_LIMIT`](/errors/SIMPLIFIED_INVOICE_EXCEEDS_LEGAL_LIMIT) (`400`) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 4.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a4) > «los empresarios o profesionales podrán igualmente expedir factura simplificada y copia de ésta cuando su importe no exceda de 3.000 euros, Impuesto sobre el Valor Añadido incluido, en las operaciones que se describen a continuación: a) Ventas al por menor» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.8 — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Cuando TipoFactura sea “F2”, se validará que Ʃ (BaseImponibleOimporteNoSujeto + CuotaRepercutida) de todas las líneas de detalle no sea superior a 3.000,00 euros. [...] Esta validación no se aplicará cuando exista acuerdo de facturación» - RD 1619/2012 (Reglamento de facturación), art. 4.3 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a4) > «El Departamento de Gestión Tributaria de la Agencia Estatal de Administración Tributaria podrá autorizar la expedición de facturas simplificadas, en supuestos distintos de los señalados en los apartados anteriores» **Incorrect:** A simplified invoice with one line of 2,600 € at 21 % VAT: it totals 3,146 € and the API answers [`SIMPLIFIED_INVOICE_EXCEEDS_LEGAL_LIMIT`](/errors/SIMPLIFIED_INVOICE_EXCEEDS_LEGAL_LIMIT). **Correct:** The same sale as a standard invoice, with the customer's NIF or `alternative_id`. **Related:** [SIM-002 · Above 400 €, a simplified invoice needs an art. 4.2 activity](/rules/simplified#sim-002) · [SIM-006 · An identified customer gets a standard invoice (F1)](/rules/simplified#sim-006) **Explained in:** [Simplified vs standard (F1 vs F2) › The decision in one table](/verifactu/simplified-vs-standard#the-decision-in-one-table) · [Simplified vs standard (F1 vs F2) › On the F2 path](/verifactu/simplified-vs-standard#on-the-f2-path) ## SIM-002 · Above 400 €, a simplified invoice needs an art. 4.2 activity `Required` · Law · Impact: high · Responsibility: the issuing business. Do not issue a simplified invoice above 400 €, VAT included, unless the operation is one of those listed in art. 4.2 (retail sales, hospitality, passenger transport and the rest of the list) or the invoice is a corrective. On payments collected through a payment connection, the connection's simplified threshold is the issuer's declaration: raising it above 400 € states that its activity is one of those listed in art. 4.2. **Why:** Outside art. 4.2 the law only allows a simplified invoice up to that amount; above it the operation needed a full invoice. **Applies to:** invoice types `SIMPLIFIED` **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 4.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a4) > «La obligación de expedir factura podrá ser cumplida mediante la expedición de factura simplificada y copia de esta en cualquiera de los siguientes supuestos: a) Cuando su importe no exceda de 400 euros, Impuesto sobre el Valor Añadido incluido, o b) cuando deba expedirse una factura rectificativa.» - RD 1619/2012 (Reglamento de facturación), art. 4.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a4) > «Sin perjuicio de lo dispuesto en el apartado anterior, los empresarios o profesionales podrán igualmente expedir factura simplificada y copia de ésta cuando su importe no exceda de 3.000 euros, Impuesto sobre el Valor Añadido incluido, en las operaciones que se describen a continuación:» **Incorrect:** A consultancy issuing a 900 € simplified invoice to a private client. **Correct:** A restaurant issuing a 900 € simplified invoice for a group dinner: hospitality is in the art. 4.2 list. **Related:** [SIM-001 · A simplified invoice never exceeds 3,000 €](/rules/simplified#sim-001) · [SIM-009 · A customer who asks to be identified gets an invoice that identifies it](/rules/simplified#sim-009) **Explained in:** [Simplified vs standard (F1 vs F2) › The decision in one table](/verifactu/simplified-vs-standard#the-decision-in-one-table) ## SIM-003 · Some operations can never go on a simplified invoice `Required` · Law · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. Do not document on a simplified invoice the operations of art. 4.4: intra-EU supplies of goods exempt under art. 25 LIVA and operations not located in Spain (`NO_SUJETA_LOCALIZACION`), whether the customer is a business in another Member State or anyone outside the EU. The API checks it when the invoice is created, when a draft is edited (also when only its type changes) and when it is issued. A corrective of a simplified invoice (`R5`), checked when it is created and issued, may correct such an operation that the simplified invoice already carried, but cannot add a new one. Reverse-charge lines cannot go on a simplified invoice or on its corrective (`R5`) either: AEAT only accepts a reverse-charge operation (`S2`) on invoice types F1, F3, R1, R2, R3 and R4. Equivalence surcharge and IRPF withholding on a simplified invoice are a separate rule of BeeL. ([SIM-011](/rules/simplified#sim-011)). **Why:** The law excludes these operations from the simplified invoice, and AEAT does not accept a reverse-charge operation on one: they need an identified recipient, whether to exempt the operation or to shift the tax to the customer. **Applies to:** invoice types `SIMPLIFIED`, `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`PATCH /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/patchCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice) **Error codes:** [`SIMPLIFICADA_FORBIDS_CROSS_BORDER`](/errors/SIMPLIFICADA_FORBIDS_CROSS_BORDER) (`400`), [`SIMPLIFICADA_FORBIDS_ISP`](/errors/SIMPLIFICADA_FORBIDS_ISP) (`400`) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 4.4.a) y d) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a4) > «No podrá expedirse factura simplificada por las siguientes operaciones: a) Las entregas de bienes destinados a otro Estado miembro a que se refiere el artículo 25 de la Ley del Impuesto. [...] d) Las entregas de bienes o prestaciones de servicios a que se refiere el artículo 2.3.b) b').» - RD 1619/2012 (Reglamento de facturación), art. 2.3.b) b') — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a2) > «El proveedor o prestador esté establecido en el territorio de aplicación del Impuesto [...] y dicha entrega o prestación, conforme a las reglas de localización aplicables a las mismas, no se entienda realizada en el territorio de aplicación del Impuesto, en los siguientes supuestos: a'') Cuando la operación esté sujeta en otro Estado miembro, el sujeto pasivo del Impuesto sea el destinatario para quien se realice la operación [...] b'') Cuando la operación se entienda realizada fuera de la Comunidad.» - AEAT, Lista de códigos de error VERI*FACTU, código 1197 — [source](https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tikeV1.0/cont/ws/errores.properties) > «Si CalificacionOperacion tiene valor Operación Sujeta y No exenta - Con inversión del sujeto pasivo (S2) TipoFactura solo puede ser F1, F3, R1, R2, R3 y R4.» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.4 CalificacionOperacion — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Si CalificacionOperacion es “S2”, TipoFactura solo puede ser “F1”, “F3”, “R1”, “R2”, “R3” y “R4”.» - AEAT, Preguntas frecuentes SIF y VERI*FACTU, R5 — [source](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/procedimientos-facturacion.html) > «La rectificación de una factura simplificada se registrará con la clave R5 cualquiera que sea el motivo de la misma.» **Incorrect:** A simplified invoice for a service to a consumer in the United States, with its line `NO_SUJETA_LOCALIZACION`: the API answers [`SIMPLIFICADA_FORBIDS_CROSS_BORDER`](/errors/SIMPLIFICADA_FORBIDS_CROSS_BORDER), also if a standard draft with that line is switched to `SIMPLIFIED` and issued. **Correct:** A standard invoice identifying the customer, with the line `NO_SUJETA_LOCALIZACION`. **Related:** [SIM-006 · An identified customer gets a standard invoice (F1)](/rules/simplified#sim-006) · [SIM-011 · No equivalence surcharge or IRPF withholding on a simplified invoice](/rules/simplified#sim-011) · [TAX-004 · Intra-EU supplies of goods are exempt only with the buyer's EU VAT number](/rules/taxes#tax-004) · [TAX-003 · Reverse-charge lines carry no tax and never go on a simplified invoice](/rules/taxes#tax-003) · [TAX-006 · Services to a business abroad are not subject to Spanish VAT](/rules/taxes#tax-006) **Explained in:** [Simplified vs standard (F1 vs F2) › Operations where F2 is not allowed](/verifactu/simplified-vs-standard#operations-where-f2-is-not-allowed) ## SIM-004 · A simplified invoice still carries its minimum contents `Required` · Law · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed. A simplified invoice carries its number and series, issue date, the operation date when different, the issuer's NIF and name, what was sold, the tax rate and the total. BeeL. fills in the issuer's data from the company profile; each line needs a description and its main tax. **Why:** Simplified does not mean empty: without these details the ticket is not a valid invoice. **Applies to:** invoice types `SIMPLIFIED`; operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice) **Error codes:** [`LINE_NORMAL_DESCRIPTION_REQUIRED`](/errors/LINE_NORMAL_DESCRIPTION_REQUIRED), [`LINE_MAIN_TAX_REQUIRED`](/errors/LINE_MAIN_TAX_REQUIRED), [`EMISSION_NOT_READY`](/errors/EMISSION_NOT_READY) (`422`), [`PROFILE_INCOMPLETE`](/errors/PROFILE_INCOMPLETE) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 7.1.d)–g) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a7) > «d) Número de Identificación Fiscal, así como el nombre y apellidos, razón o denominación social completa del obligado a su expedición. e) La identificación del tipo de bienes entregados o de servicios prestados. f) Tipo impositivo aplicado y, opcionalmente, también la expresión «IVA incluido». [...] g) Contraprestación total.» **Incorrect:** A simplified invoice whose only line has no description: the API answers [`LINE_NORMAL_DESCRIPTION_REQUIRED`](/errors/LINE_NORMAL_DESCRIPTION_REQUIRED). **Correct:** The same line with a description of what was sold and its VAT rate. **Related:** [SIM-008 · A simplified invoice carries the same legal mentions as a full one](/rules/simplified#sim-008) · [NUM-005 · Simplified invoices are numbered in their own series](/rules/numbering#num-005) · [SIM-010 · A simplified invoice with several VAT rates shows the base of each](/rules/simplified#sim-010) **Explained in:** [Simplified vs standard (F1 vs F2) › On the F2 path](/verifactu/simplified-vs-standard#on-the-f2-path) ## SIM-005 · The record of a simplified invoice carries no recipient `Required` · AEAT criterion · Impact: low · Checked by the API: BeeL. applies it. The billing record of a simplified invoice (F2) or of its corrective (R5) carries no recipient, while F1 and R1–R4 records carry at least one. BeeL. never sends recipient data in an F2 or R5 record. **Why:** AEAT rejects an F2 or R5 record with recipients, and an F1 without them. **Applies to:** invoice types `SIMPLIFIED`, `CORRECTIVE`; VeriFactu enabled; F2 and R5 records. **Legal basis:** - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.13 Agrupación Destinatarios — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Si TipoFactura es “F1”, “F3”, “R1”, “R2”, “R3” o “R4”, la agrupación Destinatarios tiene que estar cumplimentada, con al menos un destinatario. - Si TipoFactura es “F2” o “R5”, la agrupación Destinatarios no puede estar cumplimentada.» **Incorrect:** Expecting the customer's name on a simplified invoice to reach AEAT. **Correct:** Issuing a standard invoice when the customer has to be identified to AEAT. **Related:** [SIM-006 · An identified customer gets a standard invoice (F1)](/rules/simplified#sim-006) · [REC-001 · Each issued invoice gets a billing record built from its data](/rules/records#rec-001) **Explained in:** [Simplified vs standard (F1 vs F2) › On the F2 path](/verifactu/simplified-vs-standard#on-the-f2-path) · [What AEAT receives from your invoice](/verifactu/what-aeat-receives) ## SIM-006 · An identified customer gets a standard invoice (F1) `Required` · BeeL. rule · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. Issue an invoice that identifies its recipient as a standard invoice (F1). BeeL. requires it: a `SIMPLIFIED` invoice whose `recipient` carries an `nif` or `alternative_id` is rejected with `SIMPLIFIED_INVOICE_FORBIDS_IDENTIFIED_RECIPIENT` when it is created, when an edit changes its type or recipient, and when it is issued. A simplified invoice BeeL. generates from a payment never carries the payer's tax id. **Why:** The law would allow a simplified invoice completed with the recipient's details ([SIM-009](/rules/simplified#sim-009)), but the billing record of a simplified invoice (F2) carries no recipient ([SIM-005](/rules/simplified#sim-005)): the NIF would be on the invoice and never reach AEAT. BeeL. issues that case as a standard invoice, so the invoice type and the record agree. **Applies to:** invoice types `SIMPLIFIED`, `STANDARD`; operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`PATCH /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/patchCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice), [`PATCH /v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}`](/recurring-invoices/patchCompanyRecurringInvoice) **Error codes:** [`SIMPLIFIED_INVOICE_FORBIDS_IDENTIFIED_RECIPIENT`](/errors/SIMPLIFIED_INVOICE_FORBIDS_IDENTIFIED_RECIPIENT) (`422`) **Incorrect:** A simplified invoice whose `recipient` carries the customer's `nif`: the API answers `422` `SIMPLIFIED_INVOICE_FORBIDS_IDENTIFIED_RECIPIENT`. **Correct:** A standard invoice with the customer's NIF, name and address, whatever the amount. **Related:** [SIM-005 · The record of a simplified invoice carries no recipient](/rules/simplified#sim-005) · [SIM-009 · A customer who asks to be identified gets an invoice that identifies it](/rules/simplified#sim-009) · [CNT-005 · A full invoice identifies the recipient by NIF](/rules/contents#cnt-005) **Explained in:** [Simplified vs standard (F1 vs F2) › On the F2 path](/verifactu/simplified-vs-standard#on-the-f2-path) · [Simplified vs standard (F1 vs F2) › On the F1 path](/verifactu/simplified-vs-standard#on-the-f1-path) ## SIM-007 · Exchanging a simplified invoice for a full one `Required` · Law · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed. An invoice issued in exchange for earlier simplified invoices is not a corrective. Issue it with the exchange operation: it issues a standard invoice with the lines of the simplified invoices and the identified recipient, lists them in `replaced_invoice_ids`, and leaves each simplified invoice `VOIDED` with `void_cause` `EXCHANGED`, in the same act. The PDF of the exchange invoice names the simplified invoices it replaces, with number and issue date. Under VERI*FACTU it is recorded as F3 identifying each replaced simplified invoice by number and issue date; the simplified invoices keep their record and are not cancelled. Only issued simplified invoices that were not voided, exchanged or corrected can be exchanged (`EXCHANGE_REQUIRES_SIMPLIFIED`, `SIMPLIFIED_NOT_EXCHANGEABLE`), each listed once (`EXCHANGE_DUPLICATED_SIMPLIFIED`), and under VERI*FACTU only once AEAT has accepted each one's record: one issued without VERI*FACTU fails with `SIMPLIFIED_EXCHANGE_NOT_RECORDABLE`, one whose record is still pending with `EXCHANGE_SIMPLIFIED_NOT_YET_ACCEPTED` (wait and retry), and one whose record was rejected with `EXCHANGE_SIMPLIFIED_RECORD_REJECTED` until it is fixed or resubmitted. The exchange invoice is not voided (`EXCHANGE_INVOICE_NOT_VOIDABLE`) and, when it is recorded in VERI*FACTU, while how to correct it is decided, not corrected either (`EXCHANGE_INVOICE_NOT_CORRECTABLE`). Without VERI*FACTU a Stripe refund of a payment whose simplified invoice was exchanged corrects the exchange invoice; if that invoice replaces several payments the correction is partial, and if it also has several tax groups the refund is left as an incident to correct by hand. Do not cancel the simplified invoice with an `R5` corrective to issue a new invoice: nothing is being rectified, so it is not a corrective. **Why:** The exchange documents the same sale again with the customer identified. It replaces the simplified invoice instead of crediting it, so the sale counts once; a corrective would state a rectification that did not happen. AEAT's F3 key is for invoices replacing simplified invoices already issued and recorded, so an F3 cannot point at a simplified invoice AEAT does not have. **Applies to:** invoice types `SIMPLIFIED`, `STANDARD`; operations [`POST /v1/companies/{company_id}/invoices/simplified-exchanges`](/invoices/createCompanySimplifiedExchange) **Error codes:** [`EXCHANGE_REQUIRES_SIMPLIFIED`](/errors/EXCHANGE_REQUIRES_SIMPLIFIED) (`422`), [`SIMPLIFIED_NOT_EXCHANGEABLE`](/errors/SIMPLIFIED_NOT_EXCHANGEABLE) (`422`), [`EXCHANGE_DUPLICATED_SIMPLIFIED`](/errors/EXCHANGE_DUPLICATED_SIMPLIFIED) (`422`), [`EXCHANGE_INVOICE_NOT_VOIDABLE`](/errors/EXCHANGE_INVOICE_NOT_VOIDABLE) (`422`), [`SIMPLIFIED_EXCHANGE_NOT_RECORDABLE`](/errors/SIMPLIFIED_EXCHANGE_NOT_RECORDABLE) (`422`), [`EXCHANGE_SIMPLIFIED_RECORD_REJECTED`](/errors/EXCHANGE_SIMPLIFIED_RECORD_REJECTED) (`422`), [`EXCHANGE_SIMPLIFIED_NOT_YET_ACCEPTED`](/errors/EXCHANGE_SIMPLIFIED_NOT_YET_ACCEPTED) (`422`), [`EXCHANGE_INVOICE_NOT_CORRECTABLE`](/errors/EXCHANGE_INVOICE_NOT_CORRECTABLE) (`422`) **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 15.6 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a15) > «No obstante, las facturas que se expidan en sustitución o canje de facturas simplificadas expedidas con anterioridad no tendrán la condición de rectificativas, siempre que las facturas simplificadas expedidas en su día cumpliesen los requisitos establecidos en el artículo 7.1.» - AEAT, Preguntas frecuentes SIF y VERI*FACTU, Procedimientos de facturación: factura en sustitución de simplificadas — [source](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/procedimientos-facturacion.html) > «Se deberá informar en el bloque “Tipo Factura” con la clave “F3: factura emitida en sustitución de facturas simplificadas facturadas y declaradas” y en el bloque de “Datos sustituidas” se identificarán las facturas simplificadas sustituidas con el número, serie y fecha de expedición.» **Incorrect:** Cancelling the simplified invoice with an `R5` `TOTAL` corrective and issuing a new standard invoice: it states a rectification that did not happen. **Correct:** Exchanging the simplified invoice for a standard invoice to the customer. ```http POST /v1/companies/{company_id}/invoices/simplified-exchanges { "simplified_invoice_ids": ["550e8400-e29b-41d4-a716-446655440010"], "recipient": { "customer_id": "8f1e2a3b-4c5d-6e7f-8091-a2b3c4d5e6f7" } } ``` **Related:** [SIM-009 · A customer who asks to be identified gets an invoice that identifies it](/rules/simplified#sim-009) · [COR-002 · Pick the reason code: R1–R4 for standard invoices, R5 for simplified](/rules/corrective#cor-002) · [COR-013 · A corrective is only for the causes the law lists](/rules/corrective#cor-013) **Explained in:** [Simplified vs standard (F1 vs F2) › Exchanging simplified invoices for a full invoice](/verifactu/simplified-vs-standard#upgrading-an-f2-to-f1-the-canje-case) ## SIM-008 · A simplified invoice carries the same legal mentions as a full one `Required` · Law · Impact: low · Responsibility: the issuing business. When they apply, a simplified invoice carries the same mentions as a full invoice: the exemption, the special regime or the other mentions of art. 6.1 j) to p). **Why:** The mention is what tells the reader why the invoice charges no tax or follows a special regime; a ticket is not exempt from it. **Applies to:** invoice types `SIMPLIFIED` **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 7.1.i) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a7) > «En los supuestos a que se refieren las letras j) a p) del artículo 6.1 de este Reglamento, deberá hacerse constar las menciones referidas en las mismas.» **Incorrect:** A ticket for an exempt service that states neither the exemption nor its legal basis. **Correct:** The same ticket stating that the service is exempt and the article that exempts it. **Related:** [SIM-004 · A simplified invoice still carries its minimum contents](/rules/simplified#sim-004) · [CNT-010 · An exempt operation states why it is exempt](/rules/contents#cnt-010) ## SIM-009 · A customer who asks to be identified gets an invoice that identifies it `Required` · Law · Impact: medium · Responsibility: the issuing business. When the recipient is a business acting as such and asks for it, or needs it to exercise a tax right, the invoice shows the recipient's NIF and address and the tax separately, even if you would otherwise hand out a simplified invoice without those details. A simplified invoice completed with them is valid, and AEAT registers it as F1. **Why:** Without the recipient's details and the tax shown apart, the recipient cannot deduct the VAT. **Applies to:** invoice types `STANDARD`, `SIMPLIFIED` **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 2.2.a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a2-2) > «Aquellas en las que el destinatario sea un empresario o profesional que actúe como tal, con independencia del régimen de tributación al que se encuentre acogido el empresario o profesional que realice la operación, así como cualesquiera otras en las que el destinatario así lo exija para el ejercicio de cualquier derecho de naturaleza tributaria.» - RD 1619/2012 (Reglamento de facturación), art. 7.2 y 7.3 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a7) > «cuando el destinatario de la operación sea un empresario o profesional y así lo exija, el expedidor de la factura simplificada deberá hacer constar, además, los siguientes datos: [...] 3. También deberán hacerse constar los datos referidos en el apartado anterior, cuando el destinatario de la operación no sea un empresario o profesional y así lo exija para el ejercicio de cualquier derecho de naturaleza tributaria.» - AEAT, Preguntas frecuentes SIF y VERI*FACTU, Procedimientos de facturación: Tipo de facturas — [source](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/procedimientos-facturacion.html) > «Se registran con la clave F1: [...] Las facturas simplificadas cualificadas reguladas en los artículos 7.2 y 7.3 del Reglamento por el que se regulan las obligaciones de facturación» **Incorrect:** Refusing a company its NIF and address on the invoice because the till only prints tickets. **Correct:** Issuing an invoice with the company's NIF and address (in BeeL., a standard invoice), or exchanging the ticket for one. **Related:** [SIM-006 · An identified customer gets a standard invoice (F1)](/rules/simplified#sim-006) · [SIM-007 · Exchanging a simplified invoice for a full one](/rules/simplified#sim-007) · [CNT-002 · A business customer always gets an invoice, identifying it when asked](/rules/contents#cnt-002) **Explained in:** [Simplified vs standard (F1 vs F2) › Exchanging simplified invoices for a full invoice](/verifactu/simplified-vs-standard#upgrading-an-f2-to-f1-the-canje-case) ## SIM-010 · A simplified invoice with several VAT rates shows the base of each `Required` · Law · Impact: low · Responsibility: your integration. When a simplified invoice covers operations at different VAT rates, it shows the taxable base of each rate separately, besides the rate applied. Give each line its own `main_tax`. **Why:** With several rates, the total alone does not say how much was taxed at each one. **Applies to:** invoice types `SIMPLIFIED`; Simplified invoices with lines at different VAT rates. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 7.1.f) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a7) > «Asimismo, cuando una misma factura comprenda operaciones sujetas a diferentes tipos impositivos del Impuesto sobre el Valor Añadido deberá especificarse por separado, además, la parte de base imponible correspondiente a cada una de las operaciones.» **Incorrect:** A ticket for food at 10 % and drinks at 21 % sent as one line at a blended rate. **Correct:** The same ticket as two lines, each with its own rate, so the base of each rate is shown. **Related:** [SIM-004 · A simplified invoice still carries its minimum contents](/rules/simplified#sim-004) · [CNT-009 · The base is broken down by rate and by kind of operation](/rules/contents#cnt-009) ## SIM-011 · No equivalence surcharge or IRPF withholding on a simplified invoice `Required` · BeeL. rule · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed. BeeL. does not accept equivalence surcharge or IRPF withholding on a simplified invoice or on its corrective (`R5`): the API answers [`SIMPLIFICADA_FORBIDS_SURCHARGE`](/errors/SIMPLIFICADA_FORBIDS_SURCHARGE) or [`SIMPLIFICADA_FORBIDS_IRPF`](/errors/SIMPLIFICADA_FORBIDS_IRPF) when the invoice is created, when a draft is edited and when it is issued. Issue a standard invoice identifying the recipient instead. **Why:** It is a rule of BeeL., not of the law. The surcharge is charged to a retailer under that regime and the withholding is made by the customer who pays, so both belong to a customer the invoice identifies, and the billing record of a simplified invoice (F2) carries no recipient ([SIM-005](/rules/simplified#sim-005)). BeeL. issues those sales as standard invoices. **Applies to:** invoice types `SIMPLIFIED`, `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`PATCH /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/patchCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice) **Error codes:** [`SIMPLIFICADA_FORBIDS_SURCHARGE`](/errors/SIMPLIFICADA_FORBIDS_SURCHARGE) (`400`), [`SIMPLIFICADA_FORBIDS_IRPF`](/errors/SIMPLIFICADA_FORBIDS_IRPF) (`422`) **Incorrect:** A simplified invoice whose line carries `irpf_rate` 15: the API answers `422` [`SIMPLIFICADA_FORBIDS_IRPF`](/errors/SIMPLIFICADA_FORBIDS_IRPF). **Correct:** A standard invoice identifying the customer, with the withholding or the surcharge on its lines. **Related:** [SIM-003 · Some operations can never go on a simplified invoice](/rules/simplified#sim-003) · [SIM-005 · The record of a simplified invoice carries no recipient](/rules/simplified#sim-005) · [SIM-006 · An identified customer gets a standard invoice (F1)](/rules/simplified#sim-006) · [SUR-001 · The surcharge rate matches the VAT rate of its line](/rules/surcharge#sur-001) · [TAX-010 · Set the IRPF withholding when the customer must withhold](/rules/taxes#tax-010) **Explained in:** [Simplified vs standard (F1 vs F2) › Why no IRPF on F2](/verifactu/simplified-vs-standard#why-no-irpf-on-f2) [← All rules](/rules#all-rules) ## Related - [Simplified vs standard (F1 vs F2)](/verifactu/simplified-vs-standard) — when BeeL. issues a simplified invoice (F2) or a standard invoice (F1), the rules of the RD 1619/2012 behind them, and what BeeL. enforces at the API boundary - [What AEAT receives from your invoice](/verifactu/what-aeat-receives) — how BeeL. turns your invoice into the record AEAT registers — the description, the total, the number, the recipient and the late-submission flag — and why some of them differ from what you see on the invoice --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Equivalence surcharge When a supply to a retailer carries the equivalence surcharge (*recargo de equivalencia*), at which rate, and on which invoice. [← All rules](/rules#all-rules) Retailers under the equivalence surcharge regime do not file VAT returns for those sales: their supplier charges the surcharge on top of VAT. These rules cover the rate on each line and how those supplies are invoiced. 2 rules: 2 from the law. [How to read a rule](/rules#how-to-read-a-rule). ## SUR-001 · The surcharge rate matches the VAT rate of its line `Required` · Law · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed. A line sold to a retailer under the surcharge regime carries the surcharge rate the law pairs with that line's VAT rate, under regime key `18`: 5.2 or 1.75 (tobacco products) with 21 %, 1.4 with 10 %, 0.5 with 4 %, and the temporary pairs only on operations of their period: 0.5 with 5 % up to 31 December 2022, 0.62 with 5 % from 1 January 2023 to 30 September 2024, and 1 with 7.5 % and 0.26 with 2 % from 1 October to 31 December 2024. `GET /v1/tax-types` publishes every pair with its period. The former 0.625 is no longer accepted; an invoice issued with it is declared at 0.62. A draft saved with 0.625 is not issued as it stands: the API answers [`SURCHARGE_RATE_REQUIRES_RECALCULATION`](/errors/SURCHARGE_RATE_REQUIRES_RECALCULATION), and updating the draft recalculates the line at 0.62. BeeL. sets regime `18` on an IVA line that carries a surcharge and the general regime `01` on an IVA line under `18` that carries none. Add the surcharge only when the buyer has told you they are under the regime. **Why:** A surcharge that does not match the VAT rate charges the wrong tax, and AEAT does not accept the pair in the record. A surcharge under any other regime key is rejected. **Applies to:** invoice types `STANDARD`, `CORRECTIVE`; Supplies of goods to a retailer under the equivalence surcharge regime (regime key `18`). **Error codes:** [`INVALID_IVA_SURCHARGE_PAIR`](/errors/INVALID_IVA_SURCHARGE_PAIR) (`422`), [`SURCHARGE_REQUIRES_REGIME`](/errors/SURCHARGE_REQUIRES_REGIME) (`422`), [`REGIME_REQUIRES_SURCHARGE`](/errors/REGIME_REQUIRES_SURCHARGE) (`422`), [`SURCHARGE_RATE_NOT_ACCEPTED_ON_DATE`](/errors/SURCHARGE_RATE_NOT_ACCEPTED_ON_DATE) (`422`), [`SURCHARGE_RATE_REQUIRES_RECALCULATION`](/errors/SURCHARGE_RATE_REQUIRES_RECALCULATION) (`422`) **Legal basis:** - Ley 37/1992 del IVA, art. 161 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a161) > «Los tipos del recargo de equivalencia serán los siguientes: 1.º Con carácter general, el 5,2 por ciento. 2.º Para las entregas de bienes a las que resulte aplicable el tipo impositivo establecido en el artículo 91, apartado uno de esta Ley, el 1,4 por ciento. 3.º Para las entregas de bienes a las que sea aplicable el tipo impositivo previsto en el artículo 91, apartado dos de esta Ley, el 0,50 por ciento. 4.º Para las entregas de bienes objeto del Impuesto Especial sobre las Labores del Tabaco, el 1,75 por ciento.» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.3 TipoRecargoEquivalencia — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Si TipoImpositivo es 21 sólo se admitirán TipoRecargoEquivalencia = 5,2 ó 1,75. - Si TipoImpositivo es 10 sólo se admitirá TipoRecargoEquivalencia = 1,4.» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.3 TipoRecargoEquivalencia — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Si FechaOperacion (FechaExpedicionFactura de la agrupación IDFactura si no se informa FechaOperacion) es mayor o igual que 1 de enero de 2023 y menor o igual que 30 de septiembre de 2024, solo se admitirá TipoRecargoEquivalencia = 0,62.» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.3 TipoRecargoEquivalencia — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Si FechaOperacion (FechaExpedicionFactura de la agrupación IDFactura si no se informa FechaOperacion) es igual o inferior al 31 de diciembre de 2022, solo se admitirá TipoRecargoEquivalencia = 0,5.» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.3 TipoRecargoEquivalencia — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Si TipoImpositivo es 7,5 sólo se admitirá TipoRecargoEquivalencia = 1.» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.3 TipoRecargoEquivalencia — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Si TipoImpositivo es 2 sólo se admitirá TipoRecargoEquivalencia = 0,26.» - Real Decreto-ley 1/2023, disposición adicional decimosexta — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2023-625#da-16) > «Con efectos desde el 1 de enero de 2023, el tipo del recargo de equivalencia aplicable en el Impuesto sobre el Valor Añadido a las operaciones a que se refieren el apartado 2 del artículo 1 y el párrafo cuarto del apartado 1 del artículo 72 del Real Decreto-ley 20/2022, de 27 de diciembre, de medidas de respuesta a las consecuencias económicas y sociales de la Guerra de Ucrania y de apoyo a la reconstrucción de la isla de La Palma y a otras situaciones de vulnerabilidad, será del 0,62 por ciento» - AEAT, Nota informativa sobre los nuevos tipos de recargo de equivalencia en el IVA, Suministro inmediato de información — [source](https://sede.agenciatributaria.gob.es/Sede/iva/novedades-iva/novedades-normativa-2023/nota-informativa-nuevos-tipos-recargo-iva.html) > «En el caso de que se haya emitido una factura con recargo del 0,625%, independientemente de la factura rectificativa que proceda (emitida por sustitución o por diferencias), se podrá remitir un único registro de facturación con el tipo de recargo del 0,62%.» **Incorrect:** A 10 % line with the 5.2 surcharge: the API answers [`INVALID_IVA_SURCHARGE_PAIR`](/errors/INVALID_IVA_SURCHARGE_PAIR). **Correct:** A 21 % line with its 5.2 surcharge under regime `18`. ```json { "description": "Kitchen utensils (resale)", "quantity": 10, "unit_price": 12, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "18" }, "equivalence_surcharge_rate": 5.2 } ``` **Related:** [SUR-002 · Supplies with the surcharge go on separate invoices](/rules/surcharge#sur-002) · [TAX-003 · Reverse-charge lines carry no tax and never go on a simplified invoice](/rules/taxes#tax-003) **Explained in:** [Equivalence surcharge (recargo de equivalencia) › Accepted surcharge values](/verifactu/equivalence-surcharge#accepted-surcharge-values) · [Equivalence surcharge (recargo de equivalencia) › When you add the surcharge](/verifactu/equivalence-surcharge#when-you-add-the-surcharge) ## SUR-002 · Supplies with the surcharge go on separate invoices `Required` · Law · Impact: low · Responsibility: the issuing business. Document the supplies that carry the equivalence surcharge on their own invoices, stating the surcharge rate and amount. **Why:** The law requires separate invoices for these supplies; an invoice that mixes them does not meet the invoicing obligations. **Applies to:** invoice types `STANDARD`, `CORRECTIVE`; Supplies of goods on which the equivalence surcharge is charged. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 16.4 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a16) > «Los empresarios o profesionales que efectúen entregas de bienes en las que deba repercutirse el recargo de equivalencia deberán, en todo caso, expedir facturas separadas para documentar dichas entregas, consignando en ellas el tipo del recargo que se haya aplicado y su importe.» **Incorrect:** One invoice to a retailer with goods for resale under the surcharge and a repair service without it. **Correct:** Two invoices: one for the goods with the surcharge, one for the service. **Related:** [SUR-001 · The surcharge rate matches the VAT rate of its line](/rules/surcharge#sur-001) **Explained in:** [Equivalence surcharge (recargo de equivalencia) › The surcharge is per-line, not per-invoice](/verifactu/equivalence-surcharge#the-surcharge-is-per-line-not-per-invoice) [← All rules](/rules#all-rules) ## Related - [Equivalence surcharge (recargo de equivalencia)](/verifactu/equivalence-surcharge) — when to add `equivalence_surcharge_rate` on B2B lines, the surcharge values BeeL. accepts and their periods, and how the line is sent to AEAT --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Taxes and exemptions How each line is taxed: VAT rates, reverse charge, exempt and non-subject operations, OSS, disbursements, IRPF and the currency amounts are expressed in. [← All rules](/rules#all-rules) Every line carries its own tax treatment, and AEAT receives it line by line. These rules say which rate or classification a line needs and which ones BeeL. rejects before the invoice is issued. 21 rules: 10 from the law, 9 AEAT criteria, 2 BeeL. rules. [How to read a rule](/rules#how-to-read-a-rule). ## TAX-001 · Apply the VAT rate in force when the operation took place `Required` · Law · Impact: high · Responsibility: the issuing business. Each taxed line carries the VAT rate that applied on the date the operation accrued, not the one in force on the day you issue. **Why:** A rate that was not in force at accrual charges the wrong tax, and the invoice then has to be corrected. **Applies to:** operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`PATCH /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/patchCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice); Lines taxed with IVA (`main_tax.type: IVA`). **Legal basis:** - Ley 37/1992 del IVA, art. 90.Dos — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a90) > «Dos. El tipo impositivo aplicable a cada operación será el vigente en el momento del devengo.» **Incorrect:** Invoicing in October a supply that accrued in June at the rate that applies in October, because it is the one in force on the issue date. **Correct:** Sending `operation_date` with the June date and the rate that applied in June on each line. ```json { "operation_date": "2026-06-18", "lines": [{ "description": "Supply", "quantity": 1, "unit_price": 100, "main_tax": { "type": "IVA", "percentage": 21 } }] } ``` **Related:** [DAT-004 · Send the operation date when it differs from the issue date](/rules/dates#dat-004) · [TAX-014 · Only the VAT rates AEAT accepts on the operation date](/rules/taxes#tax-014) · [TAX-005 · Exempt and non-subject lines carry no VAT rate](/rules/taxes#tax-005) **Explained in:** [Tax classification per line › Allowed main_tax.percentage values](/verifactu/tax-classification#allowed-main_taxpercentage-values) ## TAX-002 · Reverse-charge operations are invoiced without charging VAT `Required` · Law · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. When the recipient is the one liable for the VAT, the line does not charge VAT: classify it as reverse charge with the `exemption_reason` of its case of art. 84.Uno.2.º LIVA, `ISP_ART_84_2_A` to `ISP_ART_84_2_F`. The invoice carries the mention «inversión del sujeto pasivo». Case g) (silver, platinum and palladium, mobile phones, consoles, laptops and tablets) must be documented in a special series and is rejected with [`REVERSE_CHARGE_CASE_NOT_SUPPORTED`](/errors/REVERSE_CHARGE_CASE_NOT_SUPPORTED). Deciding that an operation falls under reverse charge is the issuer's call. **Why:** Charging VAT on a reverse-charge operation makes both parties declare it: the issuer collects a tax it does not owe and the recipient self-assesses it again. **Applies to:** invoice types `STANDARD`, `CORRECTIVE`; Operations where the recipient is the taxpayer (inversión del sujeto pasivo). **Error codes:** [`REVERSE_CHARGE_CASE_NOT_SUPPORTED`](/errors/REVERSE_CHARGE_CASE_NOT_SUPPORTED) (`422`) **Legal basis:** - Ley 37/1992 del IVA, art. 84.Uno.2.º a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a84) > «Los empresarios o profesionales para quienes se realicen las operaciones sujetas al Impuesto en los supuestos que se indican a continuación: a) Cuando las mismas se efectúen por personas o entidades no establecidas en el territorio de aplicación del Impuesto.» - Ley 37/1992 del IVA, art. 84.Uno.2.º b) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a84) > «b) Cuando se trate de entregas de oro sin elaborar o de productos semielaborados de oro, de ley igual o superior a 325 milésimas.» - Ley 37/1992 del IVA, art. 84.Uno.2.º c) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a84) > «c) Cuando se trate de:» - Ley 37/1992 del IVA, art. 84.Uno.2.º c) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a84) > «– Entregas de desechos nuevos de la industria, desperdicios y desechos de fundición, residuos y demás materiales de recuperación constituidos por metales férricos y no férricos, sus aleaciones, escorias, cenizas y residuos de la industria que contengan metales o sus aleaciones.» - Ley 37/1992 del IVA, art. 84.Uno.2.º c) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a84) > «– Las operaciones de selección, corte, fragmentación y prensado que se efectúen sobre los productos citados en el guion anterior.» - Ley 37/1992 del IVA, art. 84.Uno.2.º c) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a84) > «– Entregas de desechos, desperdicios o recortes de plástico.» - Ley 37/1992 del IVA, art. 84.Uno.2.º c) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a84) > «– Entregas de desperdicios o desechos de papel, cartón o vidrio.» - Ley 37/1992 del IVA, art. 84.Uno.2.º c) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a84) > «– Entregas de desperdicios o artículos inservibles de trapos, cordeles, cuerdas o cordajes.» - Ley 37/1992 del IVA, art. 84.Uno.2.º c) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a84) > «– Entregas de productos semielaborados resultantes de la transformación, elaboración o fundición de los metales no férricos referidos en el primer guion, con excepción de los compuestos por níquel. En particular, se considerarán productos semielaborados los lingotes, bloques, placas, barras, grano, granalla y alambrón.» - Ley 37/1992 del IVA, art. 84.Uno.2.º c) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a84) > «En todo caso, se considerarán comprendidas en los párrafos anteriores las entregas de los materiales definidos en el anexo de esta ley.» - Ley 37/1992 del IVA, art. 84.Uno.2.º d) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a84) > «d) Cuando se trate de prestaciones de servicios que tengan por objeto derechos de emisión, reducciones certificadas de emisiones y unidades de reducción de emisiones de gases de efecto invernadero» - Ley 37/1992 del IVA, art. 84.Uno.2.º e) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a84) > «e) Cuando se trate de las siguientes entregas de bienes inmuebles:» - Ley 37/1992 del IVA, art. 84.Uno.2.º f) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a84) > «Cuando se trate de ejecuciones de obra, con o sin aportación de materiales, así como las cesiones de personal para su realización, consecuencia de contratos directamente formalizados entre el promotor y el contratista que tengan por objeto la urbanización de terrenos o la construcción o rehabilitación de edificaciones.» - Ley 37/1992 del IVA, art. 84.Uno.2.º g) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a84) > «Las entregas de dichos bienes, en los casos en que sean sujetos pasivos del Impuesto sus destinatarios conforme a lo establecido en este número 2.°, deberán documentarse en una factura mediante serie especial.» - Real Decreto 1619/2012, Reglamento de facturación, art. 6.1 m) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «m) En el caso de que el sujeto pasivo del Impuesto sea el adquirente o el destinatario de la operación, la mención «inversión del sujeto pasivo».» **Incorrect:** A contractor invoicing construction work to the developer charges 21 % VAT on the line. **Correct:** The line goes at 0 % with the reverse-charge reason of its case. ```json { "description": "Construction work, phase 2", "quantity": 1, "unit_price": 25000, "main_tax": { "type": "IVA", "percentage": 0 }, "exemption_reason": "ISP_ART_84_2_F" } ``` **Related:** [TAX-003 · Reverse-charge lines carry no tax and never go on a simplified invoice](/rules/taxes#tax-003) · [CNT-012 · A reverse-charge invoice carries the mention «inversión del sujeto pasivo»](/rules/contents#cnt-012) · [CNT-005 · A full invoice identifies the recipient by NIF](/rules/contents#cnt-005) **Explained in:** [Tax classification per line › Reverse charge (inversión del sujeto pasivo, S2)](/verifactu/tax-classification#inversión-del-sujeto-pasivo-s2) ## TAX-003 · Reverse-charge lines carry no tax and never go on a simplified invoice `Required` · AEAT criterion · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. A reverse-charge line goes at 0 % with no tax amount, and only on a full invoice or its correctives, never on a simplified one. It cannot carry an equivalence surcharge nor use the OSS regime. **Why:** AEAT registers a reverse-charge line only with rate and tax amount at zero, and only on invoice types that identify the recipient, who is the one who self-assesses. **Applies to:** invoice types `STANDARD`, `SIMPLIFIED`, `CORRECTIVE`; Lines classified as reverse charge (`exemption_reason` `ISP_ART_84_2_*`). **Error codes:** [`LINE_EXEMPTION_WITH_TAX`](/errors/LINE_EXEMPTION_WITH_TAX), [`SIMPLIFICADA_FORBIDS_ISP`](/errors/SIMPLIFICADA_FORBIDS_ISP) (`400`), [`ISP_INCOMPATIBLE_WITH_SURCHARGE`](/errors/ISP_INCOMPATIBLE_WITH_SURCHARGE) (`400`), [`OSS_REGIME_INCOMPATIBLE_WITH_ISP`](/errors/OSS_REGIME_INCOMPATIBLE_WITH_ISP) **Legal basis:** - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.4 CalificacionOperacion — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Si CalificacionOperacion es “S2”, TipoFactura solo puede ser “F1”, “F3”, “R1”, “R2”, “R3” y “R4”. - Cuando CalificacionOperacion sea “S2”: ✓ TipoImpositivo = 0. [...] ✓ CuotaRepercutida = 0.» **Incorrect:** A simplified invoice with a reverse-charge line: the API answers [`SIMPLIFICADA_FORBIDS_ISP`](/errors/SIMPLIFICADA_FORBIDS_ISP). **Correct:** A standard invoice to the identified business recipient, with the line at 0 % and its reverse-charge reason. **Related:** [TAX-002 · Reverse-charge operations are invoiced without charging VAT](/rules/taxes#tax-002) · [SIM-003 · Some operations can never go on a simplified invoice](/rules/simplified#sim-003) · [SUR-001 · The surcharge rate matches the VAT rate of its line](/rules/surcharge#sur-001) **Explained in:** [Tax classification per line › Rules BeeL. enforces](/verifactu/tax-classification#rules-beel-enforces) ## TAX-004 · Intra-EU supplies of goods are exempt only with the buyer's EU VAT number `Required` · Law · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. An intra-EU supply of goods is exempt only when the buyer has a VAT number from another Member State and has given it to you. The recipient goes on the invoice with that number as an alternative identifier of type NIF-IVA, and the operation is also declared in the recapitulative statement (modelo 349). **Why:** Without a valid EU VAT number the exemption does not apply and Spanish VAT was due; AEAT also rejects an E5 record that does not identify the recipient that way. **Applies to:** invoice types `STANDARD`, `CORRECTIVE`; Goods shipped to a business in another EU Member State (`exemption_reason: EXENTA_ART_25`). **Error codes:** [`EXEMPTION_REQUIRES_RECIPIENT_ID_TYPE`](/errors/EXEMPTION_REQUIRES_RECIPIENT_ID_TYPE) (`400`) **Legal basis:** - Ley 37/1992 del IVA, art. 25.Uno — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a25) > «siempre que el adquirente sea un empresario o profesional o una persona jurídica que no actúe como tal, que disponga de un número de identificación a efectos del Impuesto sobre el Valor Añadido asignado por un Estado miembro distinto del Reino de España, que haya comunicado dicho número de identificación fiscal al vendedor.» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.5.1 OperacionExenta E5 — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «si OperacionExenta es igual a “E5”, sólo deberá existir la agrupación IDOtro cuando se cumplimente el bloque “Destinatario”.» **Incorrect:** Invoicing goods to a French company as exempt with the recipient identified only by name: the API answers [`EXEMPTION_REQUIRES_RECIPIENT_ID_TYPE`](/errors/EXEMPTION_REQUIRES_RECIPIENT_ID_TYPE). **Correct:** Identifying the customer with its EU VAT number as `alternative_id` of type NIF-IVA, after checking that the number is valid. **Related:** [CNT-005 · A full invoice identifies the recipient by NIF](/rules/contents#cnt-005) · [CNT-021 · A recipient without a Spanish NIF is identified by an alternative id](/rules/contents#cnt-021) · [TAX-005 · Exempt and non-subject lines carry no VAT rate](/rules/taxes#tax-005) **Explained in:** [International customers › B2B intra-EU — goods (E5)](/verifactu/international-customers#b2b-intra-eu--goods-e5) ## TAX-005 · Exempt and non-subject lines carry no VAT rate `Required` · AEAT criterion · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed. A line with an `exemption_reason` goes at 0 %: it carries neither a VAT rate nor a tax amount, and no equivalence surcharge. **Why:** AEAT does not accept a rate or a tax amount on an exempt or non-subject line; the invoice would say the operation is exempt and charge VAT at the same time. **Applies to:** Lines with an `exemption_reason` (exempt, non-subject or reverse charge). **Error codes:** [`LINE_EXEMPTION_WITH_TAX`](/errors/LINE_EXEMPTION_WITH_TAX), [`INVALID_IVA_SURCHARGE_PAIR`](/errors/INVALID_IVA_SURCHARGE_PAIR) (`422`) **Legal basis:** - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.4 y 3.1.3.15.5 — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Si el campo OperacionExenta está cumplimentado no se pueden informar ninguno de estos campos: TipoImpositivo, CuotaRepercutida, TipoRecargoEquivalencia y CuotaRecargoEquivalencia.» **Incorrect:** A training course marked `EXENTA_ART_20` sent at 21 %: the API answers [`LINE_EXEMPTION_WITH_TAX`](/errors/LINE_EXEMPTION_WITH_TAX). **Correct:** The same line at 0 % with its exemption reason. ```json { "description": "Vocational training course", "quantity": 1, "unit_price": 400, "main_tax": { "type": "IVA", "percentage": 0 }, "exemption_reason": "EXENTA_ART_20" } ``` **Related:** [CNT-010 · An exempt operation states why it is exempt](/rules/contents#cnt-010) · [TAX-003 · Reverse-charge lines carry no tax and never go on a simplified invoice](/rules/taxes#tax-003) **Explained in:** [Tax classification per line › Rules BeeL. enforces](/verifactu/tax-classification#rules-beel-enforces) ## TAX-006 · Services to a business abroad are not subject to Spanish VAT `Required` · Law · Impact: medium · Responsibility: the issuing business. A service to a business established in another country is, as a general rule, located where the customer is established: invoice it without Spanish VAT, as not subject by location rules (`NO_SUJETA_LOCALIZACION`), and identify the customer. When the customer is liable for the VAT in another Member State, the invoice carries the mention «inversión del sujeto pasivo» and is never a simplified invoice. The exceptions of art. 70 LIVA (real estate, events, transport and others) need their own analysis. **Why:** Charging Spanish VAT on a service located abroad collects a tax Spain is not owed, and the customer cannot deduct it. **Applies to:** invoice types `STANDARD`, `CORRECTIVE`; Services to a business customer established outside Spain, general rule. **Legal basis:** - Ley 37/1992 del IVA, art. 69.Uno.1.º — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a69) > «Cuando el destinatario sea un empresario o profesional que actúe como tal y radique en el citado territorio la sede de su actividad económica, o tenga en el mismo un establecimiento permanente o, en su defecto, el lugar de su domicilio o residencia habitual» - RD 1619/2012 (Reglamento de facturación), art. 6.1.m) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «En el caso de que el sujeto pasivo del Impuesto sea el adquirente o el destinatario de la operación, la mención «inversión del sujeto pasivo».» - RD 1619/2012 (Reglamento de facturación), art. 4.4.d) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a4) > «d) Las entregas de bienes o prestaciones de servicios a que se refiere el artículo 2.3.b) b').» **Incorrect:** A software consultancy invoices a German company at 21 % Spanish VAT. **Correct:** The line goes at 0 % with `exemption_reason: NO_SUJETA_LOCALIZACION` and the customer is identified with its EU VAT number. **Related:** [TAX-004 · Intra-EU supplies of goods are exempt only with the buyer's EU VAT number](/rules/taxes#tax-004) · [TAX-007 · Sales declared through OSS use regime key 17](/rules/taxes#tax-007) · [CNT-021 · A recipient without a Spanish NIF is identified by an alternative id](/rules/contents#cnt-021) · [CNT-012 · A reverse-charge invoice carries the mention «inversión del sujeto pasivo»](/rules/contents#cnt-012) **Explained in:** [International customers › B2B intra-EU — services (N2)](/verifactu/international-customers#b2b-intra-eu--services-n2) · [International customers › Services to non-EU customers](/verifactu/international-customers#services-to-non-eu-customers) ## TAX-007 · Sales declared through OSS use regime key 17 `Required` · AEAT criterion · Impact: medium · Responsibility: the issuing business. The API also answers the error codes listed. Above 10,000 € a year of intra-EU distance sales of goods and B2C services, counting the previous year and the current one, the VAT of those sales is due in the customer's country. Declaring it through the OSS or IOSS one-stop shop is an option; an operation you declare there goes with regime key `17`. In BeeL., send such a line with regime key `17` and the destination country's VAT rate, without `exemption_reason`. **Why:** AEAT identifies one-stop-shop sales by the regime key; under another key the record says Spanish VAT was charged on a sale taxed in another country. **Applies to:** Distance sales and B2C services to other EU countries declared in the OSS or IOSS one-stop shop. **Error codes:** [`OSS_REGIME_INCOMPATIBLE_WITH_ISP`](/errors/OSS_REGIME_INCOMPATIBLE_WITH_ISP) **Legal basis:** - AEAT, Preguntas frecuentes SIF y VERI*FACTU, Registros de facturación: alta (OSS) — [source](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/registros-facturacion-alta.html) > «En las operaciones de los regímenes de ventanilla única (OSS, one stop shop) [...] el código de régimen a indicar de la lista L8 es el "17": Operación acogida a alguno de los regímenes previstos en el Capítulo XI del Título IX (OSS e IOSS).» - Ley 37/1992 del IVA, art. 73.Uno — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a73) > «el límite referido será de 10.000 euros para el importe total, excluido el impuesto, de dichas entregas de bienes y/o prestaciones de servicios realizadas en la Comunidad, durante el año natural precedente, o su equivalente en su moneda nacional. Cuando las operaciones efectuadas durante el año en curso superen el límite indicado en el párrafo anterior» **Incorrect:** An online shop above the OSS threshold invoices a consumer in Italy at 21 % under the general regime `01`. **Correct:** The line goes with regime key `17` and the Italian VAT rate, without `exemption_reason`. **Related:** [TAX-006 · Services to a business abroad are not subject to Spanish VAT](/rules/taxes#tax-006) · [TAX-003 · Reverse-charge lines carry no tax and never go on a simplified invoice](/rules/taxes#tax-003) **Explained in:** [Regime keys › "17" — OSS / IOSS](/verifactu/regime-keys#17--oss--ioss) · [International customers › B2C intra-EU — above the OSS threshold](/verifactu/international-customers#b2c-intra-eu--above-the-oss-threshold) ## TAX-008 · Disbursements go as SUPLIDO lines, without tax `Required` · AEAT criterion · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed. An amount you paid in the customer's name and on their behalf is not part of your taxable base: send it as a `SUPLIDO` line, which carries no VAT, surcharge or IRPF. It is not part of the billing record either. An invoice with nothing but `SUPLIDO` lines is not an invoice and is rejected with [`INVOICE_REQUIRES_AT_LEAST_ONE_NORMAL_LINE`](/errors/INVOICE_REQUIRES_AT_LEAST_ONE_NORMAL_LINE): put the disbursement on the invoice of the operation it belongs to. **Why:** Taxing a disbursement charges VAT on money that was never your income; AEAT only accepts it in the total as a non-subject or zero-rated amount. **Applies to:** Amounts paid on behalf of the customer (disbursements, *suplidos*). **Error codes:** [`LINE_SUPLIDO_MUST_HAVE_NO_TAX`](/errors/LINE_SUPLIDO_MUST_HAVE_NO_TAX), [`LINE_SUPLIDO_MUST_HAVE_NO_RECARGO`](/errors/LINE_SUPLIDO_MUST_HAVE_NO_RECARGO), [`LINE_SUPLIDO_MUST_HAVE_NO_IRPF`](/errors/LINE_SUPLIDO_MUST_HAVE_NO_IRPF), [`INVOICE_REQUIRES_AT_LEAST_ONE_NORMAL_LINE`](/errors/INVOICE_REQUIRES_AT_LEAST_ONE_NORMAL_LINE) (`422`) **Legal basis:** - AEAT, Preguntas frecuentes SIF y VERI*FACTU, Registros de facturación: alta (suplidos) — [source](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/registros-facturacion-alta.html) > «los importes suplidos al igual que ocurre con el recargo financiero, no son importes "propios" del registro de facturación, y no tienen que incluirse entre las menciones del “registro de facturación de alta”. No obstante, en el caso de que se incluyeran como mayor importe en el concepto “Importe total factura” (lo cual, no es obligatorio), deberán consignarse como importe no sujeto al IVA o cantidades a tipo cero (0%).» - AEAT, Aclaraciones a dudas de los desarrolladores (v1.3), 22 — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/FAQs-Desarrolladores.pdf) > «NO procede hacer una factura que solo contenga gastos suplidos, porque eso NO sería una factura, así que nunca debería existir como tal.» - Ley 37/1992 del IVA, art. 78.Tres.3.º — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a78) > «Las sumas pagadas en nombre y por cuenta del cliente en virtud de mandato expreso del mismo. El sujeto pasivo vendrá obligado a justificar la cuantía efectiva de tales gastos y no podrá proceder a la deducción del impuesto que eventualmente los hubiera gravado.» **Incorrect:** An accounting firm (*gestoría*) adds the registry fee it paid for the client as a normal line at 21 %. **Correct:** The fee goes as a `SUPLIDO` line. ```json { "line_type": "SUPLIDO", "description": "Registry fee paid on your behalf", "quantity": 1, "unit_price": 35.20 } ``` **Related:** [TAX-009 · IRPF withholding is not part of the total AEAT receives](/rules/taxes#tax-009) **Explained in:** [Disbursements (suplidos)](/verifactu/suplidos) ## TAX-009 · IRPF withholding is not part of the total AEAT receives `Required` · AEAT criterion · Impact: medium · Checked by the API: BeeL. applies it. The IRPF withheld on an invoice is not part of its billing record: the total AEAT receives is the total before the withholding, so it can differ from the amount payable. BeeL. leaves the withholding out of the record for you. **Why:** Comparing the QR amount or the registered total with the amount payable and reading the difference as an error leads to correcting an invoice that is right. **Applies to:** Invoices with IRPF withholding, under VeriFactu. **Legal basis:** - AEAT, Preguntas frecuentes SIF y VERI*FACTU, Registros de facturación: alta (retenciones) — [source](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/registros-facturacion-alta.html) > «Por lo que se refiere a las retenciones, estas no forman parte formalmente del registro de facturación (no es uno de los elementos constitutivos de la factura de acuerdo con la Directiva UE).» **Incorrect:** Flagging as a mismatch an invoice whose QR says 121.00 while the customer pays 106.00 after a 15 % withholding. **Correct:** Reconciling payments against the amount payable, and the AEAT record against the total before withholding. **Related:** [TAX-010 · Set the IRPF withholding when the customer must withhold](/rules/taxes#tax-010) · [TAX-008 · Disbursements go as SUPLIDO lines, without tax](/rules/taxes#tax-008) **Explained in:** [What AEAT receives from your invoice › The total](/verifactu/what-aeat-receives#the-total) · [Amounts and rounding › IRPF](/guides/amounts-and-rounding#irpf) ## TAX-010 · Set the IRPF withholding when the customer must withhold `Recommended` · BeeL. rule · Impact: medium · Responsibility: your integration. The API also answers the error codes listed. When your customer has to withhold IRPF from your invoice, set `irpf_rate` on each line, one of 0, 1, 2, 2.8, 6, 7, 7.6, 9.5, 15, 19 or 24. A line without it takes the company's `default_irpf_rate`, if one is set. BeeL. shows the withholding and takes it off the amount payable; a simplified invoice never carries it. **Why:** Without the withholding on the invoice the customer pays the full amount, and one of you ends up correcting it with the tax authority. **Applies to:** invoice types `STANDARD`, `CORRECTIVE`; Professionals invoicing a business or professional that has to withhold IRPF. **Error codes:** [`INVALID_IRPF`](/errors/INVALID_IRPF) (`422`), [`SIMPLIFICADA_FORBIDS_IRPF`](/errors/SIMPLIFICADA_FORBIDS_IRPF) (`422`) **Incorrect:** A freelance consultant invoices a company without `irpf_rate` and without a default withholding rate, and the company has to ask for a corrected invoice. **Correct:** The line carries the withholding. ```json { "description": "Consulting, September", "quantity": 1, "unit_price": 1000, "main_tax": { "type": "IVA", "percentage": 21 }, "irpf_rate": 15 } ``` **Related:** [TAX-009 · IRPF withholding is not part of the total AEAT receives](/rules/taxes#tax-009) · [SIM-011 · No equivalence surcharge or IRPF withholding on a simplified invoice](/rules/simplified#sim-011) **Explained in:** [Amounts and rounding › IRPF](/guides/amounts-and-rounding#irpf) ## TAX-012 · The tax and the billing record are expressed in euros `Required` · Law · Impact: medium · Checked by the API: BeeL. applies it. An invoice may state its amounts in another currency, but the VAT charged is expressed in euros, and every amount in the billing record is in euros. BeeL. invoices only in euros, so both hold for every invoice it issues. **Why:** AEAT only takes tax and record amounts in euros; a foreign-currency amount would have to be converted at the exchange rate the law sets. **Applies to:** Every invoice. **Legal basis:** - RD 1619/2012 (Reglamento de facturación), art. 12.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a12) > «Los importes que figuran en las facturas podrán expresarse en cualquier moneda, a condición de que el importe del Impuesto que, en su caso, se repercuta se exprese en euros, utilizando a tal efecto el tipo de cambio a que se refiere el artículo 79.Once de la Ley del Impuesto.» - RD 1007/2023 (RRSIF), art. 10.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2023-24840#a1-2) > «Todos los importes monetarios que consten en el registro de facturación de alta deberán expresarse en euros. Cuando la factura se hubiese expedido en una unidad de cuenta o divisa distinta del euro tendrá que efectuarse en el registro la correspondiente conversión.» **Incorrect:** Expecting BeeL. to register a dollar invoice and convert it for AEAT. **Correct:** Converting the price to euros before sending it, as [TAX-013](/rules/taxes#tax-013) says. **Related:** [TAX-013 · Send every amount in euros](/rules/taxes#tax-013) **Explained in:** [Amounts and rounding › Precision](/guides/amounts-and-rounding#precision) ## TAX-013 · Send every amount in euros `Required` · BeeL. rule · Impact: critical · Responsibility: your integration. The API has no currency field: every amount you send is read as euros. Convert foreign-currency prices to euros before sending them; you may mention the original currency in the notes. **Why:** A price sent in dollars or pounds is invoiced, taxed and registered with AEAT as that many euros, and only a corrective fixes it. **Applies to:** operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`PATCH /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/patchCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice) **Incorrect:** Passing through a Stripe charge of 100 USD as `unit_price: 100`. **Correct:** Converting it first and sending the euro amount, with the original amount in `notes`. ```json { "notes": "Original charge: 100.00 USD", "lines": [{ "description": "Subscription, September", "quantity": 1, "unit_price": 92.40, "main_tax": { "type": "IVA", "percentage": 21 } }] } ``` **Related:** [TAX-012 · The tax and the billing record are expressed in euros](/rules/taxes#tax-012) **Explained in:** [Amounts and rounding › Precision](/guides/amounts-and-rounding#precision) ## TAX-014 · Only the VAT rates AEAT accepts on the operation date `Required` · AEAT criterion · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. A subject, non-exempt IVA line uses one of the VAT rates AEAT's validations accept on the operation date, or on the issue date when the invoice has no `operation_date`. The temporary rates are only accepted on operations of their period: 5 % from 1 July 2022 to 30 September 2024, and 2 % and 7.5 % from 1 October to 31 December 2024. `GET /v1/tax-types` publishes each rate with its period. The API rejects any other rate, and a rate outside its period, before the invoice is numbered. **Why:** AEAT rejects a record whose rate is not one of its accepted values for that date, after the invoice already has its number. **Applies to:** operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`PATCH /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/patchCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice); Subject, non-exempt lines taxed with IVA. **Error codes:** [`INVALID_PERCENTAGE`](/errors/INVALID_PERCENTAGE), [`VAT_RATE_NOT_ACCEPTED_ON_DATE`](/errors/VAT_RATE_NOT_ACCEPTED_ON_DATE) (`422`) **Legal basis:** - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.1 TipoImpositivo — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Solo se permiten TipoImpositivo = 0; 2; 4; 5; 7,5; 10 y 21 (valores que indican el tanto por ciento).» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.1 TipoImpositivo — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Si FechaOperacion (FechaExpedicionFactura de la agrupación IDFactura si no se informa FechaOperacion) ≥ 1 de julio de 2022 y ≤ 30 de septiembre de 2024 se admitirá TipoImpositivo = 5.» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.1 TipoImpositivo — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Si FechaOperacion (FechaExpedicionFactura de la agrupación IDFactura si no se informa FechaOperacion) ≥ 1 de octubre de 2024 y ≤ 31 de diciembre de 2024 se admitirá el TipoImpositivo = 7,5.» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.1 TipoImpositivo — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Si FechaOperacion (FechaExpedicionFactura de la agrupación IDFactura si no se informa FechaOperacion) ≥ 1 de octubre de 2024 y ≤ 31 de diciembre de 2024 se admitirá el TipoImpositivo = 2» **Incorrect:** A line at 5 % issued today without `operation_date`: the API answers [`VAT_RATE_NOT_ACCEPTED_ON_DATE`](/errors/VAT_RATE_NOT_ACCEPTED_ON_DATE). A line at 16 % answers [`INVALID_PERCENTAGE`](/errors/INVALID_PERCENTAGE). **Correct:** A line at 5 % for a supply of March 2024, with its `operation_date`. ```json { "operation_date": "2024-03-12", "lines": [{ "description": "Electricity, February 2024", "quantity": 1, "unit_price": 100, "main_tax": { "type": "IVA", "percentage": 5 } }] } ``` **Related:** [TAX-001 · Apply the VAT rate in force when the operation took place](/rules/taxes#tax-001) · [TAX-005 · Exempt and non-subject lines carry no VAT rate](/rules/taxes#tax-005) **Explained in:** [Tax classification per line › Allowed main_tax.percentage values](/verifactu/tax-classification#allowed-main_taxpercentage-values) ## TAX-015 · Regime key 08 means not subject to the line's tax `Required` · AEAT criterion · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. Regime key `08` is for an operation subject to another indirect tax: IPSI or IGIC on an IVA line, IPSI or IVA on an IGIC line. For the line's own tax it is not subject, so the line goes at 0 % with `exemption_reason: NO_SUJETA_LOCALIZACION`. It is not the general regime of IGIC: an ordinary IGIC sale uses regime key `01`. **Why:** AEAT only accepts regime key `08` with the non-subject classification N2 and rejects the record otherwise, after the invoice already has its number. **Applies to:** operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`PATCH /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/patchCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice), [`POST /v1/companies/{company_id}/recurring-invoices`](/recurring-invoices/createCompanyRecurringInvoice); IVA and IGIC lines with regime key `08`. **Error codes:** [`REGIME_KEY_CLASSIFICATION_NOT_ACCEPTED`](/errors/REGIME_KEY_CLASSIFICATION_NOT_ACCEPTED) (`422`) **Legal basis:** - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.6.6 ClaveRegimen 08 — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Si ClaveRegimen = “08”, CalificacionOperacion tiene que ser “N2” y siempre debe ir relleno.» - Orden HAC/1177/2024, anexo, lista L8B — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2024-22138) > «Operaciones sujetas al IPSI/ IVA (Impuesto sobre la Producción, los Servicios y la Importación/ Impuesto sobre el Valor Añadido).» **Incorrect:** An IGIC line at 7 % with regime key `08` for an ordinary sale in the Canary Islands: the API answers [`REGIME_KEY_CLASSIFICATION_NOT_ACCEPTED`](/errors/REGIME_KEY_CLASSIFICATION_NOT_ACCEPTED). ```json { "description": "Sale", "quantity": 1, "unit_price": 100, "main_tax": { "type": "IGIC", "percentage": 7, "regime_key": "08" } } ``` **Correct:** The same sale under regime key `01`. An IVA business invoicing a service located in the Canary Islands uses `08` with the non-subject reason. ```json { "description": "Service located in the Canary Islands", "quantity": 1, "unit_price": 100, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "08" }, "exemption_reason": "NO_SUJETA_LOCALIZACION" } ``` **Related:** [TAX-006 · Services to a business abroad are not subject to Spanish VAT](/rules/taxes#tax-006) · [TAX-017 · Special regime keys carry the classification AEAT requires](/rules/taxes#tax-017) **Explained in:** [Regime keys](/verifactu/regime-keys) ## TAX-016 · Regime keys 03, 06 and 14 are not accepted `Required` · AEAT criterion · Impact: low · Checked by the API: a request that breaks it is rejected with the error codes listed. Regime keys `03` (used goods, art and antiques), `06` (group of entities, advanced level) and `14` (VAT pending accrual in public-works certifications) are rejected on a new invoice. An invoice under `03` must not show the VAT amount separately, while the invoice always states it; AEAT requires with `06` the cost-based taxable base, and with `14` an operation date after the issue date and a public-administration recipient, data the invoice does not carry. `GET /v1/tax-types` does not offer them, and the tax configuration does not accept them as the default regime key. Keys `05` (travel agencies) and `07` (cash basis) are accepted: the invoice PDF carries the mention of their regime ([CNT-015](/rules/contents#cnt-015), [CNT-013](/rules/contents#cnt-013)). The corrective of an invoice that already carried `03` keeps it. **Why:** An invoice under the used-goods regime with the VAT amount shown separately does not meet the invoicing regulation; a record under `06` or `14` without its data is rejected by AEAT after the invoice already has its number. **Applies to:** operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`PATCH /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/patchCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice), [`POST /v1/companies/{company_id}/recurring-invoices`](/recurring-invoices/createCompanyRecurringInvoice), [`PUT /v1/configuration/taxes`](/tax-configuration/updateTaxConfiguration), [`PUT /v1/companies/{company_id}/tax-configuration`](/tax-configuration/updateCompanyTaxConfiguration); IVA and IGIC lines with regime key `03`, `06` or `14`. **Error codes:** [`REGIME_KEY_NOT_SUPPORTED`](/errors/REGIME_KEY_NOT_SUPPORTED) (`422`) **Legal basis:** - Real Decreto 1619/2012, Reglamento de facturación, art. 6.1 o) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6) > «o) En caso de aplicación del régimen especial de los bienes usados, objetos de arte, antigüedades y objetos de colección, la mención «régimen especial de los bienes usados», «régimen especial de los objetos de arte» o «régimen especial de las antigüedades y objetos de colección».» - Real Decreto 1619/2012, Reglamento de facturación, art. 16.2 c) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a16) > «c) En las facturas que expidan los sujetos pasivos revendedores por las entregas sometidas al régimen especial no podrán consignar separadamente la cuota del Impuesto sobre el Valor Añadido repercutida, y esta deberá entenderse comprendida en el precio total de la operación.» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.6.4 ClaveRegimen 06 — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «Si ClaveRegimen es igual a “06”: ✓ Se validará que TipoFactura sea distinto de “F2”, “F3”, “R5”. ✓ Campo BaseImponibleACoste deberá estar cumplimentado.» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.6.9 ClaveRegimen 14 — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «FechaOperacion, campo de cumplimentación obligatoria y posterior a fecha de expedición.» **Incorrect:** A line with regime key `03` or `14`: the API answers [`REGIME_KEY_NOT_SUPPORTED`](/errors/REGIME_KEY_NOT_SUPPORTED). **Correct:** Invoice the operation under the key that fits it, such as `01`. **Related:** [DAT-003 · The operation date is never after the issue date nor over twenty years old](/rules/dates#dat-003) · [TAX-017 · Special regime keys carry the classification AEAT requires](/rules/taxes#tax-017) · [COR-018 · A corrective can always correct what the original declared](/rules/corrective#cor-018) · [CNT-013 · A cash-basis invoice carries the mention «régimen especial del criterio de caja»](/rules/contents#cnt-013) · [CNT-015 · A travel-agency invoice carries the mention «régimen especial de las agencias de viajes»](/rules/contents#cnt-015) **Explained in:** [Regime keys](/verifactu/regime-keys) ## TAX-017 · Special regime keys carry the classification AEAT requires `Required` · AEAT criterion · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed. Under regime key `04` (investment gold) it is reverse charge or exempt. Under `10` (collections on behalf of third parties) it is non-subject with `NO_SUJETA_ART_7_9`, on a standard invoice whose recipient is identified by NIF. Under `11` (business premises rental) an IVA line is subject at 21 %. **Why:** AEAT rejects a record whose classification, rate, invoice type or recipient does not match what its regime key allows, after the invoice already has its number. **Applies to:** operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`PATCH /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/patchCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice), [`POST /v1/companies/{company_id}/recurring-invoices`](/recurring-invoices/createCompanyRecurringInvoice); IVA and IGIC lines with regime key `04`, `10` or `11`. **Error codes:** [`REGIME_KEY_CLASSIFICATION_NOT_ACCEPTED`](/errors/REGIME_KEY_CLASSIFICATION_NOT_ACCEPTED) (`422`), [`REGIME_KEY_REQUIRES_VAT_RATE`](/errors/REGIME_KEY_REQUIRES_VAT_RATE) (`422`), [`REGIME_KEY_REQUIRES_STANDARD_INVOICE`](/errors/REGIME_KEY_REQUIRES_STANDARD_INVOICE) (`422`), [`REGIME_KEY_REQUIRES_RECIPIENT_NIF`](/errors/REGIME_KEY_REQUIRES_RECIPIENT_NIF) (`422`) **Legal basis:** - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.6.3 ClaveRegimen 04 — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «si clave de ClaveRegimen es igual a “04”, CalificacionOperacion solo puede ser “S2”, o bien OperacionExenta.» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.6.7 ClaveRegimen 10 — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «✓ CalificacionOperacion tiene que ser “N1” y siempre debe ir relleno. ✓ TipoFactura tiene que ser “F1”. ✓ Todos los destinatarios tienen que estar identificado mediante NIF.» - AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.6.8 ClaveRegimen 11 — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf) > «cuando ClaveRegimen sea “11”, únicamente se admitirá el TipoImpositivo = 21.» **Incorrect:** A business premises rental at 10 % under regime key `11`: the API answers [`REGIME_KEY_REQUIRES_VAT_RATE`](/errors/REGIME_KEY_REQUIRES_VAT_RATE). **Correct:** The rental at 21 % under regime key `11`. ```json { "description": "Office rent, October", "quantity": 1, "unit_price": 900, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "11" } } ``` **Related:** [TAX-015 · Regime key 08 means not subject to the line's tax](/rules/taxes#tax-015) · [CNT-014 · A used-goods, art or antiques invoice carries its regime mention](/rules/contents#cnt-014) · [TAX-016 · Regime keys 03, 06 and 14 are not accepted](/rules/taxes#tax-016) **Explained in:** [Regime keys](/verifactu/regime-keys) ## TAX-018 · An issued invoice does not use the intra-EU acquisition exemption `Required` · Law · Impact: low · Checked by the API: a request that breaks it is rejected with the error codes listed. Article 26 LIVA exempts intra-EU acquisitions of goods: an operation of the buyer, which the seller's invoice does not document. A line of an issued invoice with `EXENTA_ART_26` is rejected with [`EXEMPTION_NOT_FOR_ISSUED_INVOICE`](/errors/EXEMPTION_NOT_FOR_ISSUED_INVOICE). A supply of goods to another member state goes with `EXENTA_ART_25`. **Why:** Declaring on a sale the exemption of a purchase gives AEAT an exemption cause that does not match the operation invoiced. **Applies to:** operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`PATCH /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/patchCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice), [`POST /v1/companies/{company_id}/recurring-invoices`](/recurring-invoices/createCompanyRecurringInvoice); Lines with `exemption_reason` `EXENTA_ART_26`. **Error codes:** [`EXEMPTION_NOT_FOR_ISSUED_INVOICE`](/errors/EXEMPTION_NOT_FOR_ISSUED_INVOICE) (`422`) **Legal basis:** - Ley 37/1992 del IVA, art. 26 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a26) > «Artículo 26. Exenciones en las adquisiciones intracomunitarias de bienes.» **Incorrect:** A supply of goods to a French company marked `EXENTA_ART_26`: the API answers [`EXEMPTION_NOT_FOR_ISSUED_INVOICE`](/errors/EXEMPTION_NOT_FOR_ISSUED_INVOICE). **Correct:** The intra-EU supply goes with the exemption of article 25. ```json { "description": "Machine parts", "quantity": 10, "unit_price": 120, "main_tax": { "type": "IVA", "percentage": 0 }, "exemption_reason": "EXENTA_ART_25" } ``` **Related:** [TAX-005 · Exempt and non-subject lines carry no VAT rate](/rules/taxes#tax-005) **Explained in:** [Tax classification per line](/verifactu/tax-classification) ## TAX-019 · An issuer that is not an individual never bears the IRPF rates of individuals `Required` · Law · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed. Only individuals pay IRPF, so no entity bears its rates for individuals (1, 2, 7 and 15 %, and 6, 2.8 and 7.6 % in Ceuta and Melilla). Public (`A`) and private (`B`) limited companies, general (`C`) and limited (`D`) partnerships, cooperatives (`F`), associations (`G`), public bodies (`Q`), religious institutions (`R`) and temporary business associations (`U`) are legal persons and pay Corporate Income Tax; the permanent establishment of a non-resident entity (`W`) bears the Corporate Income Tax withholding regime. Their income bears withholding only when it is one of those the Corporate Income Tax regulation lists (rent of urban property, image rights, director fees, capital income…), at 19 %, or 24 % on image rights; any other income, such as a provision of services, bears none, and an exempt entity bears none on its exempt income. So their invoice lines, products, recurring templates and default configuration accept `irpf_rate` 0, 19 or 24 (and 9.5, see below), and a line created without `irpf_rate` never inherits a default they cannot bear: it gets 0. A non-resident entity (`N`) bears the Non-Residents Income Tax withholding: 24 %, or 19 % if it resides in the European Union or the European Economic Area, or 0 when the income is exempt or a tax treaty says so; it accepts 0, 19 or 24, and which one depends on facts the NIF does not show, so none is suggested. The State, the Autonomous Communities and the local entities (`S` and `P`) are fully exempt and their income bears no withholding: only 0. Any other rate is rejected with [`IRPF_RATE_NOT_FOR_CORPORATE_ISSUER`](/errors/IRPF_RATE_NOT_FOR_CORPORATE_ISSUER). Other issuers are not restricted: whether an individual's income bears 15 %, 7 %, 2 % or 1 % depends on the activity and its years, and `E`, `H`, `J` and `V` depend on facts the NIF does not show. Corrective invoices are not checked either: they correct by differences what the original carried. In Ceuta and Melilla the 19 % on rents of urban property there is halved, so a company or a permanent establishment can also use 9.5 (see [TAX-022](/rules/taxes#tax-022)). **Why:** The customer withholds and pays the Treasury what the invoice says; an entity's invoice at 15 % makes it withhold at a rate that does not exist for that income, or withhold where nothing had to be withheld. **Applies to:** operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`PATCH /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/patchCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice), [`POST /v1/companies/{company_id}/recurring-invoices`](/recurring-invoices/createCompanyRecurringInvoice), [`POST /v1/companies/{company_id}/recurring-invoices/derivations`](/recurring-invoices/createCompanyRecurringInvoiceDerivation), [`PATCH /v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}`](/recurring-invoices/patchCompanyRecurringInvoice), [`PUT /v1/configuration/taxes`](/tax-configuration/updateTaxConfiguration), [`PUT /v1/companies/{company_id}/tax-configuration`](/tax-configuration/updateCompanyTaxConfiguration), [`POST /v1/products`](/products/createProduct), [`PUT /v1/products/{product_id}`](/products/updateProduct), [`PATCH /v1/products/{product_id}`](/products/patchProduct), [`POST /v1/products/bulk`](/products/createProductsBulk), [`POST /v1/companies/{company_id}/products`](/products/createCompanyProduct), [`PATCH /v1/companies/{company_id}/products/{product_id}`](/products/patchCompanyProduct), [`POST /v1/companies/{company_id}/products/bulk`](/products/createCompanyProductsBulk); Invoices other than corrective ones, recurring templates, products and the default tax configuration of an issuer whose NIF starts with `A`, `B`, `C`, `D`, `F`, `G`, `N`, `P`, `Q`, `R`, `S`, `U` or `W`. **Error codes:** [`IRPF_RATE_NOT_FOR_CORPORATE_ISSUER`](/errors/IRPF_RATE_NOT_FOR_CORPORATE_ISSUER) (`422`) **Legal basis:** - Ley 35/2006 del IRPF, art. 8.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a8) > «1. Son contribuyentes por este impuesto:» - Ley 35/2006 del IRPF, art. 8.1 a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a8) > «a) Las personas físicas que tengan su residencia habitual en territorio español.» - Orden EHA/451/2008, art. 3 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2008-3580#a3) > «F. Sociedades cooperativas.» - Orden EHA/451/2008, art. 3 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2008-3580#a3) > «G. Asociaciones.» - Orden EHA/451/2008, art. 3 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2008-3580#a3) > «P. Corporaciones Locales.» - Orden EHA/451/2008, art. 3 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2008-3580#a3) > «Q. Organismos públicos.» - Orden EHA/451/2008, art. 3 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2008-3580#a3) > «R. Congregaciones e instituciones religiosas.» - Orden EHA/451/2008, art. 3 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2008-3580#a3) > «S. Órganos de la Administración del Estado y de las Comunidades Autónomas.» - Orden EHA/451/2008, art. 4 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2008-3580#a4) > «Para las personas jurídicas y entidades sin personalidad jurídica que carezcan de la nacionalidad española, el número de identificación fiscal comenzará con la letra N, que indicará su carácter de entidad extranjera.» - Orden EHA/451/2008, art. 5.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2008-3580#a5) > «2. Para los establecimientos permanentes de entidades no residentes en territorio español, el número de identificación fiscal comenzará con la letra W, que indicará su carácter de establecimiento permanente de entidad no residente en territorio español.» - Ley 27/2014 del Impuesto sobre Sociedades, art. 9.1 a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2014-12328#a9) > «1. Estarán totalmente exentos del Impuesto:» - Ley 27/2014 del Impuesto sobre Sociedades, art. 9.1 a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2014-12328#a9) > «a) El Estado, las Comunidades Autónomas y las entidades locales.» - Real Decreto 634/2015, Reglamento del Impuesto sobre Sociedades, art. 61 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2015-7771#a61) > «No existirá obligación de retener ni de ingresar a cuenta respecto de:» - Real Decreto 634/2015, Reglamento del Impuesto sobre Sociedades, art. 61 o) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2015-7771#a61) > «o) Las rentas obtenidas por las entidades exentas a que se refiere el apartado 1 del artículo 9 de la Ley del Impuesto.» - Real Decreto Legislativo 5/2004, texto refundido de la Ley del Impuesto sobre la Renta de no Residentes, art. 23.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2004-4527#a23) > «1. Los establecimientos permanentes estarán sometidos al régimen de retenciones del Impuesto sobre Sociedades por las rentas que perciban» - Real Decreto Legislativo 5/2004, texto refundido de la Ley del Impuesto sobre la Renta de no Residentes, art. 5 a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2004-4527#a5) > «a) Las personas físicas y entidades no residentes en territorio español conforme al artículo 6 que obtengan rentas en él, salvo que sean contribuyentes por el Impuesto sobre la Renta de las Personas Físicas.» - Real Decreto Legislativo 5/2004, texto refundido de la Ley del Impuesto sobre la Renta de no Residentes, art. 31.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2004-4527#a31) > «2. Los sujetos obligados a retener deberán retener o ingresar a cuenta una cantidad equivalente a la que resulte de aplicar las disposiciones previstas en esta Ley para determinar la deuda tributaria correspondiente a los contribuyentes por este impuesto sin establecimiento permanente» - Real Decreto Legislativo 5/2004, texto refundido de la Ley del Impuesto sobre la Renta de no Residentes, art. 25.1 a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2004-4527#a25) > «a) Con carácter general el 24 por 100. No obstante, el tipo de gravamen será el 19 por ciento cuando se trate de contribuyentes residentes en otro Estado miembro de la Unión Europea o del Espacio Económico Europeo» - Real Decreto Legislativo 5/2004, texto refundido de la Ley del Impuesto sobre la Renta de no Residentes, art. 31.4 a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2004-4527#a31) > «a) Las rentas que estén exentas en virtud de lo dispuesto en el artículo 14 o en un convenio para evitar la doble imposición que resulte aplicable» - Ley 27/2014 del Impuesto sobre Sociedades, art. 7.1 a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2014-12328#a7) > «a) Las personas jurídicas, excluidas las sociedades civiles que no tengan objeto mercantil.» - Ley 27/2014 del Impuesto sobre Sociedades, art. 7.1 d) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2014-12328#a7) > «d) Las uniones temporales de empresas, reguladas en la Ley 18/1982, de 26 de mayo, sobre régimen fiscal de las agrupaciones y uniones temporales de Empresas y de las Sociedades de desarrollo industrial regional.» - Orden EHA/451/2008, art. 3 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2008-3580#a3) > «A. Sociedades anónimas.» - Orden EHA/451/2008, art. 3 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2008-3580#a3) > «B. Sociedades de responsabilidad limitada.» - Orden EHA/451/2008, art. 3 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2008-3580#a3) > «C. Sociedades colectivas.» - Orden EHA/451/2008, art. 3 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2008-3580#a3) > «D. Sociedades comanditarias.» - Orden EHA/451/2008, art. 3 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2008-3580#a3) > «U. Uniones Temporales de Empresas.» - Real Decreto 634/2015, Reglamento del Impuesto sobre Sociedades, art. 60.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2015-7771#a60) > «1. Deberá practicarse retención, en concepto de pago a cuenta del Impuesto sobre Sociedades correspondiente al perceptor, respecto de:» - Real Decreto 634/2015, Reglamento del Impuesto sobre Sociedades, art. 60.1 c) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2015-7771#a60) > «c) Las contraprestaciones obtenidas como consecuencia de la atribución de cargos de administrador o consejero en otras sociedades.» - Real Decreto 634/2015, Reglamento del Impuesto sobre Sociedades, art. 60.1 d) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2015-7771#a60) > «d) Las rentas procedentes de la cesión del derecho a la explotación de la imagen o del consentimiento o autorización para su utilización, aun cuando constituyan ingresos derivados de explotaciones económicas.» - Real Decreto 634/2015, Reglamento del Impuesto sobre Sociedades, art. 60.1 e) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2015-7771#a60) > «e) Las rentas procedentes del arrendamiento o subarrendamiento de inmuebles urbanos, aun cuando constituyan ingresos derivados de explotaciones económicas.» - Real Decreto 634/2015, Reglamento del Impuesto sobre Sociedades, art. 66 a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2015-7771#a66) > «a) Con carácter general, el 19 por ciento. Cuando se trate de rentas procedentes del arrendamiento o subarrendamiento de inmuebles urbanos situados en Ceuta, Melilla o sus dependencias, obtenidas por entidades domiciliadas en dichos territorios o que operen en ellos mediante establecimiento o sucursal, dicho porcentaje se dividirá por dos.» - Real Decreto 634/2015, Reglamento del Impuesto sobre Sociedades, art. 66 b) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2015-7771#a66) > «b) En el caso de rentas procedentes de la cesión del derecho a la explotación de la imagen o del consentimiento o autorización para su utilización, el 24 por ciento.» - Ley 27/2014 del Impuesto sobre Sociedades, art. 128.6 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2014-12328#a128) > «a) Con carácter general, el 19 por ciento.» - Real Decreto 439/2007, Reglamento del IRPF, art. 95.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2007-6820#a95) > «1. Cuando los rendimientos sean contraprestación de una actividad profesional, se aplicará el tipo de retención del 15 por ciento sobre los ingresos íntegros satisfechos.» - Real Decreto 439/2007, Reglamento del IRPF, art. 101.2 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2007-6820#a101) > «No obstante, el porcentaje de retención e ingreso a cuenta sobre los rendimientos procedentes de la propiedad intelectual, cualquiera que sea su calificación, será del 15 por ciento» - Real Decreto 1065/2007, Reglamento General de gestión e inspección tributaria, art. 19.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2007-15984#a19) > «1. Para las personas físicas de nacionalidad española, el número de identificación fiscal será el número de su documento nacional de identidad seguido del correspondiente código o carácter de verificación» **Incorrect:** An SL (NIF `B…`) or an association (NIF `G…`) invoices a consultancy service with `irpf_rate: 15`: the API answers [`IRPF_RATE_NOT_FOR_CORPORATE_ISSUER`](/errors/IRPF_RATE_NOT_FOR_CORPORATE_ISSUER). **Correct:** The same SL invoices the rent of an office in Madrid: rent of urban property bears withholding, at 19 %. ```json { "description": "Office rent, October", "quantity": 1, "unit_price": 900, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "11" }, "irpf_rate": 19 } ``` **Related:** [TAX-017 · Special regime keys carry the classification AEAT requires](/rules/taxes#tax-017) · [TAX-022 · Reduced withholding rates of Ceuta and Melilla derive from their base rate](/rules/taxes#tax-022) ## TAX-022 · Reduced withholding rates of Ceuta and Melilla derive from their base rate `Required` · Law · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed. Income with the Ceuta and Melilla deduction bears a reduced withholding, and the law gives the reduction, not the figure: under IRPF, the professional rates of 15 % and 7 % and the 19 % on rents of urban property located there are reduced by 60 %, giving 6 %, 2.8 % and 7.6 %; under Corporate Income Tax, the 19 % on those rents is halved, giving 9.5 %. Each reduced rate is accepted wherever its base rate is, with the reduction of the tax the issuer pays: an individual or an entity whose income is attributed to its members can use 6, 2.8 and 7.6; a company that pays Corporate Income Tax, or a permanent establishment of a non-resident entity, can use 9.5, and an individual sending 9.5 gets [`IRPF_RATE_ONLY_FOR_CORPORATE_ISSUER`](/errors/IRPF_RATE_ONLY_FOR_CORPORATE_ISSUER). Whether the issuer has the right to the reduction depends on where the income is obtained, which the NIF does not show: the issuer chooses it. The agricultural rates (1 % and 2 %) and the image-rights rate (24 %) have no reduction in the law, so no reduced rate derives from them. **Why:** Without the reduced rates an issuer entitled to the Ceuta and Melilla reduction cannot invoice the withholding the law sets, and its customer would withhold more than it must. **Applies to:** operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`PATCH /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/patchCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice), [`POST /v1/companies/{company_id}/recurring-invoices`](/recurring-invoices/createCompanyRecurringInvoice), [`POST /v1/companies/{company_id}/recurring-invoices/derivations`](/recurring-invoices/createCompanyRecurringInvoiceDerivation), [`PATCH /v1/companies/{company_id}/recurring-invoices/{recurring_invoice_id}`](/recurring-invoices/patchCompanyRecurringInvoice), [`PUT /v1/configuration/taxes`](/tax-configuration/updateTaxConfiguration), [`PUT /v1/companies/{company_id}/tax-configuration`](/tax-configuration/updateCompanyTaxConfiguration); Lines, recurring templates and default tax configuration with an `irpf_rate` of 6, 2.8, 7.6 or 9.5. **Error codes:** [`IRPF_RATE_ONLY_FOR_CORPORATE_ISSUER`](/errors/IRPF_RATE_ONLY_FOR_CORPORATE_ISSUER) (`422`) **Legal basis:** - Ley 35/2006 del IRPF, art. 101.5 a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a101) > «Estos porcentajes se reducirán en un 60 por ciento cuando los rendimientos tengan derecho a la deducción en la cuota prevista en el artículo 68.4 de esta Ley.» - Ley 35/2006 del IRPF, art. 101.8 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2006-20764#a101) > «Este porcentaje se reducirá en un 60 por ciento cuando el inmueble esté situado en Ceuta o Melilla en los términos previstos en el artículo 68.4 de esta Ley.» - Real Decreto 439/2007, Reglamento del IRPF, art. 95.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2007-6820#a95) > «Estos porcentajes se reducirán en un 60 por ciento cuando los rendimientos tengan derecho a la deducción en la cuota prevista en el artículo 68.4 de la Ley del Impuesto.» - Real Decreto 439/2007, Reglamento del IRPF, art. 100 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2007-6820#a100) > «Este porcentaje se reducirá en el 60 por ciento cuando el inmueble urbano esté situado en Ceuta o Melilla, en los términos previstos en el artículo 68.4 de la Ley del Impuesto.» - Real Decreto 634/2015, Reglamento del Impuesto sobre Sociedades, art. 66 a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2015-7771#a66) > «Cuando se trate de rentas procedentes del arrendamiento o subarrendamiento de inmuebles urbanos situados en Ceuta, Melilla o sus dependencias, obtenidas por entidades domiciliadas en dichos territorios o que operen en ellos mediante establecimiento o sucursal, dicho porcentaje se dividirá por dos.» **Incorrect:** An individual rents an office in Melilla and invoices it with `irpf_rate: 9.5`: that is the Corporate Income Tax rate, and the API answers [`IRPF_RATE_ONLY_FOR_CORPORATE_ISSUER`](/errors/IRPF_RATE_ONLY_FOR_CORPORATE_ISSUER). **Correct:** The same individual invoices the rent with 7.6 % withholding: 19 % reduced by 60 %. ```json { "description": "Office rent in Melilla, October", "quantity": 1, "unit_price": 900, "main_tax": { "type": "IPSI", "percentage": 4, "regime_key": "01" }, "irpf_rate": 7.6 } ``` **Related:** [TAX-019 · An issuer that is not an individual never bears the IRPF rates of individuals](/rules/taxes#tax-019) ## TAX-023 · A software or electronic service sold to a business in the Canary Islands, Ceuta or Melilla is not subject to IVA `Required` · Law · Impact: high · Checked by the API: BeeL. applies it. A Stripe charge is invoiced as not subject to IVA by localization (0 %, `exemption_reason: NO_SUJETA_LOCALIZACION`, regime key `08`, standard invoice with the recipient's tax id) only when all of these hold: the buyer is a business, meaning the tax id comes from the tax id collection of Stripe (the tax ids of the customer, of the Checkout session or of the invoice, which is a purchase declared as a business) and is a valid NIF, or it is a valid NIF of an entity (a DNI, NIE or NIF K, L or M given through metadata is a private individual and stops), and the address is taken as its seat; the postal code places it in the Canary Islands, Ceuta or Melilla; Stripe charged no tax and declared the 0 % with one of its reasons (`zero_rated`, `not_supported` or `reverse_charge`); the issuer charges IVA; no line of the charge is taxed; and every product sold (shipping follows what it ships) has a Stripe tax code of an electronically supplied service, its own or, when the product has none, the default tax code of the Stripe Tax settings of the account, which is applied by omission and is not checked against the real nature of the product: `txcd_10000000` (general electronically supplied services), software, platform or infrastructure as a service (`txcd_10010001`, `txcd_10101000`, `txcd_10102000`, `txcd_10102001`, `txcd_10103000`, `txcd_10103001`, `txcd_10103100`, `txcd_10103101`), cloud business process as a service (`txcd_10104001`) and cloud artificial intelligence as a service (`txcd_10105001` to `txcd_10105004`). Whether a line is a service is read from the tax code of its product, never from the line being a subscription. If any line of the charge does not meet these conditions while another does, the whole charge stops instead of mixing treatments; a product without a tax code when the account has no default one, with a code that is not in that list, a mix of services and goods, a charge of services to a private individual in those territories, a service known only by the default tax code of the account in a charge with shipping, and an issuer whose default regime is not the general one also stop. It does not check that the service is destined for the buyer's seat or establishment there, nor the tax code the issuer chose: a product of the kind article 70.Uno LIVA locates in the territory where IVA applies (real estate, passenger transport, events, restaurant services, short-term rental of transport) that the issuer labelled with the tax code of an electronic service would be declared as not subject by mistake. It does not cover: a delivery of goods, which is an export exempt under article 21 LIVA and follows rule [TAX-024](/rules/taxes#tax-024); a charge without a valid tax id; a charge where Stripe gave no reason (no Stripe Tax), whose 0 % comes only from the issuer's default exemption reason, which stays as configured; or a reason of Stripe's own (`customer_exempt`, `product_exempt`...). A service to a business outside the European Union leaves as not subject by localization (`NO_SUJETA_LOCALIZACION`, regime key `01`) when the buyer declared its tax id as a business, the issuer charges IVA under the general regime and no line carries an explicit Stripe tax rate or amount; to a private individual it stops. **Why:** Charging IVA, or declaring the line under the general regime, misstates the operation to AEAT, and a simplified invoice cannot carry it. Guessing the nature of a line from how it is billed would turn a delivery of goods into a service. **Applies to:** invoice types `STANDARD`; Charges collected through Stripe from a business whose address is in the Canary Islands, Ceuta or Melilla, when every product sold is an electronically supplied service. **Legal basis:** - Ley 37/1992 del IVA, art. 69.Uno.1.º — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740) > «Cuando el destinatario sea un empresario o profesional que actúe como tal y radique en el citado territorio la sede de su actividad económica, o tenga en el mismo un establecimiento permanente» - Ley 20/1991 del IGIC, art. 17.Uno.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1991-14463) > «Cuando el destinatario sea un empresario o profesional que actúe como tal y radique en el citado territorio la sede de su actividad económica, o tenga en el mismo un establecimiento permanente» - Ley 20/1991 del IGIC, art. 19.1.2.º a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1991-14463) > «Cuando las citadas operaciones se efectúen por personas o entidades no establecidas en Canarias, salvo que el destinatario, a su vez, no esté establecido en dicho territorio.» - Ley 37/1992 del IVA, art. 3.Dos.1.º a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740) > «en el Reino de España, Ceuta y Melilla y en la República Italiana, Livigno, en cuanto territorios no comprendidos en la Unión Aduanera» - Ley 37/1992 del IVA, art. 3.Dos.1.º b) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740) > «En el Reino de España, Canarias» - Ley 37/1992 del IVA, art. 21.1.º — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740) > «Las entregas de bienes expedidos o transportados fuera de la Comunidad por el transmitente o por un tercero que actúe en nombre y por cuenta de éste.» **Incorrect:** A one-off order of goods with shipping to a company in Tenerife, invoiced as not subject. It is an export exempt under article 21 and follows another rule. ```json { "description": "Ticket printer", "quantity": 1, "unit_price": 100, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "08" }, "exemption_reason": "NO_SUJETA_LOCALIZACION" } ``` **Correct:** A monthly SaaS subscription (product tax code `txcd_10103001`) charged to a company in Tenerife (postal code 38686) that gave its CIF at checkout. ```json { "description": "Plan Pro, October", "quantity": 1, "unit_price": 99, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "08" }, "exemption_reason": "NO_SUJETA_LOCALIZACION" } ``` **Related:** [TAX-015 · Regime key 08 means not subject to the line's tax](/rules/taxes#tax-015) · [TAX-024 · A sale of goods to a buyer outside the territory where IVA applies is an export exempt under article 21](/rules/taxes#tax-024) ## TAX-024 · A sale of goods to a buyer outside the territory where IVA applies is an export exempt under article 21 `Required` · Law · Impact: high · Checked by the API: BeeL. applies it. A Stripe charge is invoiced as an export exempt under article 21 LIVA (0 %, `exemption_reason: EXENTA_ART_21`, operation `E2`, regime key `02`) only when all of these hold: the buyer is in the Canary Islands, Ceuta or Melilla (by postal code) or in a country outside the European Union (by country), whether it is a business or a private individual; the shipping address of the charge (the shipping details of the invoice, of the Checkout session, of the payment intent or of the charge; if they differ in territory it stops) is a physical destination in the same territory, which means outside the territory where IVA applies; the issuer charges IVA; no line of the charge is taxed; for the Canary Islands, Ceuta and Melilla, Stripe also declared the 0 % with one of its reasons (`zero_rated`, `not_supported` or `reverse_charge`); and every product sold (shipping follows the goods it ships) has a Stripe tax code of tangible goods, its own or, when the product has none, the default tax code of the Stripe Tax settings of the account, which is applied by omission and is not checked against the real nature of the product: `txcd_99999999` (general tangible goods), the software on a physical medium codes `txcd_37070001` and `txcd_37070002`, or a code of the families Stripe types as physical goods (`txcd_30` to `txcd_36`, `txcd_40` and `txcd_41`), except food for immediate consumption (`txcd_40060003`), audiobooks (`txcd_35010500`, "Audiobook (Physical Copy)", which Stripe describes as delivered electronically or on a disc) and magazines by subscription (`txcd_35020220`), which are not treated as goods. A charge with no shipping address, with a shipping address inside the territory where IVA applies or in a different territory than the billing address, with a destination that article 3.Tres LIVA treats as France (Monaco), or a billing address in Monaco, stops. So does a charge of goods with a taxed line or an issuer that does not charge IVA (IGIC, IPSI) or whose default regime is not the general one, or, when Stripe Tax is not used, an issuer whose default rate is above 0 % (the line would carry that rate), a product without a tax code when the account has no default one, with an ambiguous code (`txcd_00000000`, a generic services code, or a family that mixes goods and services), or a mix of goods and services. If any line of the charge does not meet the conditions while another does, the whole charge stops instead of mixing treatments. A service to a business outside the European Union leaves as not subject by localization (`NO_SUJETA_LOCALIZACION`, regime key `01`) when the buyer declared its tax id as a business, the issuer charges IVA under the general regime and no line carries an explicit Stripe tax rate or amount; to a private individual it stops. Proof that the goods left the Community (customs export declaration or equivalent evidence) is the issuer's to keep; the invoice does not check it. **Why:** Declaring a delivery of goods as not subject hides an export, which is exempt under article 21 and needs its own regime key; declaring a service as an export does the opposite. The nature comes from the product the issuer declared to Stripe, not from how the charge is billed. **Applies to:** invoice types `STANDARD`; Charges collected through Stripe whose goods are shipped to a destination in the Canary Islands, Ceuta, Melilla or a country outside the European Union, when every product sold is a tangible good. **Legal basis:** - Ley 37/1992 del IVA, art. 21.1.º — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740) > «Las entregas de bienes expedidos o transportados fuera de la Comunidad por el transmitente o por un tercero que actúe en nombre y por cuenta de éste.» - Ley 37/1992 del IVA, art. 3.Dos.1.º a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740) > «en el Reino de España, Ceuta y Melilla y en la República Italiana, Livigno, en cuanto territorios no comprendidos en la Unión Aduanera» - Ley 37/1992 del IVA, art. 3.Dos.1.º b) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740) > «En el Reino de España, Canarias» - Ley 37/1992 del IVA, art. 78.Dos.1.º — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740) > «Los gastos de comisiones, portes y transporte, seguros, primas por prestaciones anticipadas y cualquier otro crédito efectivo a favor de quien realice la entrega o preste el servicio, derivado de la prestación principal o de las accesorias a la misma.» - Ley 37/1992 del IVA, art. 3.Tres — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740) > «tendrán la misma consideración que las efectuadas, respectivamente, con Francia, el Reino Unido y Chipre.» **Incorrect:** A POS terminal (product tax code `txcd_99999999`) sold to a company in Tenerife, invoiced as not subject by localization. ```json { "description": "POS terminal", "quantity": 1, "unit_price": 600, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "08" }, "exemption_reason": "NO_SUJETA_LOCALIZACION" } ``` **Correct:** The same POS terminal sold to a company in Tenerife, invoiced as an export. ```json { "description": "POS terminal", "quantity": 1, "unit_price": 600, "main_tax": { "type": "IVA", "percentage": 0, "regime_key": "02" }, "exemption_reason": "EXENTA_ART_21" } ``` **Related:** [TAX-023 · A software or electronic service sold to a business in the Canary Islands, Ceuta or Melilla is not subject to IVA](/rules/taxes#tax-023) [← All rules](/rules#all-rules) ## Related - [Tax classification per line](/verifactu/tax-classification) — set `exemption_reason` on each line correctly, with the full mapping from BeeL. API values to AEAT codes (S1/S2/N1/N2/E1–E6) - [Amounts and rounding](/guides/amounts-and-rounding) — how BeeL. turns quantities, prices and rates into bases, taxes and totals: precision, the three ways to price a line, per-group tax rounding, IRPF, and the amounts that are rejected - [International customers](/verifactu/international-customers) — every cross-border scenario — intra-EU B2B, B2C with OSS, exports, services to non-EU — with the exact request shape BeeL. accepts - [Regime keys](/verifactu/regime-keys) — the catalogue of VeriFactu regime codes BeeL. supports, when each one is required, and how it pairs with `exemption_reason` --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Voiding When an issued invoice can be voided, how, and what a void leaves behind. [← All rules](/rules#all-rules) A void takes out of the books an invoice that should never have been issued. It is not the way to fix an invoice whose operation did happen: that is a corrective invoice. 5 rules: 1 from the law, 3 AEAT criteria, 1 BeeL. rule. [How to read a rule](/rules#how-to-read-a-rule). ## Void or correct What to do with an issued invoice that should not stand as it is. Each row comes from the rule that decides it. | Situation | Do this | Rule | |---|---|---| | You spot the mistake before issuing: the invoice is still a draft or scheduled. | Edit or delete the draft. Nothing has been issued, so nothing needs correcting. | [LIF-001](/rules/lifecycle#lif-001) | | The invoice should never have been issued: the operation did not take place, it was a test, or it is an accidental duplicate. | Void it. Its number stays used; if a valid invoice is still due, issue it as a new one. | [VOI-001](/rules/void#voi-001) | | The operation took place, but the invoice carried an income tax withholding it should not have. | Void it and issue a new invoice without the withholding. A corrective is not the way: the withholding is not a cause for one. | [VOI-001](/rules/void#voi-001) | | The invoice already has corrective invoices. | It can no longer be voided: issue another corrective against it. | [VOI-005](/rules/void#voi-005) | | The sale happened, but the amounts, the tax or a detail on the invoice are wrong. | Issue a corrective against it: R1–R4 for a standard invoice, R5 for a simplified one. | [COR-001](/rules/corrective#cor-001) | | A corrective you already issued is itself wrong. | Issue another corrective against the original invoice, not against the corrective. | [COR-007](/rules/corrective#cor-007) | | The customer has not paid, the legal waiting period has passed and you have claimed the debt in court or by notarial demand. | Issue an `R3` corrective within the legal window and report it to AEAT. | [COR-008](/rules/corrective#cor-008) | | The customer has been declared insolvent by a court after the invoice's tax accrued, and has not paid. | Issue an `R2` corrective within the legal period and report it to AEAT. | [COR-009](/rules/corrective#cor-009) | | You grant a discount or a volume rebate after the invoice was issued. | Issue an `R1` `PARTIAL` corrective with the discount as a negative line. | [COR-011](/rules/corrective#cor-011) | | The invoice recorded the right recipient with a wrong name, tax ID or address. | Issue an `R4` `PARTIAL` corrective with the corrected `recipient` and no lines: the amounts stay as they are. | [COR-017](/rules/corrective#cor-017) | | The invoice was issued to another person, not the actual customer. | Issue a `TOTAL` corrective on it, then a new invoice to the right customer. | [COR-017](/rules/corrective#cor-017) | | The customer asks for a full invoice with their details in place of a simplified one already issued. | Exchange the simplified invoice for a full one with the exchange operation; do not correct it. | [SIM-007](/rules/simplified#sim-007) | ## VOI-001 · Void only an invoice that should never have been issued `Required` · AEAT criterion · Impact: critical · Responsibility: the issuing business. Void an invoice only when it was issued by mistake: the sale or service it describes never took place, it was a test, or it is an accidental duplicate. An invoice for an operation that did happen is not voided to fix its amounts, VAT or details; it is corrected with a corrective invoice. The one exception is a withholding that should not have been applied: the withholding is not a cause for a corrective ([COR-024](/rules/corrective#cor-024)), so that invoice is voided and issued again without it. The API asks for the confirmation once the invoice was sent or paid ([VOI-004](/rules/void#voi-004)) and refuses to void a corrected invoice ([VOI-005](/rules/void#voi-005)). **Why:** A void removes the invoice's fiscal effect altogether. Using it on a real operation, even to reissue it right after, takes a real sale out of the books; the law provides the corrective invoice for that. **Applies to:** statuses `ISSUED`, `SENT`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/void`](/invoices/voidCompanyInvoice) **Legal basis:** - RD 1007/2023 (RRSIF), art. 11.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2023-24840#a1-3) > «Procederá la generación de un registro de facturación de anulación cuando se haya emitido erróneamente una factura y sea por lo tanto necesario anular su correspondiente registro de facturación de alta.» - AEAT, Aclaraciones a dudas de los desarrolladores (v1.3), 17. Forma de proceder ante errores cometidos al facturar — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/FAQs-Desarrolladores.pdf) > «Con carácter general, todas las facturas emitidas, en la medida en que respondan a operaciones realmente efectuadas (como es el caso habitual) no pueden anularse. En el caso de que exista alguna diferencia entre lo facturado y la realidad, por ejemplo, que por un defecto de cantidades o de calidades, o por otras razones, y se deba modificar su importe, procederá la emisión de una factura rectificativa» **Incorrect:** The customer's VAT rate was wrong on an invoice for work you did deliver, so you void it and issue a new one. **Correct:** The same invoice is corrected with a corrective invoice; a duplicate fired twice by a retry is voided. ```http POST /v1/companies/{company_id}/invoices/{invoice_id}/void { "reason": "Duplicate of invoice F-2026-0142, issued twice by mistake" } ``` **Related:** [COR-001 · Wrong data on an issued invoice is fixed with a corrective](/rules/corrective#cor-001) · [COR-024 · A corrective does not change only the withholding](/rules/corrective#cor-024) · [LIF-003 · Test in the sandbox, never with real invoices](/rules/lifecycle#lif-003) · [NUM-002 · An issued number is never reused, even when the invoice is voided](/rules/numbering#num-002) · [VOI-002 · Void an issued invoice through the void operation; delete a draft](/rules/void#voi-002) · [VOI-004 · An emailed or paid invoice is voided only confirming it was issued by mistake](/rules/void#voi-004) · [VOI-005 · A corrected invoice, or a total corrective, is not voided](/rules/void#voi-005) **Explained in:** [Cancel vs amend › The 30-second decision](/verifactu/cancel-and-fix#the-30-second-decision) · [Cancel vs amend › Void (anulación)](/verifactu/cancel-and-fix#anulación-void) ## VOI-002 · Void an issued invoice through the void operation; delete a draft `Required` · BeeL. rule · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. An issued invoice is voided only with the void operation, with a reason of 10 to 500 characters, and only when it was issued by mistake ([VOI-001](/rules/void#voi-001), [VOI-004](/rules/void#voi-004)). A draft or a scheduled invoice is not voided: it is deleted, and it had no number to lose. An invoice issued to the wrong person is not voided either: it is corrected ([COR-017](/rules/corrective#cor-017)). **Why:** The void operation is what records the cancellation and, under VeriFactu, sends it to AEAT; a status change cannot. A second void of the same invoice is refused, so a retried void is safe to treat as done. **Applies to:** operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/void`](/invoices/voidCompanyInvoice), [`DELETE /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/deleteCompanyInvoice), [`PUT /v1/companies/{company_id}/invoices/{invoice_id}/status`](/invoices/setCompanyInvoiceStatus) **Error codes:** [`TRANSITION_NOT_SUPPORTED`](/errors/TRANSITION_NOT_SUPPORTED) (`400`), [`INVOICE_ALREADY_VOIDED`](/errors/INVOICE_ALREADY_VOIDED) (`409`), [`VALIDATION_ERROR`](/errors/VALIDATION_ERROR) (`422` or `400`) **Incorrect:** Setting the status to `VOIDED` with the status operation, which does not take that value: the API answers [`VALIDATION_ERROR`](/errors/VALIDATION_ERROR). ```http PUT /v1/companies/{company_id}/invoices/{invoice_id}/status { "status": "VOIDED" } ``` **Correct:** Calling the void operation with the reason, confirming it was issued by mistake. ```http POST /v1/companies/{company_id}/invoices/{invoice_id}/void { "reason": "Duplicate of invoice F-2026-0142, issued twice by mistake", "issued_in_error": true } ``` **Related:** [COR-017 · A corrective keeps the recipient, except to correct the recipient's data](/rules/corrective#cor-017) · [LIF-001 · An issued invoice is never edited or deleted](/rules/lifecycle#lif-001) · [VOI-001 · Void only an invoice that should never have been issued](/rules/void#voi-001) · [VOI-003 · A void adds a cancellation record; the original stays](/rules/void#voi-003) · [VOI-004 · An emailed or paid invoice is voided only confirming it was issued by mistake](/rules/void#voi-004) · [VOI-005 · A corrected invoice, or a total corrective, is not voided](/rules/void#voi-005) **Explained in:** [Invoice lifecycle › Voiding and correcting](/guides/invoice-lifecycle#voiding-and-correcting) ## VOI-003 · A void adds a cancellation record; the original stays `Required` · Law · Impact: medium · Checked by the API: BeeL. applies it. Voiding an invoice under VeriFactu generates a cancellation record (registro de anulación) that identifies the original by its number and issue date; the original registration record is never removed. The invoice's `verifactu.submission_status` becomes `VOIDED` once AEAT has accepted the cancellation. **Why:** AEAT keeps both records, linked. A successful void call means the cancellation was submitted, not that AEAT accepted it. **Applies to:** statuses `VOIDED`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/void`](/invoices/voidCompanyInvoice), [`GET /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/getCompanyInvoice); Invoices of a company under VeriFactu. **Legal basis:** - RD 1007/2023 (RRSIF), art. 11.2.c) y d) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2023-24840#a1-3) > «c) El número y, en su caso, serie de la factura correspondiente al registro de facturación de alta que se anule. d) La fecha de expedición de la factura correspondiente al registro de facturación de alta que se anule.» - RD 1007/2023 (RRSIF), art. 8.2.a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2023-24840#a8) > «Cualquier necesidad de corrección o anulación de los datos registrados deberá ser realizada mediante al menos un registro de facturación adicional posterior, de forma que se conserven inalterables los datos originalmente registrados.» **Incorrect:** Treating the `200` of the void call as proof that AEAT accepted the cancellation. **Correct:** After voiding, reading the invoice until its `verifactu.submission_status` is `VOIDED`. ```http GET /v1/companies/{company_id}/invoices/{invoice_id} ``` **Related:** [VOI-002 · Void an issued invoice through the void operation; delete a draft](/rules/void#voi-002) · [REC-008 · Follow submission_status and fix what AEAT rejects](/rules/records#rec-008) · [LIF-001 · An issued invoice is never edited or deleted](/rules/lifecycle#lif-001) **Explained in:** [Cancel vs amend › Did AEAT accept the cancellation?](/verifactu/cancel-and-fix#did-aeat-accept-the-cancellation) ## VOI-004 · An emailed or paid invoice is voided only confirming it was issued by mistake `Required` · AEAT criterion · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. Voiding an invoice that has already been emailed to the customer or paid requires `issued_in_error: true`: the confirmation that it was issued by mistake, because the operation never took place, it was a test, or it is an accidental duplicate. Without it the void is refused with `VOID_REQUIRES_ISSUED_IN_ERROR`. What counts is the fact, not the current status: an email in the invoice's sending history still counts after the invoice is moved back from `SENT` to `ISSUED`, and a `paid_at` still counts after it becomes `RECTIFIED`. Downloading the PDF or opening the public link does not count as delivery. Corrective invoices follow the same rule. An invoice that was neither emailed nor paid can be voided without it, though a void is only for those same cases ([VOI-001](/rules/void#voi-001)). **Why:** A void removes the invoice from the books as if it had never been issued. AEAT reads a void of an undelivered invoice as the clearest case of an invoice that should never have existed, so delivery is a sign the operation was real. Payment is not delivery, but it is also a strong sign of a real operation, and a real operation is corrected, not voided. The confirmation makes the issuer state that it was not real, instead of voiding a real sale by habit. **Applies to:** operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/void`](/invoices/voidCompanyInvoice); Any status: what counts is an email in the invoice's sending history or a `paid_at`, not the current status. **Error codes:** [`VOID_REQUIRES_ISSUED_IN_ERROR`](/errors/VOID_REQUIRES_ISSUED_IN_ERROR) (`422`) **Legal basis:** - RD 1007/2023 (RRSIF), art. 11.1 — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2023-24840#a1-3) > «Procederá la generación de un registro de facturación de anulación cuando se haya emitido erróneamente una factura y sea por lo tanto necesario anular su correspondiente registro de facturación de alta.» - AEAT, Aclaraciones a dudas de los desarrolladores (v1.3), 17. Forma de proceder ante errores cometidos al facturar, caso 2.d) — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/FAQs-Desarrolladores.pdf) > «Sobre el caso 2.d): un aspecto que puede influir en el uso de este mecanismo es si la factura expedida (con errores) ya se ha entregado o no al cliente. Si NO se hubiera entregado, este hecho favorecería la consideración de que se trata de una factura defectuosa e incorrecta que no debería existir ni llegar al cliente (una expedición "fallida") y, por lo tanto, que fuera susceptible de anularse» **Incorrect:** Voiding a paid invoice for work that was done, to issue it again with another amount: without `issued_in_error` the API answers [`VOID_REQUIRES_ISSUED_IN_ERROR`](/errors/VOID_REQUIRES_ISSUED_IN_ERROR), and with it the issuer would be declaring something false; the fix is a corrective. **Correct:** Voiding a paid duplicate charged twice by mistake, confirming it. ```http POST /v1/companies/{company_id}/invoices/{invoice_id}/void { "reason": "Duplicate of invoice F-2026-0142, issued twice by mistake", "issued_in_error": true } ``` **Related:** [VOI-001 · Void only an invoice that should never have been issued](/rules/void#voi-001) · [VOI-005 · A corrected invoice, or a total corrective, is not voided](/rules/void#voi-005) · [COR-001 · Wrong data on an issued invoice is fixed with a corrective](/rules/corrective#cor-001) **Explained in:** [Cancel vs amend › Void (anulación)](/verifactu/cancel-and-fix#anulación-void) ## VOI-005 · A corrected invoice, or a total corrective, is not voided `Required` · AEAT criterion · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed. Do not void an invoice that has live corrective invoices (issued and not voided): it was corrected, so the operation took place, and further changes go on another corrective. The void is refused with `INVOICE_HAS_LIVE_CORRECTIVES`. A `TOTAL` corrective cannot be voided either (`TOTAL_CORRECTIVE_NOT_VOIDABLE`): the invoice it rectifies was voided by it and would stay voided with nothing to offset it; if what it rectified was wrong, issue a new invoice for what should have stayed invoiced. A `PARTIAL` corrective issued by mistake can still be voided. **Why:** Correcting and voiding are exclusive ways of fixing an invoice: once correctives were used, AEAT says a cancellation record does not apply. **Applies to:** invoice types `STANDARD`, `SIMPLIFIED`, `CORRECTIVE`; statuses `RECTIFIED`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/void`](/invoices/voidCompanyInvoice) **Error codes:** [`INVOICE_HAS_LIVE_CORRECTIVES`](/errors/INVOICE_HAS_LIVE_CORRECTIVES) (`422`), [`TOTAL_CORRECTIVE_NOT_VOIDABLE`](/errors/TOTAL_CORRECTIVE_NOT_VOIDABLE) (`422`) **Legal basis:** - AEAT, Aclaraciones a dudas de los desarrolladores (v1.3), 17. Forma de proceder ante errores cometidos al facturar, caso 2.d) — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/FAQs-Desarrolladores.pdf) > «Esta forma de actuar (cuando sea posible) no implica la expedición de nuevas facturas que "contrarresten o compensen" la factura expedida por error (que son mecanismos contemplados en los procedimientos admitidos de rectificación de facturas y que, si se utilizaran, no procedería hacer un RF de anulación de la factura expedida por error).» **Incorrect:** Voiding an invoice after a `PARTIAL` corrective reduced it: the API answers [`INVOICE_HAS_LIVE_CORRECTIVES`](/errors/INVOICE_HAS_LIVE_CORRECTIVES). **Correct:** Issuing a `TOTAL` corrective on it instead: it rectifies what is still invoiced, the partial included ([COR-023](/rules/corrective#cor-023)). **Related:** [VOI-001 · Void only an invoice that should never have been issued](/rules/void#voi-001) · [VOI-004 · An emailed or paid invoice is voided only confirming it was issued by mistake](/rules/void#voi-004) · [COR-023 · A corrective never rectifies more than was invoiced](/rules/corrective#cor-023) · [COR-007 · A wrong corrective is fixed against the original, not corrected itself](/rules/corrective#cor-007) **Explained in:** [Cancel vs amend](/verifactu/cancel-and-fix) [← All rules](/rules#all-rules) ## Related - [Cancel vs amend](/verifactu/cancel-and-fix) — decide between cancelling an invoice (void) and issuing a corrective invoice, two operations with different fiscal weight - [Invoice lifecycle](/guides/invoice-lifecycle) — every invoice status, which operations each one allows, and the difference between the fiscal steps (issue, void, correct) and the commercial ones (sent, paid) --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Change your access over a managed account API Reference Updates the `access_level` you keep over an account you provisioned. - **Raising it:** only possible while the account is unclaimed. Once its holder has taken ownership you may keep or lower your access, but only they can raise it. - **Billing:** the level never affects it — you pay for the account's subscription at any level. - **`OPERATE`:** issuing invoices on the holder's behalf in Live additionally requires a signed fiscal representation from them. In Test you can issue from the start. - **Entitlement:** requires `manage_accounts`. ## PATCH /v1/accounts/{account_id}/access-level **Change your access over a managed account** Updates the `access_level` you keep over an account you provisioned. - **Raising it:** only possible while the account is unclaimed. Once its holder has taken ownership you may keep or lower your access, but only they can raise it. - **Billing:** the level never affects it — you pay for the account's subscription at any level. - **`OPERATE`:** issuing invoices on the holder's behalf in Live additionally requires a signed fiscal representation from them. In Test you can issue from the start. - **Entitlement:** requires `manage_accounts`. ### Authentication Accepts any of: - `ApiKeyAuth` (HTTP bearer, token format `beel_sk_*`) ### Parameters - **account_id** (required) in path `string`: Identifier (UUID) of an account you manage. An account you do not manage answers exactly like one that does not exist, so its existence is never disclosed. ### Request Body Required. **Content `application/json`:** - **access_level** (required) `AccessLevel`: How much access an actor has to an account or a company. The same three values are used everywhere access is granted or reported — whether the actor is a member of the account or a provisioner managing it on someone's behalf. `NONE` — no access to the data. `VIEW` — read invoices, customers, products, series and fiscal data. `OPERATE` — everything in `VIEW`, plus creating and editing them. In Live, issuing invoices for an account you manage additionally requires a signed fiscal representation from the account holder (see `/v1/companies/{company_id}/representation`). In Test you can issue from the start. Access level never affects billing: whoever provisioned an account pays for its subscription regardless of the level they keep over it. **Example `change_access_level_view`** — Downgrade to read-only access: ```json { "access_level": "VIEW" } ``` ### Responses #### 204: Access updated. #### 400: Bad request. From a dashboard session, a `BeeL-Environment` header whose value is not a known environment answers `ENVIRONMENT_HEADER_INVALID`, with the header named in `error.details` (`{"BeeL-Environment": "invalid"}`); it is never read as production. `BUSINESS_RULE_VIOLATION` is the generic answer to an operation the resource does not admit in its current state when that state has no code of its own. It carries no `details`; read the resource again before retrying. **Content `application/json`:** - **success** (required) `boolean`: No description (example: false) - **error** (required) `ErrorDetail` - **meta** `ResponseMeta` - **type** `string` (uri): Stable URI that identifies the problem type and where the integrator will find its documentation. (example: "https://docs.beel.es/errors/INVOICE_NO_LINES") - **title** `string`: Short summary of the problem type. Stable between occurrences of the same `type`. (example: "INVOICE_NO_LINES") - **detail** `string`: Specific message for this occurrence, localized according to `Accept-Language` (`es`, `en`, `ca`); defaults to English. Matches the legacy `error.message`. (example: "The invoice must have at least one line") - **instance** `string` (uri-reference): URI that identifies the specific occurrence of the problem — typically the path of the affected resource. (example: "/v1/invoices/abc-123") **Example:** ```json { "success": false, "error": { "code": "BAD_REQUEST", "message": "Invalid request" }, "meta": { "timestamp": "2025-01-15T10:30:00Z", "request_id": "4bf92f3577b34da6a3ce929d0e0e4736" } } ``` #### 401: Missing or invalid authentication. Like every other error, `message`/`detail` is localized according to `Accept-Language` (`es`, `en`, `ca`); defaults to English when the header is missing or asks for none of those. **Content `application/json`:** - **success** (required) `boolean`: No description (example: false) - **error** (required) `ErrorDetail` - **meta** `ResponseMeta` - **type** `string` (uri): Stable URI that identifies the problem type and where the integrator will find its documentation. (example: "https://docs.beel.es/errors/INVOICE_NO_LINES") - **title** `string`: Short summary of the problem type. Stable between occurrences of the same `type`. (example: "INVOICE_NO_LINES") - **detail** `string`: Specific message for this occurrence, localized according to `Accept-Language` (`es`, `en`, `ca`); defaults to English. Matches the legacy `error.message`. (example: "The invoice must have at least one line") - **instance** `string` (uri-reference): URI that identifies the specific occurrence of the problem — typically the path of the affected resource. (example: "/v1/invoices/abc-123") **Example:** ```json { "success": false, "error": { "code": "UNAUTHORIZED", "message": "Authentication is required to access this resource" }, "meta": { "timestamp": "2025-01-15T10:30:00Z", "request_id": "4bf92f3577b34da6a3ce929d0e0e4736" } } ``` #### 403: Every cause listed under the plain `403`, plus `LIVE_CREDENTIAL_REQUIRED` when the call is made with a test API key (`beel_sk_test_…`), and `MANAGED_SCOPE_ELEVATION_REQUIRES_OWNER` when the request raises your access over an account its holder has already claimed: from then on only they can raise it. **Content `application/json`:** - **success** (required) `boolean`: No description (example: false) - **error** (required) `ErrorDetail` - **meta** `ResponseMeta` - **type** `string` (uri): Stable URI that identifies the problem type and where the integrator will find its documentation. (example: "https://docs.beel.es/errors/INVOICE_NO_LINES") - **title** `string`: Short summary of the problem type. Stable between occurrences of the same `type`. (example: "INVOICE_NO_LINES") - **detail** `string`: Specific message for this occurrence, localized according to `Accept-Language` (`es`, `en`, `ca`); defaults to English. Matches the legacy `error.message`. (example: "The invoice must have at least one line") - **instance** `string` (uri-reference): URI that identifies the specific occurrence of the problem — typically the path of the affected resource. (example: "/v1/invoices/abc-123") **Example:** ```json { "success": false, "error": { "code": "MANAGED_SCOPE_ELEVATION_REQUIRES_OWNER", "message": "Only the account holder can raise management access over their account once it has been claimed" }, "meta": { "timestamp": "2025-01-15T10:30:00Z", "request_id": "4bf92f3577b34da6a3ce929d0e0e4736" } } ``` #### 429: Rate limit exceeded. `RATE_LIMIT_EXCEEDED` when the request rate of your credential is over its limit; `TOO_MANY_REQUESTS` when an email the operation sends is held back because too many went out to that recipient in a short time. Either way, retry after the `Retry-After` seconds. `QUOTA_EXCEEDED` is the other `429`: the operation would go over a quota of your plan for the current period (issued invoices, for instance). Retrying does not help until the quota resets or the plan changes. `error.details` carries `feature_code`, `current_usage`, `quota_limit` and `reset_date`, and `RateLimit-Reset` the seconds until the reset when it is known. **Headers:** - `Retry-After` `integer`: Seconds until the rate limit resets - `RateLimit-Limit` `integer`: Maximum requests allowed in the window - `RateLimit-Remaining` `integer`: Remaining requests in the current window - `RateLimit-Reset` `integer`: Seconds until the current window resets **Content `application/json`:** - **success** (required) `boolean`: No description (example: false) - **error** (required) `ErrorDetail` - **meta** `ResponseMeta` - **type** `string` (uri): Stable URI that identifies the problem type and where the integrator will find its documentation. (example: "https://docs.beel.es/errors/INVOICE_NO_LINES") - **title** `string`: Short summary of the problem type. Stable between occurrences of the same `type`. (example: "INVOICE_NO_LINES") - **detail** `string`: Specific message for this occurrence, localized according to `Accept-Language` (`es`, `en`, `ca`); defaults to English. Matches the legacy `error.message`. (example: "The invoice must have at least one line") - **instance** `string` (uri-reference): URI that identifies the specific occurrence of the problem — typically the path of the affected resource. (example: "/v1/invoices/abc-123") **Example:** ```json { "success": false, "error": { "code": "RATE_LIMIT_EXCEEDED", "message": "Too many requests. Please try again in 60 seconds." }, "meta": { "timestamp": "2025-01-15T10:30:00Z", "request_id": "4bf92f3577b34da6a3ce929d0e0e4736" } } ``` #### 500: Internal server error **Content `application/json`:** - **success** (required) `boolean`: No description (example: false) - **error** (required) `ErrorDetail` - **meta** `ResponseMeta` - **type** `string` (uri): Stable URI that identifies the problem type and where the integrator will find its documentation. (example: "https://docs.beel.es/errors/INVOICE_NO_LINES") - **title** `string`: Short summary of the problem type. Stable between occurrences of the same `type`. (example: "INVOICE_NO_LINES") - **detail** `string`: Specific message for this occurrence, localized according to `Accept-Language` (`es`, `en`, `ca`); defaults to English. Matches the legacy `error.message`. (example: "The invoice must have at least one line") - **instance** `string` (uri-reference): URI that identifies the specific occurrence of the problem — typically the path of the affected resource. (example: "/v1/invoices/abc-123") **Example:** ```json { "success": false, "error": { "code": "INTERNAL_ERROR", "message": "Internal server error" }, "meta": { "timestamp": "2025-01-15T10:30:00Z", "request_id": "4bf92f3577b34da6a3ce929d0e0e4736" } } ``` #### default: Any status code the operation does not list above. Every operation declares it, so a generated client always has a branch to fall into and never loses the cause of a failure it did not anticipate. This is where the transport-level answers land — `405`, `406`, `415` and `429` — together with any status a future version of the API starts returning. All of them carry the same error envelope as the codes listed explicitly, so `error.code` is what tells them apart: switching on the status code alone is not enough. See «Transport-level errors» in the API description for when each one is produced. A `402` carrying `SUBSCRIPTION_REQUIRED` lands here when the account has no active subscription. `error.details` says why and what to do: `current_status` (absent if it never had one), `required_permission` and `action`. A `503` carrying `SERVICE_UNAVAILABLE` lands here too, with a `Retry-After` header: a dependency of BeeL itself (the database, the email provider) was momentarily unavailable and nothing was done. Retry after those seconds. A `502` carrying `EXTERNAL_SERVICE_ERROR` also lands here: an outbound integration the operation depends on failed or did not answer in time. It is a transient condition — retry with the same `Idempotency-Key` where the operation accepts one. One exception to the envelope: a failure of the network edge that never reaches the application (`502`, `503`, `504`, `524`) is generated by Cloudflare and its body is not BeeL's — it may not even be JSON. Treat those as "no answer", and retry. **Content `application/json`:** - **success** (required) `boolean`: No description (example: false) - **error** (required) `ErrorDetail` - **meta** `ResponseMeta` - **type** `string` (uri): Stable URI that identifies the problem type and where the integrator will find its documentation. (example: "https://docs.beel.es/errors/INVOICE_NO_LINES") - **title** `string`: Short summary of the problem type. Stable between occurrences of the same `type`. (example: "INVOICE_NO_LINES") - **detail** `string`: Specific message for this occurrence, localized according to `Accept-Language` (`es`, `en`, `ca`); defaults to English. Matches the legacy `error.message`. (example: "The invoice must have at least one line") - **instance** `string` (uri-reference): URI that identifies the specific occurrence of the problem — typically the path of the affected resource. (example: "/v1/invoices/abc-123") **Example:** ```json { "success": false, "error": { "code": "UNSUPPORTED_MEDIA_TYPE", "message": "Unsupported media type: text/plain. Supported: application/json" }, "meta": { "timestamp": "2025-01-15T10:30:00Z", "request_id": "4bf92f3577b34da6a3ce929d0e0e4736" } } ``` --- # Related Schema Definitions ## ChangeAccessLevelRequest Updates the access you hold over an account you provisioned. - **access_level** (required) `AccessLevel`: How much access an actor has to an account or a company. The same three values are used everywhere access is granted or reported — whether the actor is a member of the account or a provisioner managing it on someone's behalf. `NONE` — no access to the data. `VIEW` — read invoices, customers, products, series and fiscal data. `OPERATE` — everything in `VIEW`, plus creating and editing them. In Live, issuing invoices for an account you manage additionally requires a signed fiscal representation from the account holder (see `/v1/companies/{company_id}/representation`). In Test you can issue from the start. Access level never affects billing: whoever provisioned an account pays for its subscription regardless of the level they keep over it. ## AccessLevel How much access an actor has to an account or a company. The same three values are used everywhere access is granted or reported — whether the actor is a member of the account or a provisioner managing it on someone's behalf. `NONE` — no access to the data. `VIEW` — read invoices, customers, products, series and fiscal data. `OPERATE` — everything in `VIEW`, plus creating and editing them. In Live, issuing invoices for an account you manage additionally requires a signed fiscal representation from the account holder (see `/v1/companies/{company_id}/representation`). In Test you can issue from the start. Access level never affects billing: whoever provisioned an account pays for its subscription regardless of the level they keep over it. Type: `string` — one of: NONE, VIEW, OPERATE ## ErrorResponse Error response shared by all BeeL. APIs. The payload carries **two contracts at once** (additive, non-breaking): - **Legacy** (`success`, `error.{code,message,details}`, `meta`) — kept intact for existing consumers. - **RFC 9457** (`type`, `title`, `detail`, `instance`) — new fields for integrators following Problem Details for HTTP APIs. The `type` URI is the stable, shareable link to the error's documentation page (e.g. `https://docs.beel.es/errors/{code}`). Future migration: the legacy fields will be deprecated via `Deprecation`/`Sunset` headers after a sufficient adoption window, and the response Content-Type will move to `application/problem+json`. - **success** (required) `boolean`: No description (example: false) - **error** (required) `ErrorDetail` - **meta** `ResponseMeta` - **type** `string` (uri): Stable URI that identifies the problem type and where the integrator will find its documentation. (example: "https://docs.beel.es/errors/INVOICE_NO_LINES") - **title** `string`: Short summary of the problem type. Stable between occurrences of the same `type`. (example: "INVOICE_NO_LINES") - **detail** `string`: Specific message for this occurrence, localized according to `Accept-Language` (`es`, `en`, `ca`); defaults to English. Matches the legacy `error.message`. (example: "The invoice must have at least one line") - **instance** `string` (uri-reference): URI that identifies the specific occurrence of the problem — typically the path of the affected resource. (example: "/v1/invoices/abc-123") ## ErrorDetail - **code** (required) `string`: No description (example: "VALIDATION_ERROR") - **message** (required) `string`: No description (example: "The provided data is not valid") - **details** `object`: No description (example: {"field":"specific error message"}) ## ResponseMeta - **timestamp** `string` (date-time): No description (example: "2025-01-15T10:30:00Z") - **request_id** `string`: No description (example: "4bf92f3577b34da6a3ce929d0e0e4736") --- Full OpenAPI spec: https://docs.beel.es/api/openapi --- # Issue a claim token API Reference Issues a single-use `claim_token`, and the `claim_url` built from it, so the account's holder can set a password and take ownership. - **`email`:** send it when the account has no holder yet — the person is created by this call. Omit the body to re-issue the token for the holder the account already has. An `email` that differs from the existing holder's is rejected rather than replacing them. - **Lifetime:** tokens last 30 days, and only the last one issued is live. Issuing again invalidates the previous token, so the old link stops working the moment you ask for a new one. - **Not an invitation:** this hands the account itself over to its holder. To add a further person to an account that already has one, invite them with `POST /v1/accounts/{account_id}/invitations`. - **Entitlement:** requires `manage_accounts`. ## POST /v1/accounts/{account_id}/claim-tokens **Issue a claim token** Issues a single-use `claim_token`, and the `claim_url` built from it, so the account's holder can set a password and take ownership. - **`email`:** send it when the account has no holder yet — the person is created by this call. Omit the body to re-issue the token for the holder the account already has. An `email` that differs from the existing holder's is rejected rather than replacing them. - **Lifetime:** tokens last 30 days, and only the last one issued is live. Issuing again invalidates the previous token, so the old link stops working the moment you ask for a new one. - **Not an invitation:** this hands the account itself over to its holder. To add a further person to an account that already has one, invite them with `POST /v1/accounts/{account_id}/invitations`. - **Entitlement:** requires `manage_accounts`. ### Authentication Accepts any of: - `ApiKeyAuth` (HTTP bearer, token format `beel_sk_*`) ### Parameters - **account_id** (required) in path `string`: Identifier (UUID) of an account you provisioned. An account you did not provision answers exactly like one that does not exist, so its existence is never disclosed. - **Idempotency-Key** (optional) in header `string`: Idempotency key to prevent duplicates in sensitive operations. - Any unique client-generated string (e.g. an order id). A UUID also works but is not required - Allowed characters: letters, digits, `_` and `-` (max 255 chars) - Retrying with the same key replays the first response when it was a success (2xx) or a server error (5xx): same status and body, plus the header `Idempotency-Replay: true`. After a 5xx other than 503, check whether the operation took effect before retrying with a **new** key - After a `503`, retry first with the **same** key. If the response carries `Idempotency-Replay: true`, the operation may have taken effect: check the resource before using a new key. Without that header, the retry runs the operation once - A 4xx is not stored: the key is released, so the corrected request can reuse it - Stored responses expire 24 hours after processing The key is scoped per user and environment, and bound to the request body, so retrying after a network timeout replays the stored response instead of repeating the operation. | Status | Code | When | |---|---|---| | `400` | `INVALID_IDEMPOTENCY_KEY` | The key breaks the format rules above. | | `409` | `IDEMPOTENCY_KEY_PROCESSING` | The first request is still in flight. Wait for the `Retry-After` seconds (2) and retry with the same key. | | `409` | `IDEMPOTENCY_KEY_MISMATCH` | The key was already used with a **different** body. Use a new key. | ### Request Body **Content `application/json`:** - **email** `string` (email): The holder's email address, used as their login. **Required when the account has no holder** (else `422`). If the account already has one, it must match theirs — a different address returns `409 CLAIM_TOKEN_HOLDER_MISMATCH` rather than silently replacing the holder. - **language**: Preferred language for a holder created by this call. Defaults to `es`. Ignored when the account already has a holder. **Example `create_claim_token_new_holder`** — Name the holder of an account that has none: ```json { "email": "maria.lopez@example.com", "language": "es" } ``` ### Responses #### 201: Token issued. Any previously issued token for this account is now invalid. Send an `Idempotency-Key` header to get the same token back on a retry instead of a fresh one. **Headers:** - `Location` `string`: The claim link itself (`claim_url`): the created resource is the single-use claim link, which has no canonical GET — it is shown once. **Content `application/json`:** - **success** (required) `boolean`: No description (example: true) - **data** (required): The payload. An object for a single resource; an object holding the named collection (and its `pagination`) for a listing. Never a bare array at this level in v1. - **meta** `ResponseMeta` - **data** (required) `ClaimTokenResult`: A freshly issued claim token. `claim_token` is shown **once** and cannot be read back; any token issued earlier for this account is now invalid. #### 401: Missing or invalid authentication. Like every other error, `message`/`detail` is localized according to `Accept-Language` (`es`, `en`, `ca`); defaults to English when the header is missing or asks for none of those. **Content `application/json`:** - **success** (required) `boolean`: No description (example: false) - **error** (required) `ErrorDetail` - **meta** `ResponseMeta` - **type** `string` (uri): Stable URI that identifies the problem type and where the integrator will find its documentation. (example: "https://docs.beel.es/errors/INVOICE_NO_LINES") - **title** `string`: Short summary of the problem type. Stable between occurrences of the same `type`. (example: "INVOICE_NO_LINES") - **detail** `string`: Specific message for this occurrence, localized according to `Accept-Language` (`es`, `en`, `ca`); defaults to English. Matches the legacy `error.message`. (example: "The invoice must have at least one line") - **instance** `string` (uri-reference): URI that identifies the specific occurrence of the problem — typically the path of the affected resource. (example: "/v1/invoices/abc-123") **Example:** ```json { "success": false, "error": { "code": "UNAUTHORIZED", "message": "Authentication is required to access this resource" }, "meta": { "timestamp": "2025-01-15T10:30:00Z", "request_id": "4bf92f3577b34da6a3ce929d0e0e4736" } } ``` #### 403: Authenticated but not allowed. Fourteen causes shared by every operation, told apart by `error.code`; an operation that adds a cause of its own names it in its `403`. You can branch on them exhaustively. - `INSUFFICIENT_SCOPE` — the credential lacks a scope the operation requires; `error.details.missing_scopes` names them as a single comma-separated string (for example `"invoices:write,customers:read"`), not as an array; `required_scopes` has the same shape and lists every scope the operation needs. Retrying will not help: mint a key that holds them. - `COMPANY_READ_ONLY` — the scope is there, but your access level over that NIF only lets you read it. - `ACCOUNT_MANAGEMENT_FORBIDDEN` — the scope is there, but your role over the account, or the management relationship you hold over it, does not cover this operation. - `ACCOUNT_NOT_ACCESSIBLE` — the account is not yours to reach, which is also the answer when it does not exist, so existence is never disclosed. - `ACTIVE_COMPANY_NOT_ACCESSIBLE` — the same, for a NIF: the company in the path, or the one named by `BeeL-Active-Company`, is not one this credential may reach — and again, this is also the answer when it does not exist. - `COMPANY_ACCESS_REVOKED` — your access to the NIF was withdrawn while the request was already in flight, so the write was rejected and nothing was recorded. Retrying will not help until the access is granted again. - `LIVE_CREDENTIAL_REQUIRED` — the operation changes the real account and the call came from a test API key (`beel_sk_test_…`). Use your live key or the dashboard. - `FEATURE_NOT_AVAILABLE` — your subscription does not include the entitlement the operation needs; `error.details.feature_code` names it. This gate runs **before** the scope gate, so for such an operation you never see `INSUFFICIENT_SCOPE` first. - `NO_ACTIVE_ACCOUNT` — the credential does not resolve to an account, so no scope can be evaluated against one. Fail-closed, not a permission that can be granted to you. - `OPERATION_REQUIRES_SESSION` — the operation is available only from the web session; no API key and no OAuth2 token can perform it, whatever scopes it holds. - `OPERATION_REQUIRES_API_KEY` — the reverse: the operation needs a scope that only an API key can hold (such as `accounts:write`), so a dashboard session never satisfies it. - `API_KEY_LIVE_NOT_AVAILABLE` — the call came with a live credential (a `beel_sk_live_…` API key, or an OAuth2 token issued without the `sandbox` scope) and the account has no Live mode yet. It is never degraded to Test: use test credentials, or activate Live first. - `ACCOUNT_REQUIRES_FOCUS_SWITCH` — dashboard session only: you are a member of the account in the path, but it is not the account in focus. Switch focus to it and retry. - `REQUEST_BLOCKED` — the edge security filter stopped the request before the API saw its body, usually because a text field carries something that looks like markup or a script (HTML tags, `