Invoicing does not wait on the revenue service. A document is numbered and completed locally, then submitted by a background job that carries its own status, retries and idempotency key.
- The queue is visible to the person on the till, with a count of anything unsent.
- Responses are stored in full against the invoice, and stay stored.
- Credit notes are submitted in their own right, referencing the original document.
- Rejections go to a named queue with the error shown, not to a log file.
The reasoning behind this design, and the questions to ask any vendor about it, are in the fiscalisation tutorial.