In today's competitive markets, offering delay payments has become a commonly adopted method. In this paper, we examine an optimal dynamic decision-making problem for a retailer selling a single deteriorating product, the demand rate of which varies simultaneously with on-hand inventory level and the length of credit period that is offered to the customers. In addition, the risk of default increases with the credit period length. In this study, not only the supplier would offer fixed credit period to the retailer, but retailer also adopt the trade credit policy to his customer in order to promote the market competition. The retailer can accumulate revenue and interest after the customer pays for the amount of purchasing cost to the retailer until the end of the trade credit period offered by the supplier. A generalized model is presented to determine the optimal trade credit and replenishment strategies that maximize the retailer's total profit after the default risk occurs over a planning period. For the objective function sufficient conditions for the existence and uniqueness of the optimal solution are provided. Some properties of the optimal solutions are shown to find the optimal ordering policies of the considered problem. At the end of this paper, some numerical examples and the results of a sensitivity and elasticity analysis are used to illustrate the features of the proposed model; we then offer our concluding remarks.