Skip to main content

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:

  1. The document arrives at the Gosocket reception inbox (or is uploaded) and is stored in Inbox.
  2. Gosocket verifies whether the recipient TaxID has an active configuration and forwarding email.
  3. No forwarding email or TaxID not configured → the document is marked as Status 5 (Error) and the flow stops.
  4. Email configured → Gosocket sends the XML to NDD and makes up to 10 retries within 30 minutes to get the status.
  5. If after 10 retries NDD does not have the document → marked as Status 6 (Not available at tax authority).
  6. 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:

  1. Gosocket runs automatic synchronization with NDD every 4 hours.
  2. Detects all documents available in NDD for the configured TaxIDs.
  3. Document already in Inbox → status is updated accordingly.
  4. 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)

CodeStatusDescription and action
1PendingWaiting for NDD response. If status does not change after 24 h, contact Support.
2AuthorizedFlow completed
3RejectedAllows resend from Inbox
4CancelledCancelamento event (110111) processed
5ErrorAllows resend — activate TaxID in NDD Space, wait 24 h and use Reprocess documents
6Not available at TAWait 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.

Cancelamento (110111)
The referenced document changes to Cancelled/Voided
Ciência da Operação (210210)
Generates acknowledgment receipt iconography (ARR 30) in Gosocket
Confirmação da Operação (210200)
Generates expressly accepted document iconography (ACD 33)
Desconhecimento da Operação (210220)
Generates express rejection or commercial rejection iconography (ACD 31)
Operação não Realizada (210240)
Generates express rejection or commercial rejection iconography (ACD 31)