Overview
Comunicaciones de Baja (Voided Documents) are special documents used to annul or void previously issued electronic documents. When you need to cancel an invoice, boleta, credit note, or debit note that was already sent to SUNAT, you must send a voided document communication.When to Use Voided Documents
Cancellation Scenarios
Cancellation Scenarios
- Customer cancels order after invoice was issued
- Document issued with incorrect data (cannot be corrected with a note)
- Duplicate documents sent by error
- Document issued to wrong client
- Price or quantity errors that exceed note correction limits
Legal Requirements
Legal Requirements
- Voided documents must reference the same emission date as the documents being cancelled
- Must be sent same day for invoices (01)
- Can be sent within 7 calendar days for boletas (03) and notes (07/08)
- Each voided document can cancel multiple documents
Restrictions
Restrictions
- Cannot void documents older than allowed timeframe
- Cannot void documents already referenced by credit/debit notes
- Cannot void voided documents (no double voiding)
- Must keep voided documents in records for 5+ years
Document Structure
Naming Convention
The date in the identifier (
YYYYMMDD) refers to the emission date of the documents being voided, not the voided document’s creation date.Creating Voided Documents
Greenter Implementation
Voided Document Data Structure
Sequential number for the voided document (001, 002, etc.)
Emission date of the documents being voided (must match original docs)
Date when the voided document is being sent (communication date)
Array of documents to void. Each detail includes:
tipo_documento- Document type (01, 03, 07, 08)serie- Document seriescorrelativo- Document correlative numbermotivo_especifico- Specific reason for annulment
Sending to SUNAT
Asynchronous Processing
Like daily summaries, voided documents use asynchronous processing with a ticket:Complete Workflow
Annulment Reasons
Provide clear, specific reasons for each voided document:Common Motivos (Reasons)
Common Motivos (Reasons)
- Error en datos del cliente - Error in client data
- Error en montos o cantidades - Error in amounts or quantities
- Documento duplicado - Duplicate document
- Emitido a cliente incorrecto - Issued to wrong client
- Cancelación de operación - Operation cancelled
- Emisión por error - Issued by mistake
- Error en descripción de productos - Error in product descriptions
- Cliente solicita anulación - Client requests annulment
Reason Guidelines
Reason Guidelines
- Be specific - General reasons may be questioned
- Be brief - SUNAT may have character limits
- Be consistent - Use standard reason codes in your system
- Document internally - Keep detailed records beyond SUNAT requirement
- Avoid ambiguity - Clear reasons help with audits
Voided vs. Credit Notes
| Scenario | Use | Reason |
|---|---|---|
| Total cancellation same day | Voided Document | Completely cancels the original |
| Partial refund | Credit Note | Adjusts amount, doesn’t cancel |
| Price correction | Credit Note | Corrects specific items |
| Wrong client | Voided Document | Cannot correct client with note |
| After deadline | Credit Note | Voiding deadline passed |
| Return of goods | Credit Note | Proper accounting treatment |
Database Schema
Service Implementation
Polling for Status
API Endpoints
Best Practices
Timing and Deadlines
Timing and Deadlines
- Act quickly - Void invoices same day if possible
- Monitor deadlines - Track 7-day limit for boletas
- Batch voiding - Group multiple documents in one voided document
- Off-peak hours - Send during low-traffic times
- Alert system - Notify when approaching deadlines
Documentation
Documentation
- Clear reasons - Use specific, professional motivos
- Internal tracking - Keep detailed records beyond SUNAT
- Audit trail - Log all voiding activities
- Communication - Notify clients of annulments
- Financial records - Update accounting systems
Error Prevention
Error Prevention
- Validate before sending - Check document status
- Verify dates - Ensure fecha_referencia matches
- Check permissions - Verify user authorization
- Prevent duplicates - Check if already voided
- Test thoroughly - Use Beta environment
Status Management
Status Management
- Async processing - Handle ticket-based workflow
- Polling strategy - Check status periodically
- Update cascades - Update all related documents
- Status consistency - Maintain data integrity
- Reconciliation - Verify voiding completed successfully
Monitoring and Reporting
Common Errors
| Error Code | Description | Solution |
|---|---|---|
| 2324 | Invalid RUC | Verify company RUC |
| 2800 | Invalid schema | Validate XML structure |
| 2801 | Invalid signature | Check certificate |
| 2117 | Date not allowed | Check voiding deadline |
| 2118 | Document already voided | Cannot void twice |
| 2119 | Document referenced in note | Cannot void document with notes |
| 2335 | Document doesn’t exist | Verify document was sent to SUNAT |
Next Steps
Daily Summaries
Learn about sending boletas in batches
CDR Handling
Process SUNAT responses
SUNAT Integration
Understand SUNAT communication
XML Signing
Digital signature implementation
