We introduce a general notion of transport cost that encompasses many costs used in the literature (including the classical one and weak transport costs introduced by Talagrand and Marton in the 90's), and prove a Kantorovich type duality theorem. As a by-product we obtain various applications in different directions: we give a short proof of a result by Strassen on the existence of a martingale with given marginals, we characterize the associated transport-entropy inequalities together with the log-Sobolev inequality restricted to convex/concave functions. Some explicit examples of discrete measures satisfying weak transport-entropy inequalities are also given.