Argentina — AFIP, Factura Electrónica and CAE
Argentina has had a universal electronic invoicing mandate since 1 April 2015, driven by AFIP. Each invoice requires a CAE (Código de Autorización Electrónico) issued by the WSFE / WSFEx web services before issuance, and carried in a QR code on the visual representation.
Regulatory timeline
- 2 December 2002 — RG 1361 AFIP. First framework for electronic invoicing in Argentina, voluntary and limited to pilot sectors.
- 22 May 2013 — RG 3503 AFIP. WSFE and WSFEx web service endpoints made available for programmatic issuance.
- 16 March 2015 — RG 3749 AFIP. Universal mandate for Responsables Inscritos (IVA) from 1 April 2015.
- 1 April 2015 — Universal go-live. Every B2B and B2C invoice from Responsables Inscritos must be Factura Electrónica with AFIP CAE.
- 19 October 2018 — RG 4290 AFIP. Extends the obligation to Monotributistas (simplified regime), phased entry into force in 2019.
- 1 April 2019 — Monotributistas go-live. All Monotributistas category B and above must be on Factura Electrónica.
- 21 December 2020 — RG 4892 AFIP. Introduces the mandatory QR code on the printed representation from 1 March 2021.
- 2024-2025 — AFIP → ARCA reorganisation. Institutional reorganisation: AFIP becomes ARCA (Agencia de Recaudación y Control Aduanero), but the WSFE and afip.gob.ar URLs remain in operational transition.
Technical schema
Argentina uses a family of SOAP web services exposed by AFIP. Authentication is done via WSAA (Web Service de Autenticación y Autorización) with an X.509 certificate issued by AFIP, which returns a token + signature valid for 12 hours.
-
WSFE — domestic Factura Electrónica (operation
FECAESolicitarto request a CAE). - WSFEx — Factura Electrónica for exports, separate schemas with customs data.
- WSMTXCA — web service with line-level detail (usable for high B2B volumes).
- WSCDC — Web Service Consulta de Comprobantes, allows checking that a given invoice (CUIT + CAE + number) is valid on the AFIP side.
Minimal example of a FECAESolicitar request (invoice A between Responsables Inscritos):
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ar="http://ar.gov.afip.dif.FEV1/">
<soapenv:Body>
<ar:FECAESolicitar>
<ar:Auth>
<ar:Token>PD94bWwgdmVyc2lvbj0iMS4wIi...</ar:Token>
<ar:Sign>g7CywXNJPbevhMaQGgrYzm5BG...</ar:Sign>
<ar:Cuit>20111111110</ar:Cuit>
</ar:Auth>
<ar:FeCAEReq>
<ar:FeCabReq>
<ar:CantReg>1</ar:CantReg>
<ar:PtoVta>1</ar:PtoVta>
<ar:CbteTipo>1</ar:CbteTipo>
</ar:FeCabReq>
<ar:FeDetReq>
<ar:FECAEDetRequest>
<ar:Concepto>1</ar:Concepto>
<ar:DocTipo>80</ar:DocTipo>
<ar:DocNro>30707172112</ar:DocNro>
<ar:CbteDesde>142</ar:CbteDesde>
<ar:CbteHasta>142</ar:CbteHasta>
<ar:CbteFch>20260516</ar:CbteFch>
<ar:ImpTotal>121.00</ar:ImpTotal>
<ar:ImpTotConc>0.00</ar:ImpTotConc>
<ar:ImpNeto>100.00</ar:ImpNeto>
<ar:ImpOpEx>0.00</ar:ImpOpEx>
<ar:ImpIVA>21.00</ar:ImpIVA>
<ar:ImpTrib>0.00</ar:ImpTrib>
<ar:MonId>PES</ar:MonId>
<ar:MonCotiz>1.000000</ar:MonCotiz>
<ar:Iva>
<ar:AlicIva>
<ar:Id>5</ar:Id>
<ar:BaseImp>100.00</ar:BaseImp>
<ar:Importe>21.00</ar:Importe>
</ar:AlicIva>
</ar:Iva>
</ar:FECAEDetRequest>
</ar:FeDetReq>
</ar:FeCAEReq>
</ar:FECAESolicitar>
</soapenv:Body>
</soapenv:Envelope>Submission flow
The seller authenticates via WSAA to obtain a Token + Sign valid 12h. Then it calls WSFE/WSFEx with the pre-issued invoice data. AFIP returns synchronously a CAE and a Fecha de Vencimiento CAE (usage deadline, typically 10 days for B2B invoices). Without CAE, the invoice is not issued.
┌─────────────┐ ┌──────────────────┐ ┌─────────────┐
│ AR supplier │───>│ AFIP WSFE │───>│ AR customer │
│ (ERP, SOAP) │ ↑ │ (web service) │PDF │ (printed │
│ + WSAA token│ │ │ FECAESolicitar() │+QR │ or XML) │
└─────────────┘ │ └────────┬─────────┘ └─────────────┘
│ │
│ ▼
│ ┌──────────────────┐
└──│ CAE returned + │ ← mandatory print
│ Fecha Vto. CAE │ + QR
└──────────────────┘
The seller then generates the visual representation (PDF) with CAE, Fecha
Vto. CAE and AFIP QR printed. The QR encodes a minimal base64 JSON with
seller CUIT, point of sale, type, number, amount, CAE and date — any
third-party application can consult
https://www.afip.gob.ar/fe/qr/ to verify validity in real
time.
Validation
- AFIP portal: afip.gob.ar/fe — Factura Electrónica programme page.
- WSFE / WSFEx / WSCDC web services: documentation and WSDL published on afip.gob.ar/ws.
- Homologación (sandbox): WSAA and WSFE in homologation environment for vendors before production.
- Public QR validator: serviciosweb.afip.gob.ar — Consulta CAE.
Common pitfalls
- CAE expirable — Fecha Vto. CAE. A CAE issued for a B2B invoice has a deadline (typically 10 days). If the invoice is not delivered to the buyer before that date, the CAE expires and the invoice is invalid. Any issuance queue must track this deadline.
- A/B/C/E letter by both parties' IVA status. The choice between Factura A, B, C or E depends on the crossed seller/buyer IVA status (Responsable Inscrito, Monotributista, Consumidor Final, Exportador). A wrong cross triggers an AFIP rejection and blocks the CAE.
- WSAA 12h token. The AFIP authentication token is valid 12h. An integration that creates a new token at every call is subject to throttling and can be temporarily banned. Implement token caching + rotation on expiry.
- Pre-declared points of sale (PtoVta). Every point-of-sale number used in an invoice must be pre-declared in the AFIP portal before use. A non-existent PtoVta triggers error 10063. Maintain a synchronised registry.
-
Multi-currency and MonCotiz. Exports in USD/EUR must
include the peso exchange rate (
MonCotizfield) of the issue date per the Banco Central rate. A wrong quote blocks AFIP.
Cross-links
- Mexico — CFDI / LatAm comparison.
- Brazil — NF-e / LatAm comparison.
- Chile — DTE / LatAm comparison.
- Peru — CPE / LatAm comparison.
- Official sources: afip.gob.ar/fe, afip.gob.ar/ws.