Userpoints: deduct points programmatically Is there a way to programmatically deduct points from user points?

I want to deduct points from users if a certain "featured Item" field is checked when they create a new content, but don't want to deduct points from users that created content without "featured Item" checked.
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