Skip to main content

Overview

Tax Retention Documents (Comprobantes de Retención) are official certificates issued when taxes are withheld from payments in Mexico. These documents are mandatory for various business transactions including contractor payments, professional services, and rental income.

What are Tax Retention Documents?

Tax retention documents serve as proof that taxes have been withheld and paid to SAT on behalf of the recipient. They are essential for:
  • Tax compliance: Proving taxes were properly withheld
  • Income declarations: Supporting deductions and credits
  • Audit requirements: Maintaining proper tax records
  • Business relationships: Transparency between parties
Tax retention documents are XML-based with specific structure:
<retenciones:Retenciones>
  <retenciones:Emisor RfcEmisor="ABC123456789"/>
  <retenciones:Receptor RfcRecep="XYZ987654321"/>
  <retenciones:Periodo MesIni="01" MesFin="01" Ejerc="2024"/>
  <retenciones:Totales MontoTotOperacion="10000.00" 
                       MontoTotRet="1000.00"/>
  <retenciones:ImpRetenidos>
    <retenciones:ImpRet BaseRet="10000.00" 
                       Impuesto="001" 
                       MontoRet="1000.00"/>
  </retenciones:ImpRetenidos>
</retenciones:Retenciones>
Tax retention documents can be retrieved as:
  • XML: Original structured data with all fiscal information
  • PDF: Human-readable certificate for printing and sharing
  • Metadata: Extracted key fields for integration

Types of Tax Retention

Common Retention Scenarios

Professional Services

Retention Rate: 10% ISR + 10.67% VAT
  • Legal services
  • Consulting fees
  • Professional advice
  • Technical services

Contractor Payments

Retention Rate: Variable based on service
  • Construction work
  • Maintenance services
  • Installation projects
  • Repair services

Rental Income

Retention Rate: 10% ISR
  • Property rental
  • Equipment leasing
  • Vehicle rental
  • Commercial spaces

Transportation

Retention Rate: 4% ISR
  • Freight services
  • Logistics
  • Courier services
  • Cargo transport

Tax Types Subject to Retention

Tax CodeTax NameCommon RateDescription
001ISR (Income Tax)10%Most professional services
002IVA (VAT)10.67%Services with VAT retention
003IEPSVariableSpecial products and services

Extracting Tax Retention Documents

Basic Extraction Request

{
  "subject": {
    "identifier": "ABC123456789"
  },
  "credentials": {
    "SAT": {
      "type": "USERNAME_PASSWORD", 
      "username": "ABC123456789",
      "password": "CIEC_PASSWORD"
    }
  },
  "options": {
    "informationType": "TAX_RETENTION",
    "direction": "INBOUND",
    "period": {
      "from": "2024-01-01",
      "to": "2024-01-31"
    }
  }
}

Advanced Filtering Options

{
  "filters": {
    "emitter": {
      "operator": "equals",
      "value": "GACJ841128A87"
    }
  }
}

Key Data Fields

Essential Retention Information

Withholding Agent (Emisor):
  • RFC and business name
  • Address and contact information
  • Retention authority designation
Recipient (Receptor):
  • RFC and taxpayer name
  • Tax regime information
  • Address details
Payment Information:
  • Total operation amount
  • Taxable base for each tax
  • Retention rates applied
  • Total retained amounts
Tax Breakdown:
  • ISR retention details
  • VAT retention (if applicable)
  • Other applicable taxes
Time Information:
  • Payment period covered
  • Retention certificate issue date
  • SAT validation timestamp
  • Fiscal year reference

Direction Types

Understanding direction is crucial for proper accounting treatment.
DirectionDescriptionAccounting Impact
INBOUNDTaxes retained from payments you receivedTax Credit - Reduces your tax liability
OUTBOUNDTaxes you retained from payments to othersTax Liability - Must be paid to SAT

Integration Examples

Processing Inbound Retention Certificates

// Process retention certificates received (tax credits)
async function processInboundRetentions(extractions) {
  const retentions = await getCompletedDocuments(extractions, 'TAX_RETENTION');
  
  for (const retention of retentions) {
    const retentionData = await parseRetentionXML(retention.xmlContent);
    
    // Record as tax credit
    await recordTaxCredit({
      period: retentionData.period,
      withholdingAgent: retentionData.emitter.name,
      isrRetention: retentionData.taxes.isr.amount,
      vatRetention: retentionData.taxes.iva.amount,
      totalCredit: retentionData.totalRetention,
      certificateId: retentionData.uuid
    });
    
    console.log(`Processed retention credit: $${retentionData.totalRetention}`);
  }
}

Processing Outbound Retention Obligations

