facturacion-electronica-afip

Automate AFIP electronic invoicing with ARCA/WSFEv1/WSAA token and CAE workflows.

Updated Apr 25, 2026
One-click install
npx skills add https://github.com/tomasbasso/SistemaStockV2 --skill facturacion-electronica-afip
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: facturacion-electronica-afip
Source: https://github.com/tomasbasso/SistemaStockV2/tree/main/.agents/skills/facturacion-electronica-afip
Command: npx skills add https://github.com/tomasbasso/SistemaStockV2 --skill facturacion-electronica-afip

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

AFIP electronic invoicing is complex, requiring secure authentication, synchronized numbering, error handling, and auditable records. We provide a structured approach to implement, debug, and review ARCA/WSFEv1/WSAA workflows in backend services, reducing manual configuration and risk of CAE issues.

Core Features & Use Cases

  • Token management: caching and refreshing WSAA tokens to avoid throttling.
  • CAE workflow: end-to-end FECAESolicitar, FECompUltimoAutorizado, and CAE persistence.
  • Auditing & recovery: complete logging of requests/responses and safe retries on transient errors.
  • Environment safety: supports homologation and production modes with strict separation.

Quick Start

Configure environment variables and deploy the backend to generate a test CAE.

Frequently Asked Questions about facturacion-electronica-afip

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate AFIP electronic invoicing and CAE requests in a backend service?

Automating AFIP electronic invoicing involves integrating ARCA/WSFEv1/WSAA workflows to handle token management, FECompUltimoAutorizado synchronization, and CAE requests with result persistence and robust error handling.

How does WSAA token management work for AFIP invoicing integrations?

WSAA token management for AFIP invoicing works by caching and refreshing authentication tokens, which prevents API throttling and ensures continuous access to the WSFEv1 electronic invoicing endpoints.

What is the best way to synchronize invoice numbering with AFIP before requesting a CAE?

The best way to synchronize invoice numbering with AFIP is using the FECompUltimoAutorizado operation, ensuring strict number synchronization across development, staging, and production environments to prevent CAE generation conflicts.

Can I safely retry failed CAE requests without causing duplicate AFIP invoices?

Yes, you can safely retry failed CAE requests by implementing robust error handling with clearly defined guards and fail-safes, ensuring complete logging of requests and responses to audit and recover from transient errors.

Does this AFIP invoicing integration support homologation and production environments?

Yes, AFIP invoicing integration supports homologation and production modes with strict environment separation, allowing developers to test CAE generation workflows safely before deploying to the live ARCA/WSFEv1 production endpoints.

Why does my AFIP electronic invoicing workflow fail during staging or production deployment?

AFIP electronic invoicing workflows often fail due to incorrect environment configuration or unsynchronized numbering; implementing strict environment separation and FECompUltimoAutorizado synchronization resolves these CAE generation issues.