Opens a refund operation. Must reference the original operation via
original_operation_id. The original fiscal document number will be
included in the refund’s fiscal output.
Supports both full and partial refunds. For partial refunds, specify
the returned items via PATCH /refunds/:id before completing.
Like all operations, the start is a fiscal event in jurisdictions that require it.
Platform API key sent as Authorization: Bearer ofk_platform_....
Platform integrators also pass OpenFiskal-Organization: org_xxx
to act on behalf of a merchant.
Merchant organization ID. Required for platform integrators acting on behalf of a specific merchant. Omit when using an organization-scoped API key directly.
Unique key to make the request idempotent. If a request with this key
was already processed, the original response is returned without
re-executing the operation. Strongly recommended on all start and
complete actions — these are fiscal events and must not be duplicated.
Refund started
Shared fields present on every operation regardless of type.
"op_01HXYZ"
"operation"refund The POS lifecycle state of the operation. Transitions are
one-directional and enforced server-side — invalid transitions
return 409 Conflict.
open — operation in progress, mutations allowedcompleted — POS finalized the operation (payment collected)cancelled — POS cancelled before completion| From | Event | To |
|---|---|---|
open | POST .../complete | completed |
open | POST .../cancel | cancelled |
open, completed, cancelled Monotonically increasing, register-scoped sequence number
Jurisdiction-specific fiscal output attached to every operation.
Discriminated by regime — each variant carries typed fields for its
fiscal security device and signing protocol.
The fiscalization state of the operation, tracked independently from the operation state.
pending — fiscalization not yet attempted or in progresssucceeded — fiscal device recorded the event, fiscal data availablefailed — fiscalization failed (device unreachable, transmission error)The POS should check fiscal.state before printing — only print
fiscal data on the receipt when it is succeeded.
pending, succeeded, failed Links to related operations. The audit chain between operations lives here
at the envelope level — not inside the type-specific data block — because
any operation type can reference any other.
Timestamp of the fiscal start event