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.
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.
19 rules: 8 from the law, 9 AEAT criteria, 2 BeeL. rules. How to read a rule.
Apply the VAT rate in force when the operation took place
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.
- Responsibility
- Responsibility: the issuing business.
- Applies to
- Operations
createCompanyInvoicepatchCompanyInvoicecreateCompanyCorrectiveInvoiceLines taxed with IVA (main_tax.type: IVA).
Legal basisLey 37/1992 del IVA, art. 90.Dos
«Dos. El tipo impositivo aplicable a cada operación será el vigente en el momento del devengo.»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.
Sending operation_date with the June date and the rate that applied in June on each line.
{ "operation_date": "2026-06-18", "lines": [{ "description": "Supply", "quantity": 1, "unit_price": 100, "main_tax": { "type": "IVA", "percentage": 21 } }] }Reverse-charge operations are invoiced without charging VAT
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. 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.
- Responsibility
- Checked by the API: a request that breaks it is rejected with the error codes listed.
- Applies to
- Types
STANDARDCORRECTIVEOperations where the recipient is the taxpayer (inversión del sujeto pasivo). - Error codes
REVERSE_CHARGE_CASE_NOT_SUPPORTED422
Legal basisLey 37/1992 del IVA, art. 84.Uno.2.º a) · Ley 37/1992 del IVA, art. 84.Uno.2.º b) · Ley 37/1992 del IVA, art. 84.Uno.2.º c) · Ley 37/1992 del IVA, art. 84.Uno.2.º c) · Ley 37/1992 del IVA, art. 84.Uno.2.º c) · Ley 37/1992 del IVA, art. 84.Uno.2.º c) · Ley 37/1992 del IVA, art. 84.Uno.2.º c) · Ley 37/1992 del IVA, art. 84.Uno.2.º c) · Ley 37/1992 del IVA, art. 84.Uno.2.º c) · Ley 37/1992 del IVA, art. 84.Uno.2.º c) · Ley 37/1992 del IVA, art. 84.Uno.2.º d) · Ley 37/1992 del IVA, art. 84.Uno.2.º e) · Ley 37/1992 del IVA, art. 84.Uno.2.º f) · Ley 37/1992 del IVA, art. 84.Uno.2.º g) · Real Decreto 1619/2012, Reglamento de facturación, art. 6.1 m)
«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.»«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.»«c) Cuando se trate de:»«– 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.»«– Las operaciones de selección, corte, fragmentación y prensado que se efectúen sobre los productos citados en el guion anterior.»«– Entregas de desechos, desperdicios o recortes de plástico.»«– Entregas de desperdicios o desechos de papel, cartón o vidrio.»«– Entregas de desperdicios o artículos inservibles de trapos, cordeles, cuerdas o cordajes.»«– 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.»«En todo caso, se considerarán comprendidas en los párrafos anteriores las entregas de los materiales definidos en el anexo de esta ley.»«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»«e) Cuando se trate de las siguientes entregas de bienes inmuebles:»«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.»«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.»«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».»A contractor invoicing construction work to the developer charges 21 % VAT on the line.
The line goes at 0 % with the reverse-charge reason of its case.
{ "description": "Construction work, phase 2", "quantity": 1, "unit_price": 25000, "main_tax": { "type": "IVA", "percentage": 0 }, "exemption_reason": "ISP_ART_84_2_F" }Reverse-charge lines carry no tax and never go on a simplified invoice
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.
- Responsibility
- Checked by the API: a request that breaks it is rejected with the error codes listed.
- Applies to
- Types
STANDARDSIMPLIFIEDCORRECTIVELines classified as reverse charge (exemption_reasonISP_ART_84_2_*).
Legal basisAEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.4 CalificacionOperacion
«Si CalificacionOperacion es “S2”, TipoFactura solo puede ser “F1”, “F3”, “R1”, “R2”, “R3” y “R4”. - Cuando CalificacionOperacion sea “S2”: ✓ TipoImpositivo = 0. [...] ✓ CuotaRepercutida = 0.»A simplified invoice with a reverse-charge line: the API answers SIMPLIFICADA_FORBIDS_ISP.
A standard invoice to the identified business recipient, with the line at 0 % and its reverse-charge reason.
Intra-EU supplies of goods are exempt only with the buyer's EU VAT number
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.
- Responsibility
- Checked by the API: a request that breaks it is rejected with the error codes listed.
- Applies to
- Types
STANDARDCORRECTIVEGoods shipped to a business in another EU Member State (exemption_reason: EXENTA_ART_25). - Error codes
EXEMPTION_REQUIRES_RECIPIENT_ID_TYPE400
Legal basisLey 37/1992 del IVA, art. 25.Uno · AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.5.1 OperacionExenta E5
«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.»«si OperacionExenta es igual a “E5”, sólo deberá existir la agrupación IDOtro cuando se cumplimente el bloque “Destinatario”.»Invoicing goods to a French company as exempt with the recipient identified only by name: the API answers EXEMPTION_REQUIRES_RECIPIENT_ID_TYPE.
Identifying the customer with its EU VAT number as alternative_id of type NIF-IVA, after checking that the number is valid.
Exempt and non-subject lines carry no VAT rate
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.
- Responsibility
- Checked by the API: a request that breaks it is rejected with the error codes listed.
- Applies to
- Lines with an
exemption_reason(exempt, non-subject or reverse charge). - Error codes
LINE_EXEMPTION_WITH_TAX,INVALID_IVA_SURCHARGE_PAIR422
Legal basisAEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.4 y 3.1.3.15.5
«Si el campo OperacionExenta está cumplimentado no se pueden informar ninguno de estos campos: TipoImpositivo, CuotaRepercutida, TipoRecargoEquivalencia y CuotaRecargoEquivalencia.»A training course marked EXENTA_ART_20 sent at 21 %: the API answers LINE_EXEMPTION_WITH_TAX.
The same line at 0 % with its exemption reason.
{ "description": "Vocational training course", "quantity": 1, "unit_price": 400, "main_tax": { "type": "IVA", "percentage": 0 }, "exemption_reason": "EXENTA_ART_20" }Services to a business abroad are not subject to Spanish VAT
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.
- Responsibility
- Responsibility: the issuing business.
- Applies to
- Types
STANDARDCORRECTIVEServices to a business customer established outside Spain, general rule.
Legal basisLey 37/1992 del IVA, art. 69.Uno.1.º · RD 1619/2012 (Reglamento de facturación), art. 6.1.m) · RD 1619/2012 (Reglamento de facturación), art. 4.4.d)
«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»«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».»«d) Las entregas de bienes o prestaciones de servicios a que se refiere el artículo 2.3.b) b').»A software consultancy invoices a German company at 21 % Spanish VAT.
The line goes at 0 % with exemption_reason: NO_SUJETA_LOCALIZACION and the customer is identified with its EU VAT number.
Sales declared through OSS use regime key 17
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.
- Responsibility
- Responsibility: the issuing business. The API also answers the error codes listed.
- 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
Legal basisAEAT, Preguntas frecuentes SIF y VERI*FACTU, Registros de facturación: alta (OSS) · Ley 37/1992 del IVA, art. 73.Uno
«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).»«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»An online shop above the OSS threshold invoices a consumer in Italy at 21 % under the general regime 01.
The line goes with regime key 17 and the Italian VAT rate, without exemption_reason.
Disbursements go as SUPLIDO lines, without tax
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: 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.
- Responsibility
- Checked by the API: a request that breaks it is rejected with the error codes listed.
- Applies to
- Amounts paid on behalf of the customer (disbursements, *suplidos*).
Legal basisAEAT, Preguntas frecuentes SIF y VERI*FACTU, Registros de facturación: alta (suplidos) · AEAT, Aclaraciones a dudas de los desarrolladores (v1.3), 22 · Ley 37/1992 del IVA, art. 78.Tres.3.º
«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%).»«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.»«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.»An accounting firm (*gestoría*) adds the registry fee it paid for the client as a normal line at 21 %.
The fee goes as a SUPLIDO line.
{ "line_type": "SUPLIDO", "description": "Registry fee paid on your behalf", "quantity": 1, "unit_price": 35.20 }RelatedTAX-009
Explained inDisbursements (suplidos)
IRPF withholding is not part of the total AEAT receives
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.
- Responsibility
- Checked by the API: BeeL. applies it.
- Applies to
- Invoices with IRPF withholding, under VeriFactu.
Legal basisAEAT, Preguntas frecuentes SIF y VERI*FACTU, Registros de facturación: alta (retenciones)
«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).»Flagging as a mismatch an invoice whose QR says 121.00 while the customer pays 106.00 after a 15 % withholding.
Reconciling payments against the amount payable, and the AEAT record against the total before withholding.
Set the IRPF withholding when the customer must withhold
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.
- Responsibility
- Responsibility: your integration. The API also answers the error codes listed.
- Applies to
- Types
STANDARDCORRECTIVEProfessionals invoicing a business or professional that has to withhold IRPF. - Error codes
INVALID_IRPF422,SIMPLIFICADA_FORBIDS_IRPF422
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.
The line carries the withholding.
{ "description": "Consulting, September", "quantity": 1, "unit_price": 1000, "main_tax": { "type": "IVA", "percentage": 21 }, "irpf_rate": 15 }Explained inAmounts and rounding › IRPF
The tax and the billing record are expressed in euros
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.
- Responsibility
- Checked by the API: BeeL. applies it.
- Applies to
- Every invoice.
Legal basisRD 1619/2012 (Reglamento de facturación), art. 12.1 · RD 1007/2023 (RRSIF), art. 10.2
«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.»«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.»Expecting BeeL. to register a dollar invoice and convert it for AEAT.
Converting the price to euros before sending it, as TAX-013 says.
RelatedTAX-013
Explained inAmounts and rounding › Precision
Send every amount in euros
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.
- Responsibility
- Responsibility: your integration.
- Applies to
- Operations
createCompanyInvoicepatchCompanyInvoicecreateCompanyCorrectiveInvoice
Passing through a Stripe charge of 100 USD as unit_price: 100.
Converting it first and sending the euro amount, with the original amount in notes.
{ "notes": "Original charge: 100.00 USD", "lines": [{ "description": "Subscription, September", "quantity": 1, "unit_price": 92.40, "main_tax": { "type": "IVA", "percentage": 21 } }] }RelatedTAX-012
Explained inAmounts and rounding › Precision
Only the VAT rates AEAT accepts on the operation date
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.
- Responsibility
- Checked by the API: a request that breaks it is rejected with the error codes listed.
- Applies to
- Operations
createCompanyInvoicepatchCompanyInvoicecreateCompanyCorrectiveInvoiceissueCompanyInvoiceSubject, non-exempt lines taxed with IVA. - Error codes
INVALID_PERCENTAGE,VAT_RATE_NOT_ACCEPTED_ON_DATE422
Legal basisAEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.1 TipoImpositivo · AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.1 TipoImpositivo · AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.1 TipoImpositivo · AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.1 TipoImpositivo
«Solo se permiten TipoImpositivo = 0; 2; 4; 5; 7,5; 10 y 21 (valores que indican el tanto por ciento).»«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.»«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.»«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»A line at 5 % issued today without operation_date: the API answers VAT_RATE_NOT_ACCEPTED_ON_DATE. A line at 16 % answers INVALID_PERCENTAGE.
A line at 5 % for a supply of March 2024, with its operation_date.
{ "operation_date": "2024-03-12", "lines": [{ "description": "Electricity, February 2024", "quantity": 1, "unit_price": 100, "main_tax": { "type": "IVA", "percentage": 5 } }] }Regime key 08 means not subject to the line's tax
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
08with the non-subject classification N2 and rejects the record otherwise, after the invoice already has its number. - Responsibility
- Checked by the API: a request that breaks it is rejected with the error codes listed.
- Applies to
- Operations
createCompanyInvoicepatchCompanyInvoiceissueCompanyInvoicecreateCompanyRecurringInvoiceIVA and IGIC lines with regime key08. - Error codes
REGIME_KEY_CLASSIFICATION_NOT_ACCEPTED422
Legal basisAEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.6.6 ClaveRegimen 08 · Orden HAC/1177/2024, anexo, lista L8B
«Si ClaveRegimen = “08”, CalificacionOperacion tiene que ser “N2” y siempre debe ir relleno.»«Operaciones sujetas al IPSI/ IVA (Impuesto sobre la Producción, los Servicios y la Importación/ Impuesto sobre el Valor Añadido).»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.
{ "description": "Sale", "quantity": 1, "unit_price": 100, "main_tax": { "type": "IGIC", "percentage": 7, "regime_key": "08" } }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.
{ "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" }Explained inRegime keys
Regime keys 03, 06 and 14 are not accepted
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, 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
06or14without its data is rejected by AEAT after the invoice already has its number. - Responsibility
- Checked by the API: a request that breaks it is rejected with the error codes listed.
- Applies to
- Operations
createCompanyInvoicepatchCompanyInvoiceissueCompanyInvoicecreateCompanyRecurringInvoiceupdateTaxConfigurationupdateCompanyTaxConfigurationIVA and IGIC lines with regime key03,06or14. - Error codes
REGIME_KEY_NOT_SUPPORTED422
Legal basisReal Decreto 1619/2012, Reglamento de facturación, art. 6.1 o) · Real Decreto 1619/2012, Reglamento de facturación, art. 16.2 c) · AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.6.4 ClaveRegimen 06 · AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.6.9 ClaveRegimen 14
«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».»«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.»«Si ClaveRegimen es igual a “06”: ✓ Se validará que TipoFactura sea distinto de “F2”, “F3”, “R5”. ✓ Campo BaseImponibleACoste deberá estar cumplimentado.»«FechaOperacion, campo de cumplimentación obligatoria y posterior a fecha de expedición.»A line with regime key 03 or 14: the API answers REGIME_KEY_NOT_SUPPORTED.
Invoice the operation under the key that fits it, such as 01.
Special regime keys carry the classification AEAT requires
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.
- Responsibility
- Checked by the API: a request that breaks it is rejected with the error codes listed.
- Applies to
- Operations
createCompanyInvoicepatchCompanyInvoiceissueCompanyInvoicecreateCompanyRecurringInvoiceIVA and IGIC lines with regime key04,10or11.
Legal basisAEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.6.3 ClaveRegimen 04 · AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.6.7 ClaveRegimen 10 · AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.15.6.8 ClaveRegimen 11
«si clave de ClaveRegimen es igual a “04”, CalificacionOperacion solo puede ser “S2”, o bien OperacionExenta.»«✓ CalificacionOperacion tiene que ser “N1” y siempre debe ir relleno. ✓ TipoFactura tiene que ser “F1”. ✓ Todos los destinatarios tienen que estar identificado mediante NIF.»«cuando ClaveRegimen sea “11”, únicamente se admitirá el TipoImpositivo = 21.»A business premises rental at 10 % under regime key 11: the API answers REGIME_KEY_REQUIRES_VAT_RATE.
The rental at 21 % under regime key 11.
{ "description": "Office rent, October", "quantity": 1, "unit_price": 900, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "11" } }Explained inRegime keys
An issued invoice does not use the intra-EU acquisition exemption
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. 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.
- Responsibility
- Checked by the API: a request that breaks it is rejected with the error codes listed.
- Applies to
- Operations
createCompanyInvoicepatchCompanyInvoiceissueCompanyInvoicecreateCompanyRecurringInvoiceLines withexemption_reasonEXENTA_ART_26. - Error codes
EXEMPTION_NOT_FOR_ISSUED_INVOICE422
Legal basisLey 37/1992 del IVA, art. 26
«Artículo 26. Exenciones en las adquisiciones intracomunitarias de bienes.»A supply of goods to a French company marked EXENTA_ART_26: the API answers EXEMPTION_NOT_FOR_ISSUED_INVOICE.
The intra-EU supply goes with the exemption of article 25.
{ "description": "Machine parts", "quantity": 10, "unit_price": 120, "main_tax": { "type": "IVA", "percentage": 0 }, "exemption_reason": "EXENTA_ART_25" }RelatedTAX-005
Explained inTax classification per line
An issuer that is not an individual never bears the IRPF rates of individuals
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. 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).
- 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.
- Responsibility
- Checked by the API: a request that breaks it is rejected with the error codes listed.
- Applies to
- Operations
createCompanyInvoicepatchCompanyInvoiceissueCompanyInvoicecreateCompanyRecurringInvoicecreateCompanyRecurringInvoiceDerivationpatchCompanyRecurringInvoiceupdateTaxConfigurationupdateCompanyTaxConfigurationcreateProductupdateProductpatchProductcreateProductsBulkcreateCompanyProductpatchCompanyProductcreateCompanyProductsBulkInvoices other than corrective ones, recurring templates, products and the default tax configuration of an issuer whose NIF starts withA,B,C,D,F,G,N,P,Q,R,S,UorW. - Error codes
IRPF_RATE_NOT_FOR_CORPORATE_ISSUER422
Legal basisLey 35/2006 del IRPF, art. 8.1 · Ley 35/2006 del IRPF, art. 8.1 a) · Orden EHA/451/2008, art. 3 · Orden EHA/451/2008, art. 3 · Orden EHA/451/2008, art. 3 · Orden EHA/451/2008, art. 3 · Orden EHA/451/2008, art. 3 · Orden EHA/451/2008, art. 3 · Orden EHA/451/2008, art. 4 · Orden EHA/451/2008, art. 5.2 · Ley 27/2014 del Impuesto sobre Sociedades, art. 9.1 a) · Ley 27/2014 del Impuesto sobre Sociedades, art. 9.1 a) · Real Decreto 634/2015, Reglamento del Impuesto sobre Sociedades, art. 61 · Real Decreto 634/2015, Reglamento del Impuesto sobre Sociedades, art. 61 o) · Real Decreto Legislativo 5/2004, texto refundido de la Ley del Impuesto sobre la Renta de no Residentes, art. 23.1 · Real Decreto Legislativo 5/2004, texto refundido de la Ley del Impuesto sobre la Renta de no Residentes, art. 5 a) · Real Decreto Legislativo 5/2004, texto refundido de la Ley del Impuesto sobre la Renta de no Residentes, art. 31.2 · Real Decreto Legislativo 5/2004, texto refundido de la Ley del Impuesto sobre la Renta de no Residentes, art. 25.1 a) · Real Decreto Legislativo 5/2004, texto refundido de la Ley del Impuesto sobre la Renta de no Residentes, art. 31.4 a) · Ley 27/2014 del Impuesto sobre Sociedades, art. 7.1 a) · Ley 27/2014 del Impuesto sobre Sociedades, art. 7.1 d) · Orden EHA/451/2008, art. 3 · Orden EHA/451/2008, art. 3 · Orden EHA/451/2008, art. 3 · Orden EHA/451/2008, art. 3 · Orden EHA/451/2008, art. 3 · Real Decreto 634/2015, Reglamento del Impuesto sobre Sociedades, art. 60.1 · Real Decreto 634/2015, Reglamento del Impuesto sobre Sociedades, art. 60.1 c) · Real Decreto 634/2015, Reglamento del Impuesto sobre Sociedades, art. 60.1 d) · Real Decreto 634/2015, Reglamento del Impuesto sobre Sociedades, art. 60.1 e) · Real Decreto 634/2015, Reglamento del Impuesto sobre Sociedades, art. 66 a) · Real Decreto 634/2015, Reglamento del Impuesto sobre Sociedades, art. 66 b) · Ley 27/2014 del Impuesto sobre Sociedades, art. 128.6 · Real Decreto 439/2007, Reglamento del IRPF, art. 95.1 · Real Decreto 439/2007, Reglamento del IRPF, art. 101.2 · Real Decreto 1065/2007, Reglamento General de gestión e inspección tributaria, art. 19.1
«1. Son contribuyentes por este impuesto:»«a) Las personas físicas que tengan su residencia habitual en territorio español.»«F. Sociedades cooperativas.»«G. Asociaciones.»«P. Corporaciones Locales.»«Q. Organismos públicos.»«R. Congregaciones e instituciones religiosas.»«S. Órganos de la Administración del Estado y de las Comunidades Autónomas.»«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.»«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.»«1. Estarán totalmente exentos del Impuesto:»«a) El Estado, las Comunidades Autónomas y las entidades locales.»«No existirá obligación de retener ni de ingresar a cuenta respecto de:»«o) Las rentas obtenidas por las entidades exentas a que se refiere el apartado 1 del artículo 9 de la Ley del Impuesto.»«1. Los establecimientos permanentes estarán sometidos al régimen de retenciones del Impuesto sobre Sociedades por las rentas que perciban»«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.»«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»«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»«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»«a) Las personas jurídicas, excluidas las sociedades civiles que no tengan objeto mercantil.»«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.»«A. Sociedades anónimas.»«B. Sociedades de responsabilidad limitada.»«C. Sociedades colectivas.»«D. Sociedades comanditarias.»«U. Uniones Temporales de Empresas.»«1. Deberá practicarse retención, en concepto de pago a cuenta del Impuesto sobre Sociedades correspondiente al perceptor, respecto de:»«c) Las contraprestaciones obtenidas como consecuencia de la atribución de cargos de administrador o consejero en otras sociedades.»«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.»«e) Las rentas procedentes del arrendamiento o subarrendamiento de inmuebles urbanos, aun cuando constituyan ingresos derivados de explotaciones económicas.»«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.»«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.»«a) Con carácter general, el 19 por ciento.»«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.»«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»«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»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.
The same SL invoices the rent of an office in Madrid: rent of urban property bears withholding, at 19 %.
{ "description": "Office rent, October", "quantity": 1, "unit_price": 900, "main_tax": { "type": "IVA", "percentage": 21, "regime_key": "11" }, "irpf_rate": 19 }Reduced withholding rates of Ceuta and Melilla derive from their base rate
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. 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.
- Responsibility
- Checked by the API: a request that breaks it is rejected with the error codes listed.
- Applies to
- Operations
createCompanyInvoicepatchCompanyInvoiceissueCompanyInvoicecreateCompanyRecurringInvoicecreateCompanyRecurringInvoiceDerivationpatchCompanyRecurringInvoiceupdateTaxConfigurationupdateCompanyTaxConfigurationLines, recurring templates and default tax configuration with anirpf_rateof 6, 2.8, 7.6 or 9.5. - Error codes
IRPF_RATE_ONLY_FOR_CORPORATE_ISSUER422
Legal basisLey 35/2006 del IRPF, art. 101.5 a) · Ley 35/2006 del IRPF, art. 101.8 · Real Decreto 439/2007, Reglamento del IRPF, art. 95.1 · Real Decreto 439/2007, Reglamento del IRPF, art. 100 · Real Decreto 634/2015, Reglamento del Impuesto sobre Sociedades, art. 66 a)
«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.»«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.»«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.»«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.»«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.»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.
The same individual invoices the rent with 7.6 % withholding: 19 % reduced by 60 %.
{ "description": "Office rent in Melilla, October", "quantity": 1, "unit_price": 900, "main_tax": { "type": "IPSI", "percentage": 4, "regime_key": "01" }, "irpf_rate": 7.6 }RelatedTAX-019