Just managed to figure it out by adding the fee to the line item and on complete loading and saving the order.
function prepare($line_item, stdClass $row) {
$line_item->type = 'product';
// Add a base price component.
$line_item_wrapper = entity_metadata_wrapper('commerce_line_item', $line_item);
$price = $line_item_wrapper->commerce_unit_price;
$base_price = array(
'amount' => $price->amount->value(),
'currency_code' => $price->currency_code->value(),
'data' => array(),
);
$booking_fee = array(
'amount' => '100',
'currency_code' => $price->currency_code->value(),
'data' => array(),
);
$line_item_wrapper->commerce_unit_price->data = commerce_price_component_add($base_price, 'booking_fee', $booking_fee, TRUE);
}
/**
* A line item has been saved. Reference it from the order.
*/
function complete($line_item, stdClass $row) {
$order_id = $line_item->order_id['destid1'];
$delta = db_query("SELECT COUNT(entity_id) FROM {field_data_commerce_line_items} WHERE entity_id = :order_id",
array(':order_id' => $order_id))->fetchField();
db_insert('field_data_commerce_line_items')
->fields(array(
'entity_id' => $order_id,
'revision_id' => $order_id,
'entity_type' => 'commerce_order',
'bundle' => 'commerce_order',
'deleted' => 0,
'language' => LANGUAGE_NONE,
'delta' => $delta,
'commerce_line_items_line_item_id' => $line_item->line_item_id,
))
->execute();
$order = commerce_order_load($order_id);
$order_wrapper = entity_metadata_wrapper('commerce_order', $order);
commerce_order_save($order_wrapper->value());
}