Skip to main content
You are reading the current (v2) contract for order.invoiced. v2 is a breaking change in data.fiscal only: the flat bag is replaced by a structured block — canonical fields inside authority, the authority’s identifiers inside authority.countryData, amounts inside authority.amounts — plus history and compensates. docType and dataAutorizacao are no longer emitted; cStat travels inside authority.countryData. The rest of the order snapshot is unchanged. See Path changes from the previous version.
order.invoiced fires once the country’s fiscal authority authorizes the fiscal document associated with an order — SEFAZ in Brazil, SRI in Ecuador, DIAN in Colombia, AFIP in Argentina, SII in Chile, SENIAT in Venezuela. This event is separate from order.completed: the order is paid first (order.completed), then the document is issued through your fiscal provider, and order.invoiced fires only when the authority returns the authorization.

Trigger condition

Fire emits order.invoiced when a fiscal document for the order reaches authorized, whether Fire learns it from its native provider integration or from the fiscal callback with eventType: "authorized".

What’s in trigger.data

The same V4 order snapshot as order.completed, plus the fiscal block described below. The order’s status stays "COMPLETED": a fiscal authorization does not change the order status.

Example — Brazil (NFC-e, sanitized)

Blocks elided as same as order.completed are byte-for-byte the snapshot order.completed carries. See the order.completed field reference.
Cash fields in payments.paymentMethods[]. customerCashAmount and changeAmount are numbers. Orders injected before 24 September 2026 carry customerCashAmount as the string "0" and no changeAmount: if you replay or reprocess older events, read the field as a number. See the order.completed field reference.

The fiscal block

For how each field of the fiscal callback lands here, see From the callback to the events. The fiscal block of order.invoiced, order.cancelled and order.reversed is what Fire stored in the order, with the same shape. It is not rebuilt per emitter: whether the document came in through your fiscal provider’s native integration or through the fiscal callback, you read the same fields at the same depth.

Where it lives in each event

On a cancellation the block sits in cancellation.fiscal, not in cancellation.metadata.fiscal. It moved up one level. If your flows or handlers read cancellation.metadata.fiscal.*, they read undefined on the current contract.

Fields of the block

string | null
The fiscal status of the order, not of one document: awaiting_payment, not_issued, pending, processing, fiscal_graphic, authorized, cancelling, cancelled, rejected, denied, error. In practice order.invoiced carries authorized, order.reversed carries cancelled, and order.cancelled carries authorized or cancelling.
string | null
ISO 3166-1 alpha-2 code of the regime that issued the document (BR, CO, EC, CL, AR, VE). The country no longer lives in the event name: filter on this field.
string | null
Fire’s identifier for the adapter that processed the document (plugnotas, generic). It is ours, not the provider’s name.
string | null
ISO 8601 UTC timestamp of the fiscal fact that fired the event, as reported by the provider.
object | null
The authority’s verdict on the current document. Fields that mean the same in every country sit at the top; the authority’s own identifiers sit in countryData, in that country’s vocabulary.
object[]
Every stop of the order’s fiscal journey that describes a document, oldest first — including the current one. On order.invoiced it usually has one entry, equal to authority; on order.reversed it has the invoice and then the cancellation. Stops without a document block do not appear — for example the cancelling Fire records before asking the authority; a processing that already carries the till’s numbering does appear.
This is not fiscalRepresentation.history. That one lists only the previous documents of the numbering; this one is the full journey and ends with the current document.
object | null
A pointer to the document the current one replaces. Present when the order’s fiscal status is cancelled; null otherwise. It points at the last stop in history that is not itself a cancellation — look its documentNumber up there for the whole document.
It carries no reason, unlike fiscalRepresentation.compensates. The motive already travels in the same event, with more detail: cancellation.cancellationType, cancellationGroup, cancellationReason, cancellationNote and cancellationSource. Fire does not emit order.reversed without an operational cancellation record, so that block is always there when compensates is. A fixed ORDER_CANCELLATION code here would say the same thing with less information. The numbering block does carry a reason: it is where the canonical code is resolved into the wording printed on the credit note, which needs the company’s own text.
In Brazil the pointer refers to the same number. SEFAZ does not number a new document to cancel one, so compensates.documentNumber equals authority.documentNumber. That is correct, not a bug.

countryData and the fiscal callback

countryData is one block with three names, depending on which side of Fire you look at: What your provider sends in the callback’s document is what you receive in authority.countryData, with the same key names. The rule that splits the two is exclusion: every key of the callback that is not a canonical field lands in countryData untouched. That is why a country’s new identifier travels without any change on Fire’s side. The callback’s root fields become authority’s top-level fields with the same names, except the three amounts, which are grouped in amounts. provider and metadata become providerIdentity and providerMetadata (null when absent or empty). The field-by-field table is in From the callback to the events.
Brazil’s protocolo lives in countryData, not at the top. Only SEFAZ has it — Chile has trackId, Argentina the cae — so it is the authority’s vocabulary, not a canonical field. Orders stored before this contract had it at the top as authorizationProtocol; Fire emits it as countryData.protocolo for those too.

Path changes from the previous version

Every previous path has exactly one current path. The payload carries no version number: the version belongs to this documented contract.

Where the fiscal totals live

authority.amounts are the document’s amounts as the authority reported them. The order’s own aggregates (vBC, vNF, vICMS…) are still in data.payments.metadata.fiscal, and per-line classification (NCM, CFOP) in data.orderLines[n].metadata.fiscal — same as in order.completed.

Handler example

Common pitfalls

  • Read fiscal.authority.*, not fiscal.*. The flat fields of v1.2 are gone. The table in Path changes maps each one.
  • Do not hour-align on authorizedAt in Brazil. It carries a conventional midnight; use issuedAt for time.
  • history includes the current document. Do not count its entries as “previous documents”.
  • No event for rejected / denied / error. Those outcomes are stored but do not fire order.invoiced.

order.completed

Fires before this event — the order itself.

order.reversed

Fires later if the document is cancelled at the authority.

Fiscal callback

How a provider reports the authorization that fires this event.

data.fiscalRepresentation

Unchanged in v2. It is the fiscal numbering the point of sale obtained before injecting the order — what was printed at the till — and it is a different block from fiscal: fiscalRepresentation is what was numbered, fiscal.authority is what the authority decided. The field reference is in order.completed and in the v1.2 page.