Skip to main content

Overview

Each payment entry represents one authorization, cash leg, voucher redemption, or return settlement leg. Payments are supplied on POST /operations/{id}/complete; they cannot be reported before completion.

Payment enums

Both method and status are required on every payment leg, and amounts are decimal strings (e.g. "42.50") matching the operation’s amount fields. status is paired with the direction of money movement, enforced per operation type at completion:
  • captured (money in) is required for every SALE leg, and for EXCHANGE legs with a positive amount.
  • refunded (money out) is required for every RETURN leg, and for EXCHANGE legs with a negative amount.
  • A zero-amount EXCHANGE leg accepts either status.
A mismatch returns 422 payment_status_invalid_for_operation.

Split tender

Use one payment object per tender leg, each with its own payment_id (a repeated one returns 422 payment_id_duplicate). The sum of every payments[].amount must equal the operation’s total_amount, checked across the full array. For a SALE every leg is captured with a non-negative amount; for a RETURN every leg is refunded with a non-positive amount.

Cash rounding

Where the smallest coin is larger than the smallest price unit, a cash payment is rounded: a total of 173.63 CHF takes 173.65 in cash. Report that with rounded_cash_amount on the cash payment: the cash that actually changed hands.
  • amount does not change: it is the part of total_amount the payment settles. The payments add up to total_amount using amount, exactly as without rounding, so a rounded payment never needs an outstanding_amount or an adjusted total.
  • rounded_cash_amount has the sign of amount, or is 0 where the amount rounds to nothing (0.40 CZK). A cash refund of 25.42 that pays out 25.40 is "amount": "-25.42", "rounded_cash_amount": "-25.40". A payment with an amount of 0 moves no cash, so its rounded_cash_amount is 0 too.
  • Only the cash payment rounds. In a split of card and cash, the card payment has no rounded_cash_amount; a cash payment operation that settles an open amount later carries its own.
  • It may differ from amount by at most half the smallest cash denomination of the currency (0.025 for CHF and EUR, 0.50 for CZK, SEK and NOK, 0.25 for DKK), and must be a whole multiple of that denomination. Send the amount your POS actually took; OpenFiskal does not compute a rounding.
  • Leave it out when the cash was not rounded. Responses return it as sent, or null.
  • A register fiscalized for Germany, where cash is not rounded, accepts it only when it equals amount. A Czech register accepts cash rounded to whole crowns: Czech sales reporting counts the cash actually received.
See rounded_cash_amount_invalid and rounded_cash_amount_not_supported in Errors.

Tips and gratuity

Use tip_amount on the operation when the tip is part of the fiscalized sale. If your payment processor returns separate payment references for base amount and tip, keep separate payment entries and distinguish them through your own external payment metadata.

Settlement state

v1 records a single, final payment state per leg: status is either captured or refunded. There is no authorized, pending, or failed state, and a completed operation is immutable, so a leg’s status never changes after completion. Report each leg with its settled status at completion, and keep processor and processor_reference on the leg for your own reconciliation against the payment processor.

Returns on prior sales

A return is a new operation with type: return referencing the original sale via related_operation_id when the sale exists in OpenFiskal, or via external_related_operation for sales from a legacy platform. The return’s payments array on completion describes the settlement legs that returned money to the customer.

Returns on a sale with an open amount

When the sale left part of its total open (outstanding_amount) and the goods come back, the customer gets back only what they actually paid. The rest is not paid back in money: the open claim is dropped. Send that part as released_outstanding_amount when you create the return:
Complete it with the money that really goes back. The payments add up to total_amount plus released_outstanding_amount (here -1999.00 + 1800.00 = -199.00):
  • A return that releases its whole total (for example a cancelled order that was never paid) completes with payments: [].
  • released_outstanding_amount is at most the value of the returned goods (-total_amount). With related_operation_id it is also at most what the sale or exchange has open now, after its payments and earlier releases. It is checked when you create the return and again when you complete it.
  • A sale OpenFiskal never recorded (for example from before your merchant used OpenFiskal) can have an open amount too. Name it with external_related_operation and send released_outstanding_amount as above. OpenFiskal never recorded that open amount, so it checks only the value of the returned goods: the amount you send is what is released.
  • How a partial return splits between money back and release is your choice. OpenFiskal only enforces the limits above.
  • With related_operation_id, once completed, the release lowers the sale’s outstanding_amount, and the sale lists the return in releasing_returns, next to payment_operations. A payment can no longer settle what was released.
  • For German fiscalization, the receipt signs the goods back at their VAT rates and the release in the 0 % bucket, so the signed amounts add up to the money paid back. The DSFinV-K archive files a Forderungsaufloesung referencing the sale’s receipt, or, for a sale named with external_related_operation, referencing it as an external process (ExterneSonstige) with its description and id. It is a return, not a cancellation.

Next steps