- v3 · current
- v2 · deprecated
- v1 · deprecated
You are reading the current (v3) contract for
order.reversed. v3 is a breaking change in the fiscal block only: it moves from cancellation.metadata.fiscal to cancellation.fiscal, becomes structured (authority, history, compensates) and sefazCancellation is no longer emitted. The cancellation audit fields added in v2 (cancellationType, cancellationGroup, cancellationNote) are unchanged. See Path changes from the previous version.order.reversed fires when the fiscal authority confirms the cancellation of a document it had previously authorized. It is the fiscal outcome of order.cancelled: the order is cancelled inside Fire first (order.cancelled), the cancellation is requested at the authority through your fiscal provider, and order.reversed fires only when the authority approves it.
Trigger condition
Fire emitsorder.reversed when a fiscal document for the order reaches cancelled — from its native provider integration or from the fiscal callback with eventType: "cancelled" — and the order has an operational cancellation record in Fire. Without that record the event is not emitted: the cancellation block is what tells consumers this is a void and not a sale.
What’s in trigger.data
The same V4 order snapshot as order.completed, with status: "CANCELLED", plus the cancellation block: the same audit fields as order.cancelled and, inside it, the fiscal block with the cancelled document.
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.Example — Brazil (NFC-e, sanitized)
Note that in Brazil
authority.documentNumber and compensates.documentNumber are the same (12388): SEFAZ annuls the document instead of issuing a new one. In regimes where a cancellation is a separate credit note, they differ.data.cancellation reference
The audit fields are the same as in order.cancelled — including cancellationId, which both events share for the same cancellation and you can use as a join key. The fiscal block is documented below.
The fiscal block
For how each field of the fiscal callback lands here, see From the callback to the events. The fiscal block oforder.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
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.
Lifecycle
An order cancelled before its document was authorized fires onlyorder.cancelled: there is nothing to reverse at the authority.
Handler example
Common pitfalls
- Read
cancellation.fiscal, notcancellation.metadata.fiscal. The previous path is empty on v3. sefazCancellationis gone. The cancellation date isauthority.cancelledAt; the authority’s identifiers are inauthority.countryData.- Out-of-order delivery is possible. If
order.reversedarrives for an order you have no cancellation for, create it from this event’scancellationblock instead of dropping the event. - No event for a failed cancellation. If the authority rejects the cancellation, no event fires.
Related events
order.cancelled
Fires before this event — the order cancellation itself.
order.invoiced
The event that reported the document being cancelled here.
Fiscal callback
How a provider reports the cancellation that fires this event.
data.fiscalRepresentation
Unchanged in v3. It holds the numbers of the receipt printed at the till — the one being annulled — and it is a different block from cancellation.fiscal: fiscalRepresentation is what was numbered, authority is what the authority decided. The field reference is in the v2 page.
