How can I add a custom price to a cart as an attribute of product type in Drupal Commerce? How can I add custom price to cart as an attribute of product type in Drupal Commerce?

In detail am creating a custom tshirt design UI where user have the options to design a tshirt(add image,text etc) and add to cart. I have loaded all the products in the site to the UI and user have the option to add  product to cart after designing. User is charged with an extra amount for designing like adding each images to tshirt which increases the base price of tshirt. But my issue is that the products get added to cart with the base price. I have used the folowing code to add the product to cart.

commerce_cart_product_add_by_id($pid, $quan, $combine = TRUE, $uid);


When I searched and found that there is no way to add the custom price as parameter of the above function so that the altered price gets added to cart. But found another solution that it can be done by adding as an attribute of the product. 

How can I  map the custom price I have created as an attribute of the product and add to cart for altering the price section?
Below these modules will help you with bit of customization or addons

Commerce Product Attributes


  This module provides some enhancements to the Drupal Commerce
  attribute handling.


Commerce Product Option


  This module allows you to add user-customizable options to the
  commerce "add to cart" form. You do this by defining "option sets", to
  which you can attach any field of your choosing. These option sets can
  then be added to your commerce products using entity reference, after
  which the fields in your option set will show up in the add to cart
  form.


Commerce Pricing Attributes


  This module provides some enhancements to the Commerce Product Option
  and Commerce Product Attributes handling by applying pricing rules to
  custom product attributes. So, you can add attributes to products that
  affect the final product price.