Builds a clawback operation: books the credit side of a bank chargeback or fraud recovery
(the dollars move back at the payment processor, outside this ledger). It debits the user's
spendable for whatever is still there, books the unrecoverable shortfall to RECEIVABLE,
and credits the full amount back to STORED_VALUE, un-issuing the credits rather than booking
revenue the platform never earned. Restricted to a system or operator actor; in production
the verified dispute webhook is the usual caller. It has no rejected path — a well-formed
clawback always commits, even against an empty wallet. An orderId-tied clawback shares the
reversed:<orderId> claim with refund, so an already-reversed order returns duplicate; for
a disputed sale, refund first, then claw back untied from the order.
Builds a
clawbackoperation: books the credit side of a bank chargeback or fraud recovery (the dollars move back at the payment processor, outside this ledger). It debits the user'sspendablefor whatever is still there, books the unrecoverable shortfall toRECEIVABLE, and credits the full amount back toSTORED_VALUE, un-issuing the credits rather than booking revenue the platform never earned. Restricted to asystemoroperatoractor; in production the verified dispute webhook is the usual caller. It has no rejected path — a well-formed clawback always commits, even against an empty wallet. AnorderId-tied clawback shares thereversed:<orderId>claim with refund, so an already-reversed order returnsduplicate; for a disputed sale, refund first, then claw back untied from the order.