This paper investigates an integrated inventory model with variable production rate and price-sensitive demand rate under two-level trade credit. The model considers two-level trade credit policy in which the retailer receives a full trade credit from its supplier, and offers partial trade credit to its customers. It is assumed that an arrival order lot may contain some defective items and the number of defective items is a random variable. This study attempts to offer a best policy for retail price, the replenishment cycle, and the number of shipment from the supplier to the retailer in one production run that aims at maximizing the joint expected total profit per unit time. An algorithm is designed to identify the optimum solution of the proposed model. Numerical examples are included to illustrate the algorithmic procedure and the effect of key parameters is studied to analyze the behavior of the model.