Cancel a maintenance charge
Cancels a posted maintenance charge of the ledger, sets its status to canceled and marks it with canceledAt. A charge with its fee transaction reverts it through the /v2 revert: the paid amount goes back to the account, what stays open of the fee debt it opened is canceled, and what a later credit settled of it is given back to the debtor. A charge posted without a fee transaction, whose fee only opened a fee debt (origin billing_charge on GET …/fee-debts), cancels that debt without moving any balance and without recording a transaction; what a later credit already paid of that debt goes back to the debtor by a transaction that names the execution that opened it in the reserved metadata feeDebtOriginId, booked under the routes the debt opened with, and whose revert is refused (0088). A canceled charge is not charged again: a later billing/charge call for the period answers it replayed. A second cancel answers 200 with the same charge, the same canceledAt, and X-Idempotency-Replayed, changing nothing. A charge of another ledger or organization is not found (404, 0007). A charge that is not posted, refused or still being posted by a call, is refused (409, 0586) and nothing changes. A refusal of the revert, such as an account that can no longer give the paid amount back, answers the revert’s error and leaves the charge as it was. ledgerId in the query is refused with 0235.
Parámetros de ruta
Respuesta
OK
posted: the maintenance fee was charged, by a fee transaction or, when the account could not fund it and the package is deferrable, as a fee debt only. refused: the fee transaction was refused with code. canceled: a posted charge was canceled.
posted, refused, canceled "posted"

