Userpoints: deduct points programmatically
You can use userpoints_userpointsapi and pass points in negative if you want to deduct.

example

    $params = array(
      'uid' =&gt; $user-&gt;uid,
      'points' =&gt; -5,
      'operation' =&gt; 'mymodule_some_operation',
    );
    userpoints_userpointsapi($params);


For more information http://drupal.org/node/993376  http://api.worldempire.ch/api/userpoints/userpoints-7.x-1.x%21userpoints.module/function/userpoints_userpointsapi/7-1