Test and production environments are completely separate. Each requires its own private key, its own certificate, its own service authorization in ARCA’s portal, and its own sales point. A test certificate will not work against production endpoints, and vice versa.
1
Check prerequisites
Before you start, confirm you have:
- A valid CUIT (11 digits, e.g.
20123456786) - A clave fiscal for that CUIT at level 2 or higher — WSASS (homologación) is not delegable, so you must log in as the natural person holding the CUIT, not a company representative
- Node.js 20 or later installed locally
2
Generate your private key and CSR
Run The command:
npx facturas init with your CUIT and the target environment. The CLI generates an RSA 2048 private key and the Certificate Signing Request (CSR) with the exact subject format ARCA requires.- Writes
arca-test.key(your private key, permissions0600) andarca-test.csrto the current directory - Copies the CSR to your clipboard (on macOS, Linux with
xclip/xsel/wl-copy, or Windows) so you can paste it directly into ARCA’s form - Prints the exact pages, fields, and buttons in ARCA’s portal for your chosen environment
- Prompts you to paste the certificate once ARCA issues it
Available flags for npx facturas init
Available flags for npx facturas init
3
Log in to ARCA's WSASS portal
WSASS is ARCA’s homologación certificate manager. It runs as a separate application from the main AFIP portal and handles only test-environment credentials.
- Go to auth.afip.gob.ar and log in with your clave fiscal.
- In Mis Servicios, open WSASS — Autogestión Certificados Homologación.
- If it doesn’t appear, add it first: Administrador de Relaciones → Adherir Servicio → ARCA → Servicios Interactivos → WSASS → confirm, then log out and back in.
- In the WSASS menu, click Nuevo Certificado. The form has three fields:
- Nombre simbólico del DN — the alias for this certificate (e.g.
facturasTest) - CUIT del contribuyente — pre-filled, do not edit
- Solicitud de certificado en formato PKCS10 — paste your CSR here, including the
-----BEGIN CERTIFICATE REQUEST-----and-----END CERTIFICATE REQUEST-----lines
- Nombre simbólico del DN — the alias for this certificate (e.g.
- Click Crear DN y Obtener Certificado.
4
Copy your certificate
After clicking the button, the signed certificate appears in the result box on that same page — there is no download. Copy the entire PEM block from If the
-----BEGIN CERTIFICATE----- to -----END CERTIFICATE-----, inclusive.Do not close the page until you have copied the certificate. WSASS does not offer a way to retrieve it again after you navigate away. If you do close it, you will need to create a new certificate entry.
npx facturas init prompt is still open in your terminal, paste the certificate there. The CLI verifies that it matches your private key and CUIT, saves it as arca-test.crt, and tells you the expiry date:5
Save the certificate if you exited init
If you closed the Paste the PEM block when prompted.
init prompt before pasting the certificate, run:cert finds the matching arca-test.key automatically, verifies the certificate against it, and saves arca-test.crt. It also works non-interactively for scripts:6
Authorize the wsfe service
Back in the WSASS portal, go to Crear autorización a servicio in the menu:
- Nombre simbólico del DN a autorizar — the alias you used in step 3 (e.g.
facturasTest) - CUIT representado — your CUIT (or the CUIT you are operating on behalf of)
- Servicio al que desea acceder — select
wsfe - Facturación Electrónica
7
Verify all layers
Run A passing result looks like this:If any layer fails, the CLI names it and tells you exactly which ARCA page to visit to fix it.
npx facturas check from the directory containing your arca-test.crt and arca-test.key files. The CLI finds them automatically and tests every layer in order:What each layer checks
What each layer checks
8
Set up a sales point
npx facturas check reports which sales points are enabled. If none are, you need to create one in ARCA’s portal under Administración de Puntos de Venta y Domicilios → Nuevo. Choose the system that matches your fiscal condition:Do not use Comprobantes en línea — that is a separate system and does not work with the web services API.
Going to production
Repeat every step above with--env production. The production certificate flow uses a different portal section:
- In Mis Servicios, open Administración de Certificados Digitales (add it via Administrador de Relaciones → Nueva Relación → Servicios Interactivos if needed).
- Click Agregar alias, enter an alias (e.g.
facturasProduction), and uploadarca-production.csr. - In the listing, click Ver → the download icon to get the certificate file. Save it as
arca-production.crt, or open it and paste the text intonpx facturas cert. - Go to Administrador de Relaciones → Nueva Relación. Under Servicio, search for Facturación Electrónica (within Webservices). Under Representante, select the
facturasProductionalias you just created. Confirm twice.
npx facturas check --env production to verify. Once it passes, set ARCA_ENVIRONMENT=production in your deployment environment.
Official ARCA references
Links to ARCA's official documentation
Links to ARCA's official documentation
npx facturas check passes for your target environment, you’re ready to issue invoices. Head to the Quick Start guide to write your first arca.issue() call.