In this paper, we formulate and solve an economic order quantity model with default risk. Our main purpose is to investigate retailer's optimal replenishment time and credit period for deteriorating items under selling price-dependent demand while maximizing profit per unit time. Here, shortages are allowed and items are partially backlogged for interested customers. We show that optimal replenishment time and credit period not only exist but they are also unique. We solve the proposed problem analytically. An algorithm is presented to derive the optimal solution of the model. The mathematical model is evaluated by numerical examples. We use Mathematica to obtain a global maximum solution to the optimal cycle time and the optimal credit period for the proposed model. A sensitivity analysis with respect to major parameters is performed in order to examine the stability of our model. At the end of the paper, conclusions are drawn and an outlook of possible future directions is depicted.