AP — CT-e and NF-e Reception
There are two independent routes. The first activates when a document arrives; the second operates in parallel autonomously.
Flow 1 — Inbox or Upload
Activates when a supplier sends the XML directly to the reception inbox, or when the Inbox "Upload" option is used:
- The document arrives at the Gosocket reception inbox (or is uploaded) and is stored in Inbox.
- Gosocket verifies whether the recipient TaxID has an active configuration and forwarding email.
- No forwarding email or TaxID not configured → the document is marked as Status 5 (Error) and the flow stops.
- Email configured → Gosocket sends the XML to NDD and makes up to 10 retries within 30 minutes to get the status.
- If after 10 retries NDD does not have the document → marked as Status 6 (Not available at tax authority).
- If NDD responds → Gosocket updates the status in Inbox.
📝 This flow depends on the forwarding email configured on the recipient. Without this email, the flow stops at Status 5 (Error) and cannot proceed until the configuration is activated.
Flow 2 — Periodic synchronization (every 4 hours)
Operates autonomously, independently of Flow 1:
- Gosocket runs automatic synchronization with NDD every 4 hours.
- Detects all documents available in NDD for the configured TaxIDs.
- Document already in Inbox → status is updated accordingly.
- Document not in Inbox → stored with a note indicating it was synced from NDD (not received via inbox).
📝 The "Synced from NDD" note allows quick identification of whether a document arrived via inbox or was proactively downloaded by Gosocket.
Document statuses (AuthorityStatus)
| Code | Status | Description and action |
|---|---|---|
| 1 | Pending | Waiting for NDD response. If status does not change after 24 h, contact Support. |
| 2 | Authorized | Flow completed |
| 3 | Rejected | Allows resend from Inbox |
| 4 | Cancelled | Cancelamento event (110111) processed |
| 5 | Error | Allows resend — activate TaxID in NDD Space, wait 24 h and use Reprocess documents |
| 6 | Not available at TA | Wait for synchronization (4 h) or reprocess from Inbox |
Event processing
Events are received via the reception inbox and processed only if the related document already exists in Inbox. Gosocket stores them as attachments to the original XML. Events do not go through signature, structure or status validations.