Returns on a sale from before OpenFiskal can release its open amount
- A
returnwithexternal_related_operationnow acceptsreleased_outstanding_amount. OpenFiskal never recorded that sale’s open amount, so the release is checked only against the value of the returned goods;422 return_release_requires_related_operationis no longer returned. - For German fiscalization it is signed like any other release, and the DSFinV-K archive references the sale as an external process. See Returns on a sale with an open amount.
Closing a session without a count
session_closeno longer needs asession_cash_countbefore it. A close on a session nobody counted is accepted;409 session_not_countedis no longer returned.- The close is signed as before. No difference is signed for such a session, and its DSFinV-K export has no
DifferenzSollIst. - Counting stays as it is: a
session_cash_countstill freezes the session and signs the difference. See Closing without a count.
Czech registers in LIVE
- API keys can be created for
CZEin LIVE, andPOST /registers/{id}/fiscalizefiscalizes Czech registers in LIVE. - Until EET 2.0 starts on January 1, 2027, live Czech sales are reported to the authority’s test service (
environment: "playground"), signed with its shared test certificate. Upload the merchant’s production cash certificate now: from January 1, 2027 live sales are filed in production with it, with no change on your side. - A report stays with the service it was first sent to. See Czechia.
Czech sales reported to EET 2.0 (sandbox)
- A completed
sale,return,exchangeorpaymenton a Czech register is reported to the Czech Financial Administration’s test service as it completes. - Its
fiscal_informationhas the new regimeEET2:status(confirmed,retry,rejected,nothing_to_report), the confirmation codepok,environment, thereported_amount(cash as rounded),confirmed_at(by the authority’s clock),warningsanderror. Each warning and error has the authority’scode, an Englishmessage, and the authority’s own Czech text inauthority_message. - A failed report never fails the completion. See Czechia.
Czech registers (sandbox)
- Merchants accept a
CZEfiscal identity:vat_id, the DIČ (CZand 8 to 10 digits). API keys can be created forCZE, in the sandbox. POST /registers/{id}/fiscalizefiscalizes a register at a Czech location at once, with no signing device:fiscalization_statusisfiscalizedandfiscalizationisregime: czechia_eet2withfiscalized_at, without TSE fields. It needs the merchant’sCZEfiscal identity.- The DIČ is checked as the Financial Administration checks it (a company’s check digit, a person’s birth number); a DIČ that fails is refused with
400 invalid_request. - Operations on a Czech register complete with
fiscal_information: nulland may carry cash rounded to whole crowns (rounded_cash_amount). - They are recorded, not yet reported to the Czech Financial Administration (EET 2.0), so Czech registers are fiscalized in the sandbox only: in LIVE the call returns
422 validation_error. See Czechia.
Cash rounding on cash payments
POST /operations/{id}/completeaccepts an optionalrounded_cash_amounton acashpayment: the cash that actually changed hands where cash is rounded to coins that exist (173.63 CHF due, 173.65 taken). It has the sign ofamount.amountkeeps its meaning, and the payments still add up tototal_amountusingamount. Nothing changes when you do not send the field.- It may differ from
amountby at most half the smallest cash denomination of the currency, must be a whole multiple of it, and is only accepted on a cash payment: seerounded_cash_amount_invalidin Errors. A register fiscalized for Germany accepts it only when it equalsamount(rounded_cash_amount_not_supported). - Payments always return
rounded_cash_amount: as sent, ornull. - See Cash rounding.
German fiscal identity: Steuernummer or USt-IdNr
- A
DEUfiscal identity now needstax_number(Steuernummer),vat_id(USt-IdNr), or both. Both used to be required, which locked out merchants without a USt-IdNr. - An identity with neither returns
400 invalid_request. A number you leave out is returned asnull. - A
PATCHreplaces theDEUidentity as a whole: a number you leave out is cleared. - Fiscalizing a German register still needs a
DEUfiscal identity.
Returns on a sale with an open amount
POST /operationson areturnacceptsreleased_outstanding_amount: the part of the related sale’s or exchange’s open amount that the return drops instead of paying it back, because goods come back that were never paid for. Without it nothing changes.- At complete, the payments add up to
total_amountplusreleased_outstanding_amount. A return that releases its whole total, such as a cancelled order that was never paid, completes withpayments: []. - It needs
related_operation_idand can release at most the value of the returned goods and at most what is open now: seereturn_release_requires_related_operation,return_release_related_operation_not_releasableandrelease_exceeds_outstandingin Errors. - A return returns its
released_outstanding_amount. Sales and exchanges count releases inoutstanding_amountand list the returns in the newreleasing_returns[], next topayment_operations. - For German fiscalization: the release is signed positive in the NULL bucket, and the DSFinV-K archive files a
Forderungsaufloesungreferencing the sale’s receipt. See Returns on a sale with an open amount.
Client timestamps on every operation
POST /operationsnow accepts an optionaloccurred_at(ISO 8601) onsale,return,exchangeandpayment: when the operation started on your POS. It is returned in the newstarted_atfield, which isnullwhen you send none.POST /operations/{id}/completeacceptsoccurred_atas well: when the operation ended on your POS. It becomescompleted_at. Thecompleted_atrequest field stays accepted as an alias; sending both with different times returns422 validation_error.- Without them nothing changes: OpenFiskal uses the time it receives the request.
422 validation_errorwhenoccurred_atis more than 5 minutes in the future, or when the completion is earlier than the start you sent. The future check now also applies tocompleted_at, which used to accept any time.- For German fiscalization: the DSFinV-K archive files the receipt’s start from
started_atand its end fromcompleted_at. Without a start, both stay atcompleted_at, as before. - Send them when an operation can reach OpenFiskal later than it happened, for example from an offline queue. See Offline and recovery.
Client timestamps on session operations
session_open,session_cash_adjustment,session_cash_countandsession_closenow accept an optionaloccurred_at(ISO 8601): when the event happened on your POS. It becomes the operation’scompleted_atand the session’s opening, counting or closing time.- Without it nothing changes: OpenFiskal uses the time it receives the request.
- Send it when the operation can reach OpenFiskal later than it happened. A session your POS opened before it sent the first sale then opens before that sale, and the DSFinV-K archive keeps its receipts in chronological order. Send operations in the order they happened.
422 validation_errorwhenoccurred_atis more than 5 minutes in the future, or, on an adjustment, count or close, earlier than the session’s opening.
Open amounts on exchanges
POST /operations/{id}/completeon anexchangenow acceptsoutstanding_amount, as on asale: the part of the upcharge the customer leaves open. The payments plusoutstanding_amountmust equaltotal_amount, andpaymentsmay be empty when everything is left open. Only money the customer owes can be left open: an exchange with a total of 0 or below completes with nothing open. Without the field nothing changes.- A
paymentoperation may now name a completedexchangeas itsrelated_operation_idand settles that exchange’s open amount, with the same rules as for a sale (related_operation_not_payable,payment_exceeds_outstanding). - A sale and an exchange of the same order have separate open amounts: a payment settles only the operation it names, and an exchange never lowers its sale’s open amount.
- An exchange now returns its
outstanding_amount(what is open now) andpayment_operations, like a sale. - For German fiscalization: the open part is signed in the NULL bucket, negative, as on a sale. The DSFinV-K archive files a
Forderungsentstehungon the exchange’s receipt and aForderungsaufloesungreferencing it on the payment that settles it.
Gift cards on payment operations
- A
paymentoperation now acceptsgift_cardlegs onPOST /operations/{id}/complete: a voucher settling (part of) a sale’s open amount. As on asale,gift_card_idis required (422 gift_card_id_required). The leg counts towards the payment’stotal_amountand lowers the sale’soutstanding_amountlike any other leg. - For German fiscalization: the voucher is not a payment type. The TSE signs only the money that moved, and the DSFinV-K archive files a
MehrzweckgutscheinEinloesung(withvoucher_id) next to the payment’sForderungsaufloesung. No integrator action needed beyond settinggift_card_id. - DSFinV-K: a receipt with no money payment (a
saleorpaymentsettled entirely by gift cards, or asaleleft entirely open) now files the payment typeKeinewith amount 0 instead of an empty list.
Open amounts and payment operations
POST /operations/{id}/completeon asaleacceptsoutstanding_amount: the part oftotal_amountleft open. The payments plusoutstanding_amountmust equaltotal_amount, andpaymentsmay be empty when everything is left open. Without it nothing changes: the payments must cover the total.- New operation type
payment: money against a completed sale’s open amount, withrelated_operation_idandtotal_amount, no line items. It can be taken on any register of the merchant and is its own signed receipt. It never collects more than is open: seerelated_operation_not_payableandpayment_exceeds_outstandingin Errors. - Every operation now returns
outstanding_amount. A sale also returnspayment_operations[]: its completed payments with their legs. Both grow without changing the sale’sresource_version. - Money amounts in operation responses always carry at least two decimals:
"33.80"instead of"33.8","5.00"instead of"5". Amounts with more decimals (tax_amount,pretax_amount) keep them. Parse amounts as decimals; do not compare them as strings.
Decommissioned registers keep recording; registers on a shared TSE can be decommissioned
- Operations on a decommissioned register are accepted again, sessions included, and recorded without a signature: their
fiscal_informationisnull. They used to be rejected with409 register_decommissioned, which is no longer returned. POST /registers/{id}/decommissionnow also decommissions a register whose TSE it shares with other registers at its location. It removes the register from that TSE, which keeps signing for the location’s other registers. It used to answer422for them.- It answers
409 register_busy(retryable: true,Retry-After) while the location’s shared TSE is being set up or replaced.
Idempotency-Key is enforced
POST /operations, POST /operations/{id}/complete, and POST /operations/{id}/void now act on Idempotency-Key as documented. A retried request runs once.- Retrying with the same key and the same request returns the original result, marked with the
Idempotent-Replayed: trueresponse header, instead of creating, completing, or voiding again. - Reusing a key with a different request returns
409 idempotency_key_conflict.details.operation_idnames the operation the key already belongs to, so a client that lost the first response can find it. - A retry sent while the first request with its key is still running waits up to 5 seconds for it. If it is still running after that, the retry returns
409 idempotency_key_in_progresswithRetry-After. - A missing header returns
400 idempotency_key_required. Every client we see in production already sends it. - Keys are retained for 30 days (previously documented as at least 24 hours).
register_busyandoperation_in_progressresponses now carryretryable: trueand aRetry-Afterheader. Theirmessagealways said to retry; the flag now agrees.- When the TSE stays busy signing other receipts, signing now answers
409 tse_busy(retryable: true,Retry-After) instead of a generic, non-retryable409 conflict. - A complete whose
paymentsrepeat apayment_idnow returns422 payment_id_duplicatebefore anything is signed. It used to be signed on the TSE and then fail with a500. - If a complete was signed on the TSE but did not finish, a later complete of the same operation with different amounts or payments now returns
409 operation_already_signedinstead of completing with a signature over the original amounts.
Cart-level discounts on SALE
POST /operations for type: "sale" now accepts an optional cart_level_discounts[] array — discounts applied to the order as a whole, not apportioned onto specific line items.- Each entry carries an optional
description(free-text label, e.g. promo code) and a required positiveamountdecimal string. line_items[].total_amountvalues must already reflect their post-discount totals —cart_level_discounts[]is documentation of the order-level reduction, not a re-pricing instruction.- The same array is returned on
saleoperation responses, with server-issuedidper entry. - For German fiscalization: each cart-level discount emits a separate
Rabattbusiness case in the DSFinV-K cashpoint-closing archive, slotted between the line-itemUmsatzlines and any gift-cardMehrzweckgutscheinEinloesunglines. Descriptions over 255 characters are trimmed for the DSFinV-K text field; the original is preserved in the operation response.
Gift card redemptions
payments[] on POST /operations/{id}/complete now accepts an optional gift_card_id field — the integrator-supplied identifier of the voucher being redeemed.gift_card_idis required whenmethod: "gift_card". Sending agift_cardpayment without it (or with empty/whitespace) returns422 gift_card_id_required.- The same field is returned on payments in the operation response.
- For German fiscalization: each
gift_cardpayment on asalenow emits aMehrzweckgutscheinEinloesungline in the DSFinV-K cashpoint-closing archive, carrying the redeemed amount (negative) andvoucher_id. Per §3 Abs. 15 Satz 2 UStG, the redemption is anti-payment rather than revenue, so the gift-card leg is no longer reported underpayment_types; the SALE’sfull_amount_incl_vatis reduced by the redeemed total and a balancing entry is added toamounts_per_vat_idat the non-taxable bucket. No integrator action needed beyond settinggift_card_id.
Gift card line itemsLine items on
POST /operations (for sale, return, exchange) now accept an optional type field with values item (default) or gift_card.gift_cardlines represent multi-purpose voucher sales (Mehrzweckgutschein). All taxes on agift_cardline must carryrate: "0"andtax_amount: "0"— non-zero rates are rejected with422 gift_card_tax_rate_must_be_zero. VAT on multi-purpose vouchers is deferred to redemption.- An optional
gift_card_idfield carries the integrator-supplied gift card identifier. - The same
typeandgift_card_idfields are returned on line items in operation responses. - For German fiscalization:
gift_cardlines emitMehrzweckgutscheinKauf(instead ofUmsatz) in the DSFinV-K cashpoint-closing archive. No integrator action needed beyond settingtype.
tax_amount consistency checkEach line_items[].taxes[].tax_amount is now checked against total_amount × rate_i / (1 + Σ rate_j) at 8 dp; mismatches return 422 tax_amount_precision_invalid. Submit tax_amount rounded to 8 dp. See Decimal precision.Line items now require
sku_identifierEach entry in line_items[] on POST /operations (for sale, return, exchange) now requires a sku_identifier field — the merchant’s stable variant identifier (e.g. "TSHIRT-BLUE-M").Identifies a unique number used to maintain and manage the item, product, or merchandise category in the company’s systems. Example: A Tshirt has one sku for each size + color combination.Breaking — sku_identifier is mandatory, as it’s required for regulatory exportsThe same field is returned on every line item in the operation response.Session close split into count + closeEnd-of-shift is now a two-step flow: the merchant counts the drawer first (
session_cash_count), then seals the session (session_close). The two events attest to different fiscal facts and produce up to two TSE signatures from one end-of-shift sequence.session_cash_count— new operation type. Carriescounted_closing_amount(and optionaldiscrepancy_note). Server returnsexpected_closing_amountand signedclosing_cashcount_diff(counted − expected). The variance is fiscally attested.session_close— slimmed. Now carries only the optional closing pull/add (closing_adjustment_amountsigned: negative = cash out, positive = cash in; plusclosing_adjustment_note). Fiscally signed only when the pull is non-zero; null/zero is a state-transition close with no TSE signature.
session_close no longer accepts counted_closing_amount or discrepancy_note. Those fields moved to session_cash_count. Bodies that include them on a close return 400.Breaking — session_close requires a preceding session_cash_count. A close on an un-counted session returns 409 session_not_counted.Breaking — once counted, the session is frozen. Posting sale / return / exchange / session_cash_adjustment / a second session_cash_count against a counted session returns 409 session_already_counted. Only session_close is accepted from the counted state.Breaking — SessionCloseOperation response shape narrowed. counted_closing_amount and discrepancy_note are no longer on the close response (they’re on the SessionCashCountOperation response).New session lifecycle state. Sessions transition open → counted → closed (was open → closed). The counted state is short-lived in the happy path — most integrators will POST count then close back-to-back.Update integrator end-of-shift flows to count first, then close, before your next release. See Sessions for the walkthrough.Register sessions: new operation types + session-bound POS operationsThree new operation types model the cash-drawer shift on a fiscalized register:
session_open— start a shift with a counted opening floatsession_cash_adjustment— record mid-shift cash movement (drop, pay-in, correction)session_close— end the shift with a merchant-counted closing balance
POST /operations (no separate sessions endpoint) and carry the same resource_version / ETag mechanics as goods-movement operations. They are born status: "completed" — there is no POST .../complete step for session events.Breaking — POS goods-movement now requires an open session. Sending POST /operations with source: "POS" on a register that has no open session is rejected with 409 no_open_session. Open the register’s session with session_open before posting POS sales, returns, or exchanges. At most one open session per register; opening a second while one is open returns 409 session_invalid_state.New field — session_id on operation responses. Every operation response now carries session_id on the envelope. For POS goods-movement, it’s the session the operation was rung up during. For session-event variants, it’s the session being opened/adjusted/closed. For ONLINE goods-movement (no register), it’s null.Breaking — GET /operations/{id} is now a discriminated union on type. Six variants: SaleOperation, ReturnOperation, ExchangeOperation, SessionOpenOperation, SessionCashAdjustmentOperation, SessionCloseOperation. Each variant carries only the fields meaningful to its type — SESSION_* responses no longer include zero-padded pretax_amount / total_amount / line_items / payments / fiscal_information, and goods-movement responses no longer include null session_*_details placeholders. SALE responses also drop the always-null related_operation_id and external_related_operation.See Sessions for the full walkthrough.Update integrators that issue POS operations to bracket each shift with session_open / session_close before your next release.Merchant
tax_id removed; Italian fiscal_identity reshapedThe top-level Merchant.tax_id field has been removed from create, update, and response shapes. Tax identifiers now live exclusively on fiscal_identity, where they can vary by country.The Italian fiscal_identity object (country_code: "ITA") has been replaced:- Removed (both optional):
vat_id,codice_fiscale. - Added (all required):
tax_number(Codice Fiscale — 11 numeric digits or 16 alphanumeric characters),vat_number(Partita IVA — 11 numeric digits),fisconline_user(16 alphanumeric characters; the Codice Fiscale of the person delegated to access the Agenzia delle Entrate portal),fisconline_password,fisconline_pin. legal_entity_type(COMPANY | INDIVIDUAL) is unchanged.
DEU) and Austrian (AUT) fiscal_identity shapes are unchanged.Update integrator code that creates or updates Italian merchants, and stop sending the top-level tax_id field for all merchants, before your next release.New endpoints:
POST /exports, GET /exports/{exportId}Two new endpoints expose asynchronous fiscal export jobs.POST /exports enqueues a job and returns 202 Accepted with { id, type, status: "pending", register_id?, from, to, created_at }. Required body fields: type (dsfinvk is the first available type), from and to (ISO 8601 date-times). Optional register_id scopes the export to a single register; when omitted, the export covers all eligible registers under the merchant for the matching fiscal regime.GET /exports/{exportId} returns the job. Once status is completed, download_url is a signed URL to fetch the artifact. When status is failed, error.message (and optional error.details) describes why.Both endpoints require the X-OpenFiskal-Merchant header.external_related_operation accepted on returns/exchangesPOST /operations with type: "return" or type: "exchange" now accepts a new optional field, external_related_operation, for cases where the original sale was never ingested into OpenFiskal (typically during platform migration before backfill).- Mutually exclusive with
related_operation_id— exactly one must be set on a return or exchange. - Both fields on the nested object are required strings.
- The same field is echoed on the operation response.
related_operation_id when the original sale exists in OpenFiskal; use external_related_operation otherwise.Sign convention enforced on
total_amount and line_items[].total_amountPOST /operations now rejects payloads whose amount signs do not match Operation.type:sale:total_amountand everyline_items[].total_amountmust be>= 0.return:total_amountand everyline_items[].total_amountmust be<= 0.exchange: no sign constraint (an exchange may net positive, negative, or zero).
sale (freebie) and return (zero-value return). Violations return 422 Unprocessable Entity.Sign is the only signal the TSE has to tell a sale from a return in its signature, so OpenFiskal enforces it before signing.Update return flows that previously sent positive amounts on type: "return" to send non-positive amounts before your next release.fiscal_identities[].country renamed to country_code; DE fields now requiredThe discriminator field on every fiscal_identity entry has been renamed from country to country_code. This applies to all three country variants (DEU, AUT, ITA) on both the create/update payload and the merchant response. Payloads that send country will reject.For DEU fiscal identities, tax_number (Steuernummer) and vat_id (USt-IdNr) are now both required. Previously both were optional. AUT and ITA requirements are unchanged.Update integrator code that creates or parses merchant fiscal_identities before your next release.OpenAPI JSON now served at
/openapi-jsonThe current production OpenAPI spec is now served at:- Production:
https://api.openfiskal.com/openapi-json - Sandbox:
https://sandbox.api.openfiskal.com/openapi-json
/docs-json is preserved as a 301 redirect to the new path. Import the new URL into Postman, Insomnia, or an OpenAPI code generator to scaffold a client.The OpenAPI spec always matches the live API implementation.Operation.status enum corrected; 412 payload includes expected_resource_versionThe Operation.status enum has been corrected from 'open' | 'completed' | 'cancelled' to 'open' | 'completed' | 'voided'. Operations that you POST /operations/{id}/void resolve to status: "voided", not cancelled. There were never any operations with status: "cancelled" in production — the OpenAPI value was wrong.412 Precondition Failed error bodies now include details.expected_resource_version alongside details.current_resource_version. The message field is the literal string "Resource version mismatch." (previously "The supplied If-Match value is stale.").Update Operation.status parsers to accept voided, and update any UI that surfaces the precondition_failed error message string.Operation type
refund renamed to returnThe Operation.type enum now uses return instead of refund for operations where goods come back from the customer. The valid values are sale | return | exchange.OpenFiskal now distinguishes goods movement from money movement: operations model goods (sale/return/exchange), refund is reserved for money movement (a negative payment transaction on an operation) and is not an operation type. This unlocks flows the old terminology could not express cleanly — return with store credit (goods back, no money), goodwill refund (money back, no goods), or partial refunds on kept items.POST /operationswithtype: "refund"will now reject. Usetype: "return".- Response shapes now return
type: "return"for what was previouslytype: "refund". Payment.statusenum is unchanged —refundedis still the correct status for a payment that has been reversed, because it describes money movement.
KassenSichV schema changes
FiscalInformationKassenSichVVerification: renamedtse_serialtotss_serial_numberandclient_idtopos_client_serial_number. Both remain required.FiscalInformationKassenSichVEndEvent: added requiredpublic_key(string).FiscalInformationKassenSichVStartEvent: removedtransaction_counterandsignature.signed_atis now the only required field.
Country code casingClarified that the
country field on Address and on the legal entity schema must be an ISO 3166-1 alpha-3 code in uppercase (for example, DEU). No behavior change; existing uppercase values continue to validate.New endpoint:
POST /registers/{registerId}/decommissionPermanently retires a fiscalized register. The endpoint calls the underlying TSE provider to decommission the register’s fiscal components and returns the updated register with decommissionedAt populated. Currently DE/KassenSichV only; AT/IT will follow as those regimes ship publicly.Conflicts return 409 decommission_conflict:- Register has not been fiscalized.
- Register has already been decommissioned.