PurposeThe purpose of this paper is to investigate the prerequisites of customer online experience and its outcomes in banks. Brand congruity is an important mediating variable in these connections.Design/methodology/approachA quantitative approach is used to test the model based on the literature review. The subjects are online customers of an Iranian bank, Bank Mellat, in East Azerbaijan Province, which is famous for its e-banking. Data analysis was conducted using structural equation modeling.FindingsThe results suggested that the prerequisites of customer experience affected customer experience, which was, in turn, divided into two components (affective experience and functional experience). Besides, brand congruity played a moderating role in the relationship between prerequisites and consequences.Research limitations/implicationsIn the model, brand congruity was the only moderating variable and other moderating variables were excluded. Further, test results were related to a specific brand.Practical implicationsThis paper explores how the behaviors of customers could be improved in the online context by concentrating on determinants of customer online experience. The paper offers implications for the improvement of customer online experience in service marketing, especially in banking.Originality/valueThis is the first study in Iran to use brand congruity as a way of surveying the perquisites and outcomes of online experience in banking. The findings expand the importance of brand congruity in online experience to the entire banking sector.