How to exclude the shipping rate from the payment amount?

Is it possible to make the charge in amount of product price (without shipping cost) and maybe save shipping to metadata?