Routing algorithms in delay tolerant networks often need nodes serving as relays for the source to carry and forward message. In particular, nodes should relay the source's packets to others. However, because of the selfish nature, nodes may not relay others' packets to save energy after obtaining message. To make these nodes be cooperative, the source has to pay certain fees to them. Moreover, such fees may be varying with time. On the other hand, if the payment is too much, it may not be cost-effective for the source. Therefore, the total cost may be limited. The main objective of this paper is to explore efficient incentive policies for the source to use its limited cost (maximal fees that the source can afford is limited) to maximize the probability that the destination obtains the message before the deadline of the message. First, we present a theoretical framework, which can be used to evaluate the performance of different incentive policies. Then, we explore the optimal incentive policy through Pontryagin's maximal principle and prove that the optimal policy conforms to threshold form in certain cases. Simulation results show the accuracy of our theoretical framework. Extensive numerical results show that the optimal policy obtained in this paper is better than other policies. Copyright © 2013 John Wiley & Sons, Ltd.