Understanding CFDI expenses
Expenses (gastos) in Contafy represent purchases where:- You are the receptor (receiver) of the CFDI
- Your RFC appears as the receptor in the XML
- The expense represents a deductible business cost
Expense categories
Contafy supports expense categorization for better organization:- Viáticos: Travel and per diem expenses
- Oficina: Office supplies and equipment
- Servicios: Professional services and subscriptions
- Transporte: Transportation and fuel
- Alimentación: Meals and entertainment
Categories are for internal organization only. They don’t affect tax deductions or SAT compliance.
Uploading expense files
The expense upload process is similar to invoice uploads but specifically for XML files where you are the receptor.Using the expense upload page
Navigate to expense upload
Go to Gastos → Carga de Gastos XML in the sidebar or visit
/dashboard/expenses/upload.Check your usage limit
At the top of the page, you’ll see your monthly expense usage:Ensure you have available slots before uploading.
Drag and drop XML files
The upload zone accepts XML files:
- Drag and drop multiple expense XML files
- Click the zone to browse for files
.xml files are accepted. The system validates the extension before queueing.Review the files queue
Each file appears in the queue with:
- File name and size
- Validation status (Valid/Error)
- Type detection (XML)
- Error messages for invalid files
Select the profile
A dialog prompts you to select the RFC profile (empresa) for these expenses:
- Choose the profile matching the receptor RFC in the XML files
- The dialog shows how many files will be processed
- Frozen profiles are disabled and show a warning
Confirm and process
Review the summary and click “Confirmar y procesar”. Each file is uploaded and validated individually.
Expense validation
Expenses are validated against SAT requirements and your profile settings.Server-side validation checks
- XML structure: Valid CFDI format (3.3 or 4.0)
- Receptor RFC matching: Receptor RFC must match selected profile
- SAT validation: UUID verification and digital seal
- Régimen fiscal: Matches profile’s configured regimes
- Duplicate detection: Checks for existing UUID
Validation error handling
If validation fails:- The file status changes to “Error”
- An error message explains the issue
- The file remains in the queue for review
- You can remove it and re-upload after fixing
Common expense validation errors
RFC receptor no coincide- The receptor RFC in the XML doesn’t match your profile
- Verify you selected the correct profile
- Ensure the expense is actually for this business
- This expense was already uploaded
- Check the expenses list to confirm
- Avoid uploading the same file twice
- The expense’s régimen doesn’t match your profile configuration
- Update your profile’s regímenes fiscales if needed
- Verify the XML is correct
Manual expense entries
For expenses without a CFDI (e.g., cash purchases below the CFDI threshold), create manual entries.When to use manual expenses
- Purchases below the CFDI requirement threshold
- Simplified regime expenses
- Small cash transactions
- Foreign expenses without Mexican CFDI
Manual expenses don’t have UUIDs or digital seals. Consult your accountant about deductibility.
Creating a manual expense
Fill out the expense form
Provide the required information:Basic information:
- Concepto: Description (e.g., “Papelería oficina”)
- Subtotal (MXN): Amount before tax
- IVA (MXN): VAT amount (if applicable)
- Fecha: Expense date
- Categoría: Select from Viáticos, Oficina, Servicios, Transporte, or Alimentación
- Notas: Additional notes or vendor information
Editing manual expenses
Manual expenses (but not XML-based expenses) can be edited:Find the manual expense
In the expenses list, manual expenses show an “Manual” badge in the ORIGEN column.
Update the fields
Modify:
- Concepto
- Subtotal
- IVA
- Categoría
- Notas
Deleting manual expenses
Expense list and filtering
Viewing expenses
The expenses page (/dashboard/expenses) displays all uploaded expenses in a table.
Table columns
- UUID / FOLIO: Invoice unique identifier (or “Manual” for manual entries)
- FECHA: Expense date
- EMISOR: Vendor/supplier name and RFC
- RECEPTOR: Your business name and RFC
- MONTO: Subtotal amount
- IVA TRASL.: IVA charged to you
- CATEGORÍA: Expense category badge
- ORIGEN: XML or Manual badge
- ESTADO: Validation status
- ACCIONES: Edit/Delete buttons
Filtering expenses
Use the header filters to narrow down results:Profile selector
- Select a specific RFC profile
- Choose “Todos” to view expenses across all profiles
Period filters
- Mes: Month (Enero - Diciembre)
- Año: Year (current ± 2 years)
Régimen fiscal filter
Filter by tax regime if your profile has multiple regimes configured.Search field
Search by:- UUID
- Vendor name (emisor)
- Vendor RFC
- Expense concept
- Manual expense notes
Category filter
Filter expenses by category using the category dropdown:- Viáticos (purple badge)
- Oficina (blue badge)
- Servicios (yellow badge)
- Transporte (cyan badge)
- Alimentación (orange badge)
Deleting expenses
Expense metrics and summary
The expenses page shows summary cards at the top:Total expenses
Displays the sum of all expense subtotals for the selected period and profile.Expense count
Shows the number of expenses (XML + manual) in the current view.Category breakdown
A visual breakdown of expenses by category (if categories are assigned).Metrics update automatically when you change filters. They reflect only the currently filtered expenses.
Usage limits
Expense uploads are subject to monthly limits based on your plan:| Plan | Monthly Expense Limit |
|---|---|
| FREE | 30 expenses/month |
| STARTER | 100 expenses/month |
| PROFESSIONAL | 500 expenses/month |
| ENTERPRISE | Unlimited |
Usage tracking
The upload page displays your current usage with a progress bar:- 0-74%: Green (normal)
- 75-89%: Blue (approaching limit)
- 90-99%: Orange (near limit)
- 100%: Red (limit reached)
- You cannot upload more expenses until next month
- An alert suggests upgrading your plan
- Existing expenses remain accessible
Best practices
Organize by category
- Assign categories to manual expenses immediately
- Use consistent category names
- Categories help with expense reports and tax preparation
Regular uploads
- Upload expenses weekly or monthly
- Don’t wait until the end of the fiscal year
- Regular uploads help track cash flow
Validate immediately
- Review validation errors as soon as they occur
- Contact vendors if CFDIs are invalid
- Don’t accumulate invalid expenses
Keep backups
- Export expense reports regularly
- Download XML files to a secure location
- Maintain copies outside Contafy
Troubleshooting
”Límite de gastos alcanzado”
You’ve used all expense slots for the month. Options:- Wait until next month (resets on the 1st)
- Upgrade to a plan with higher limits
- Use manual expense entries (don’t count toward limit)
“Perfil congelado”
The selected profile is frozen and cannot accept new expenses. Resolve by:- Upgrading your plan (if frozen due to limit)
- Updating payment method (if payment issue)
- Contacting support
”No se encontraron gastos”
No expenses match your current filters. Try:- Clearing all filters
- Selecting “Todos” for profile
- Expanding the date range
- Checking if you’ve uploaded any expenses