Refunds
Refunds for lost or returned packages, or manual (ops only).
Request a manual refund (ops only)
RequestRefund, the ops route. Automatic refunds come from the RefundOnLostPackage and RefundOnReturnToSender policies. The order must have an authorization (else 404). groupNo is optional: absent or 0 refunds at the order level. Refunds of an order (and of a group) never exceed the captured total (ErrOverRefund); FAILED refunds do not count. The provider is tried once in the same call: the answer is 201 with the refund SUCCEEDED, FAILED (provider decline, failureCode set) or still REQUESTED (provider unreachable; a policy retries it), never 503.
List refunds of an order
ListRefunds. Keyset-paged, oldest first (createdAt, refundId): follow nextCursor until it is absent and repeat orderId on every page request.
Get one refund
GetRefund.
Retry a failed refund (ops only)
RetryRefund, the ops route; no request body. Moves a FAILED refund back to REQUESTED and tries the provider once more, at most 5 attempts in all. The answer is 200 with the Refund as it stands after that attempt (SUCCEEDED, FAILED again with failureCode, or still REQUESTED when the provider is unreachable); it is never 503. A refund that is not FAILED, or whose attempts are used up, is 409 illegal-transition.