empty drupal commerce cart with a url?
The code would look something like this:

function MYMODULE_menu() {
  $items['cart/empty'] = array(
    'title' =&gt; 'Empty Cart',
    'access arguments' =&gt; array('access content'), // or whatever permission you want
    'page callback' =&gt; 'MYMODULE_empty_cart',
    'type' =&gt; MENU_CALLBACK
  );

  return $items;
}

function MYMODULE_empty_cart() {
  global $user;
  // Load the order and empty the cart
  $order = commerce_cart_order_load($user-&gt;uid);
  commerce_cart_order_empty($order);

  // As this page won't display anything you need to redirect somewhere
  drupal_goto('some/page');
}