Cancel a prepared checkout
cancel_checkoutDeclines a prepared checkout, returning status canceled: it asks the store to cancel that checkout. Use when the person declines, so a refusal is a recorded outcome rather than an inferred one. Not for reversing a payment: RoboTrunk holds no stock and charges nothing. Not for after approval; use get_order. Next: search_catalog for something else, or submit_feedback to say why. Error recovery: not_found (the demo) or CHECKOUT_NOT_FOUND (a store's checkout) means that checkout was never prepared here, so call create_checkout; continuation_not_found or RUN_AUTH_REQUIRED means send checkout_id exactly as an earlier answer returned it and, if you did, the checkout can no longer be read from here, so call create_checkout again; UCP_MERCHANT_BUSY, UCP_MERCHANT_REFUSED or UCP_MERCHANT_UNAVAILABLE means the store did not take the cancel, so try again shortly; on the demo a failed decline record is only a warning and the cancel still stands; any other error, including tool_layer_failure: retry once, then call submit_feedback. For RoboTrunk's test demo checkout (merchant null) it closes the checkout here and records the decline. Full guide: get_tool_guide or /agent/tools.json#cancel_checkout Example call: {"checkout_id":"the checkout_id create_checkout returned","reason":"Above the person's ceiling"}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Why the checkout was declined, or null. Free text up to 300 characters; do not put personal data here. | |
| checkout_id | Yes | The `checkout_id` returned by `create_checkout` in this browser. | |
| shopping_session_id | No | Optional server-issued shopping session correlation ID. It is not purchase authority. |