// Process retention certificates issued (tax obligations)
async function processOutboundRetentions(extractions) {
  const retentions = await getCompletedDocuments(extractions, 'TAX_RETENTION');
  
  for (const retention of retentions) {
    const retentionData = await parseRetentionXML(retention.xmlContent);
    
    // Record as tax obligation
    await recordTaxObligation({
      period: retentionData.period,
      recipient: retentionData.receptor.name,
      baseAmount: retentionData.operationAmount,
      retainedAmount: retentionData.totalRetention,
      dueDate: calculateDueDate(retentionData.period),
      status: 'pending_payment'
    });
    
    console.log(`Recorded retention obligation: $${retentionData.totalRetention}`);
  }
}

Monthly Retention Report

// Generate monthly retention summary
async function generateRetentionReport(month, year) {
  const period = {
    from: `${year}-${month.padStart(2, '0')}-01`,
    to: `${year}-${month.padStart(2, '0')}-31`
  };
  
  // Get both inbound and outbound retentions
  const [inboundRetentions, outboundRetentions] = await Promise.all([
    extractRetentions('INBOUND', period),
    extractRetentions('OUTBOUND', period)
  ]);
  
  const report = {
    period: `${year}-${month}`,
    credits: {
      count: inboundRetentions.length,
      totalISR: sumRetentionsByTax(inboundRetentions, '001'),
      totalVAT: sumRetentionsByTax(inboundRetentions, '002'),
      totalAmount: sumTotalRetentions(inboundRetentions)
    },
    obligations: {
      count: outboundRetentions.length,
      totalISR: sumRetentionsByTax(outboundRetentions, '001'),
      totalVAT: sumRetentionsByTax(outboundRetentions, '002'),
      totalAmount: sumTotalRetentions(outboundRetentions)
    },
    netPosition: calculateNetPosition(inboundRetentions, outboundRetentions)
  };
  
  return report;
}

Compliance Requirements

Retention Payment Deadline: Retained taxes must be paid to SAT by the 17th of the following month.
Responsibilities:
  • Calculate correct retention rates
  • Issue retention certificates within 30 days
  • Pay retained taxes to SAT by deadline
  • File monthly retention declarations
Penalties for non-compliance:
  • Late payment: 1.13% monthly interest
  • Missing certificates: Fines up to $15,000 MXN
  • Incorrect retention: Additional penalties
Rights and obligations:
  • Request retention certificates
  • Apply credits in tax declarations
  • Keep certificates for 5 years
  • Report discrepancies to SAT
Benefits:
  • Reduce tax liability
  • Improve cash flow
  • Simplified tax compliance

Best Practices

Common Issues and Solutions

Problem: Expected certificates not found in SAT systemPossible Causes:
  • Withholding agent hasn’t issued certificate
  • Incorrect RFC information
  • Processing delays in SAT system
Solutions:
  • Contact withholding agent for certificate status
  • Verify RFC spelling and format
  • Wait 24-48 hours for SAT processing
  • Use alternative documentation if necessary
Problem: Retention amounts don’t match expectationsPossible Causes:
  • Wrong retention rate applied
  • Calculation errors
  • Different taxable base interpretation
Solutions:
  • Verify current retention rates with SAT
  • Review taxable base calculations
  • Consult with tax advisor for complex cases
  • Request correction from withholding agent
Problem: Cannot process retention XML dataPossible Causes:
  • Corrupted file download
  • Invalid XML structure
  • Missing required fields
Solutions:
  • Re-download document from SAT
  • Validate XML against SAT schemas
  • Use robust XML parsing libraries
  • Implement error handling for malformed data

Integration with Accounting Systems

Automatic Journal Entries

// Create accounting entries for retention certificates
async function createRetentionJournalEntry(retentionData, direction) {
  const entries = [];
  
  if (direction === 'INBOUND') {
    // Tax credits from received retention certificates
    entries.push({
      account: 'ISR_RECEIVABLE',
      debit: retentionData.taxes.isr.amount,
      description: `ISR retention credit - ${retentionData.emitter.name}`
    });
    
    if (retentionData.taxes.iva.amount > 0) {
      entries.push({
        account: 'VAT_RECEIVABLE', 
        debit: retentionData.taxes.iva.amount,
        description: `VAT retention credit - ${retentionData.emitter.name}`
      });
    }
    
    entries.push({
      account: 'ACCOUNTS_RECEIVABLE',
      credit: retentionData.totalRetention,
      description: `Total retention credit`
    });
  } else {
    // Tax obligations from issued retention certificates
    entries.push({
      account: 'ACCOUNTS_PAYABLE',
      debit: retentionData.totalRetention,
      description: `Retention obligation - ${retentionData.receptor.name}`
    });
    
    entries.push({
      account: 'ISR_PAYABLE',
      credit: retentionData.taxes.isr.amount,
      description: `ISR retention obligation`
    });
  }
  
  await createJournalEntry({
    date: retentionData.issueDate,
    reference: retentionData.uuid,
    entries: entries
  });
}

Next Steps