diff --git a/userpoints.module b/userpoints.module
index 420d700..0c3d308 100644
--- a/userpoints.module
+++ b/userpoints.module
@@ -1254,6 +1254,9 @@ function userpoints_get_vid() {
           'module' => 'userpoints',
       );
       taxonomy_vocabulary_save($vocab);
+      if ($instance = userpoints_get_term_reference_field() === TRUE) {
+        drupal_set_message(t('Created taxonomy term reference field on userpoints transaction entity.'));
+      }
       $vid = $vocab->vid;
     }
     variable_set(USERPOINTS_CATEGORY_DEFAULT_VID, $vid);
@@ -1265,6 +1268,70 @@ function userpoints_get_vid() {
 }
 
 /**
+ * Returns a taxonomy term reference field instance that already exists or
+ * is created.
+ */
+function userpoints_get_term_reference_field() {
+  $field_name = 'field_userpoints_category';
+
+  if ($field = field_info_field($field_name) === FALSE) {
+    // Field does not exist.
+    $field_info = array(
+      'field_name' => $field_name,
+      'type' => 'taxonomy_term_reference',
+      'settings' => array(
+        'allowed_values' => array(
+          array(
+            'vocabulary' => 'userpoints',
+            'parent' => 0,
+          ),
+        ),
+      ),
+    );
+
+    $field = field_create_field($field_info);
+  }
+  elseif ($field['type'] != 'taxonomy_term_reference') {
+    // Throwing an exception here probably is a bad idea.
+    watchdog('userpoints', 'Userpoints requires field_userpoints_category to be a taxonomy term reference field.', array(), WATCHDOG_ERROR);
+    return FALSE;
+  }
+  else {
+    // Check if the vocabulary machine name exists in allowed values.
+
+    $has_vocab = FALSE;
+    foreach ($field['settings']['allowed_values'] as $item) {
+      // @todo Use an array_reduce anonymous function instead?
+      if ($item['vocabulary'] == 'userpoints') {
+        $has_vocab = TRUE;
+      }
+    }
+
+    if (!$has_vocab) {
+      $field['settings']['allowed_values'][] = array(
+        'vocabulary' => 'userpoints',
+        'parent' => 0,
+      );
+      $field = field_update_field($field);
+    }
+  }
+
+  if ($instance = field_info_instance('userpoints_transaction', $field_name, 'userpoints_transaction') === FALSE) {
+    // Create a field instance if it does not exist.
+    $instance_info = array(
+      'field_name' => $field_name,
+      'bundle' => 'userpoints_transaction',
+      'entity_type' => 'userpoints_transaction',
+      'label' => t('Category'),
+    );
+
+    $instance = field_create_instance($instance);
+  }
+
+  return $instance;
+}
+
+/**
  * Returns an array of possible categories, suitable for inclusion in FAPI.
  *
  * @ingroup userpoints_api
