Skip to main content
Before you can issue any invoice, ARCA must recognize your application as an authorized web service client. That means you need a private key, a certificate that ARCA has signed, and a service authorization that links that certificate to the Facturación Electrónica web service. This guide walks you through every step for the test (homologación) environment, then explains how to repeat the process for production.
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
You do not need a database, a server, or any infrastructure beyond your local machine to complete this setup.
2

Generate your private key and CSR

Run 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.
The command:
  • Writes arca-test.key (your private key, permissions 0600) and arca-test.csr to 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
If no clipboard tool is available (e.g. an SSH session), the CLI prints the CSR inline for you to copy from the terminal.
arca-test.key is your private key. Never commit it to version control. The CLI automatically adds arca-*.key and arca-*.crt to .gitignore if a .gitignore file exists in the directory.
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.
  1. Go to auth.afip.gob.ar and log in with your clave fiscal.
  2. In Mis Servicios, open WSASS — Autogestión Certificados Homologación.
    • If it doesn’t appear, add it first: Administrador de RelacionesAdherir Servicio → ARCA → Servicios Interactivos → WSASS → confirm, then log out and back in.
  3. 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
  4. 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 -----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.
If the 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 init prompt before pasting the certificate, run:
Paste the PEM block when prompted. 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
Click Crear Autorización de Acceso. ARCA links your certificate to the WSFE service. This authorization step is what lets the SDK authenticate with WSAA.
7

Verify all layers

Run 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:
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 pinpoints exactly which layer fails — configuration, certificate parsing, WSAA authentication, WSFE connectivity, or sales point registration — without touching ARCA’s write endpoints. Run it any time you change credentials or get an unexpected authentication error.
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 DomiciliosNuevo. 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:
  1. In Mis Servicios, open Administración de Certificados Digitales (add it via Administrador de RelacionesNueva RelaciónServicios Interactivos if needed).
  2. Click Agregar alias, enter an alias (e.g. facturasProduction), and upload arca-production.csr.
  3. 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 into npx facturas cert.
  4. Go to Administrador de RelacionesNueva Relación. Under Servicio, search for Facturación Electrónica (within Webservices). Under Representante, select the facturasProduction alias you just created. Confirm twice.
Then run npx facturas check --env production to verify. Once it passes, set ARCA_ENVIRONMENT=production in your deployment environment.
A test invoice in production is a real fiscal document registered with ARCA. Even a 1-peso smoke test (items: [{ amount: 100 }]) creates a permanent record. Only switch to production after your homologación flow is fully validated.

Official ARCA references

Once 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.