Skip to main content

errand_pre_cancel

A pre-check before cancelling: looks up the penalty required to cancel this order and the expected refund amount. This tool only queries — it does not cancel the order.
Recommended flow: cancelling after a rider has accepted the order may incur a penalty. Call this tool first, show the penalty and expected refund to the user for confirmation, then call errand_cancel to actually cancel.
Unpaid orders carry no penalty: this tool returns normally with cancel_fee 0 and refund_amount 0 (nothing has been paid, so there is nothing to refund). Just call errand_cancel directly.

Parameters

Returns

The amount fields (cancel_fee / quote_fee / refund_amount) are all in cents (integer).

Error Codes

Example Call