Builds a refund operation: reverses the completed sale recorded under orderId, leg for
leg. The buyer gets the full price back; each seller's earned clawback is capped at the
balance they still hold, with any uncollectable remainder booked to RECEIVABLE so no user
account goes negative. The same transaction revokes the buyer's (or gift recipient's)
entitlement to the SKU. Restricted to a system or operator actor — a self-serve refund
would be a fraud vector. Rejects only with UNKNOWN_ORDER. An order is reversed at most once:
refund and an order-tied clawback share a reversed:<orderId> claim, so a second reversal of
the same order returns the recorded transaction as duplicate, as does a retry under the same
idempotencyKey.
Builds a
refundoperation: reverses the completed sale recorded underorderId, leg for leg. The buyer gets the full price back; each seller'searnedclawback is capped at the balance they still hold, with any uncollectable remainder booked toRECEIVABLEso no user account goes negative. The same transaction revokes the buyer's (or gift recipient's) entitlement to the SKU. Restricted to asystemoroperatoractor — a self-serve refund would be a fraud vector. Rejects only withUNKNOWN_ORDER. An order is reversed at most once: refund and an order-tied clawback share areversed:<orderId>claim, so a second reversal of the same order returns the recorded transaction asduplicate, as does a retry under the sameidempotencyKey.