NF-e Retries
The system implements automatic retry for failed issuances.
Automatic Worker
Runs every 30 minutes and performs:
- Process retries: Pending or errored NF-e that still have attempts remaining
- Update status: Query the provider for NF-e in
processingstatus (last 7 days) - Auto-issue on payment: Issue NF-e for paid invoices (
on_full_paymentpolicy) - Auto-issue on finalization: Issue for finalized invoices (
on_finalizationpolicy) - Auto-issue per installment: Issue for paid installments (
per_installmentpolicy)
Retry Logic
Default Intervals
| Attempt | Interval | Cumulative Time |
|---|---|---|
| 1st | Immediate | 0 min |
| 2nd | +30 min | 30 min |
| 3rd | +60 min | 1h30 |
| 4th | +180 min | 4h30 |
| 5th | +360 min | ~10h30 |
The intervals are configurable per organization via retryDelaysMinutes.
Maximum Attempts
- Issuance: 5 attempts (configurable via
maxIssueAttempts) - Cancellation: 5 attempts (configurable via
maxCancelAttempts)
After exhausting attempts, the status changes to error.
Error Handling
- Auto-issuance errors are non-blocking (expected when NF-e is not enabled)
- Detailed logs for each attempt
- Process and error counters per worker execution