Abstract Background A national pay-for-performance (P4P) scheme was introduced in the Netherlands to incentivize appropriate prescribing among general practitioners (GPs) using routine care data of electronic health records (EHRs). The goal of this program was to encourage GPs to choose the most clinically appropriate and cost-effective medication for their patients to promote an affordable and sustainable health system. Nivel facilitated and evaluated this program. Facilitators and barriers of this P4P program were assessed as part of this endeavour. Methods Semi-structured interviews were conducted with all stakeholder representatives (n = 15) to evaluate their experiences with the program. The interviews were analysed thematically. Results Our research was structured around the three ‘flows’ necessary for an effective learning health system. The ‘data to knowledge’ flow was impacted by: 1) effect of different EHR information systems on data quality, and 2) advantages of using EHR data for measuring quality of care, minimising GPs’ administrative burden. The ‘knowledge to practice’ flow was impacted by: 1) meaningfulness and robustness of indicators, and 2) measure for appropriate prescribing. The ‘practice to data’ flow was impacted by: 1) feedback to GPs, with most stakeholders emphasizing the need for GPs to reflect on their results with other GPs to stimulate learning, 2) impact of the P4P model, such as improvement in quality of GP registration in EHRs and better stakeholder collaboration, and 3) methods, communication and GP perspectives on the performance payment. Conclusions The study showed the factors that can support or hinder P4P programs in promoting appropriate care with EHR data for a sustainable and affordable health system. Enhancing uniformity of EHR information systems is crucial for more consistent quality of care assessment. To encourage GPs to deliver better care, it is recommended to complement monetary incentives with other forms of incentives. Key messages • This study showed that routine healthcare data are feasible for the use in P4P schemes promoting a sustainable and affordable health system. • P4P as a standalone approach may not be optimal for promoting a sustainable and affordable health system.