Skip to main content
Connect to https://mcp.opencommerce.sh/mcp with your Commerce SDK credentials as Authorization: Bearer <YOUR_CLIENT_ID>:<YOUR_CLIENT_SECRET>. See Connect your agent.
start_return isn’t available on the server yet. Until it is, a call answers order_actions_unavailable.
Behavior: Changes state on the second call only. The quote changes nothing and can be asked again. Never resend the confirm.

What it does

Returns a whole placed order in two calls. The first call, without confirm_token, returns a quote with the refund, the card it goes back to, a confirm_token, and its expires_at, and changes nothing. Show the shopper the refund and ask. Only after the shopper says yes to that quote, call again with the same reason and the quote’s confirm_token. That opens the return once and answers return_id. The labels and the refund come later: read them with get_return.

Inputs

Returns

Example calls

Ask for the quote:
After the shopper says yes to the quote, send the same call with its token:

Notes

  • reason is one of damaged, not_delivered, empty_box, wrong_item, defective, not_as_described, wrong_size, no_longer_needed, or other.
  • If the confirming call’s result is uncertain, call get_order to see whether it went through. Never resend it.
  • return_not_supported means the store doesn’t take returns for this order. Tell the shopper the reason and the next step the message names.
  • order_actions_unavailable means returning isn’t available yet. Tell the shopper to contact the store, or check the order with get_order.