Welcome to Tresa Contafy API
Tresa Contafy API is a comprehensive financial management solution designed specifically for Mexican businesses. It provides powerful tools to process CFDI (Comprobante Fiscal Digital por Internet) invoices, manage expenses, and maintain accurate financial records while ensuring fiscal compliance.Quickstart
Get started with the API in minutes
Authentication
Learn how to authenticate your requests
API Reference
Explore all available endpoints
Deployment Guide
Deploy to production
Key Features
JWT Authentication
Secure authentication with JWT tokens and email verification
Multi-Profile Management
Manage multiple RFC profiles per user account
XML Processing
Automatic processing and validation of CFDI XML invoices
Fiscal Validation
Built-in fiscal validation for Mexican tax requirements
Payment Matching
Intelligent matching of payment complements with PPD invoices
Stripe Integration
Subscription management with trial periods and flexible plans
SAT Catalog
AI-powered search of SAT product and service catalogs
Mass Download
SAT mass download (descarga masiva) integration
What You Can Build
Tresa Contafy API enables you to:- Automate Invoice Processing: Upload and process CFDI XML files automatically, extracting all fiscal data
- Track Financial Metrics: Monitor income, expenses, and payment statuses in real-time
- Manage Subscriptions: Handle user subscriptions with multiple plan tiers and trial periods
- Generate Reports: Create public shareable financial reports with token-based access
- Ensure Compliance: Validate all fiscal data against SAT requirements automatically
- Integrate Payments: Receive webhook notifications for all payment events via Stripe
API Architecture
The Tresa Contafy API is built with:- Node.js & Express: Fast and reliable REST API
- TypeScript: Type-safe development
- PostgreSQL: Robust relational database with Sequelize ORM
- JWT Authentication: Secure token-based authentication
- Rate Limiting: Protection against abuse with configurable limits
- Helmet & CORS: Enterprise-grade security middleware
Getting Help
GitHub Repository
View source code and report issues
Core Concepts
Understand the fundamental concepts