Online consumer lending has recently been growing rapidly, but it faces high credit risk. For this problem, developing powerful credit scoring models has become an effective solution and can be achieved from three aspects: modeling approach, data source, and evaluation measure. This paper proposes a novel model that departs from those in previous studies in threefold. First, a heterogeneous deep forest model that combines deep learning architecture and tree‐based ensemble classifiers is proposed as the modeling approach. Second, a Bayesian‐based macroeconomic variable optimization method is developed to determine the macroeconomic variables and the corresponding lag term, and the selected macroeconomic variables are used as supplementary data source for modeling. Lastly, a series of capital charge error measures is proposed to evaluate credit scoring models from a regulatory perspective. The proposal is evaluated on multiple large datasets under performance measures on predictive accuracy, profitability, and capital charge errors. Frequentist and Bayesian nonparametric significance tests are used to examine the statistical significance of heterogeneous deep forest and benchmarks. Three main conclusions can be reached from the comparison. First, heterogeneous deep forest significantly outperforms the industry benchmarks over all the evaluation measures. Second, the predictive performance is enhanced after incorporating the selected macroeconomic variables and the corresponding lag, and the result remains robust under cross‐validation and forward‐chaining validation. Third, the capital charge errors reflect the model performance from a regulatory perspective and thus lead to different rankings from those when evaluating predictive accuracy and profitability.