In real life situation, it is observed that demand of an item depends on the length of the credit period offered by the retailer to his customers which has a positive impact on demand of an item. But the impact of credit period on demand has received a very little attention by researchers. Furthermore, by allowing shortages as backlogging, the impact on the cost from the decay of the products can be balanced out. A profitable decision policy between a supplier and the retailers can be characterized by an agreement on the permissible delay in payments. Recently, Jaggi et al. (Eur J Oper Res 190:130–135, 2008) have investigated the impact of credit linked demand on the retailer’s optimal replenishment policy. The objective of this study is to extend Jaggi et al. (Eur J Oper Res 190:130–135, 2008) model by incorporating deterioration and backlogging. That is, we formulate a two-echelon inventory model for deteriorating items with credit period dependent demand including shortages under two-level trade credit financing and determine the retailer’s optimal replenishment policy when both the supplier as well as the retailer offers the credit period to stimulate customer demand. Furthermore, we establish some useful theorems to characterize the optimal solution and provide an easy and useful computational algorithm with the help of computer code using the software Matlab 7.0 to determine the optimal shortage point, cycle length, ordering quantity and credit period. A numerical example is included to illustrate the solution procedure for the mathematical model developed. Finally, we implement sensitivity analysis of the optimal solution with respect to the major parameters of the system and obtain some important managerial insights.