Credit cards information hold a large proportion of consumption habits. For banks, credit cards bring a lot of benefits on business. However, it increases the risk of customer defaults and cause huge losses at the same time. The default customers are minority of the whole data, which is not easy to predict and it belongs to the field of imbalanced data. This study uses different resampling methods for processing the data structure, and uses methods of ensemble learning combined with machine learning algorithms for predicting potential default customers, including logistic regression, support vector machine, random forest, and extreme gradient boosting. Accordingly, bank can keep the cost down. We compare the performance of different resampling methods with the model of ensemble learning through some appropriate evaluation indexes, and discuss the application of ensemble learning in imbalanced data.