BACKGROUNDWith growing concerns over the adverse effects of animal‐derived products on health, animal welfare and the environment, the rising popularity of plant‐based foods underscores the importance of understanding consumer preferences and determining acceptance. The present study takes the form of a case study that utilized innovative legume‐based flours to develop multiple gnocchi products. The Becker–DeGroot–Marschak (BDM) mechanism as an auction method was employed to elicit consumers’ willingness to pay (WTP) following a hedonic evaluation test involving 127 Spanish consumers.RESULTSThe findings indicate that a majority of consumers exhibit a high level of environmental concern, coupled with increased trust in, as well as perceptions of, the benefits of consuming plant‐based products. However, they demonstrated moderate attitudes with regard to plant‐based products. Notably, product sample tasting had a negative impact on consumers’ WTP for legume‐based gnocchi. The respondents' education level, income, financial situation, government support, environmental concerns, perceived risks, flavor and color significantly influenced consumers’ WTP.CONCLUSIONThe present study offers initial insights into consumer attitudes and WTP for legume‐based products in Spain. The findings are of relevance for producers and marketers aiming to promote environmentally‐sustainable food production and consumption. They may also play a pivotal role in facilitating the successful introduction and sale of such plant‐based products in the Spanish market. Going forward, addressing any limitations of this study and exploring further research avenues will be crucial for refining our understanding of consumer behavior in this context. © 2024 The Author(s). Journal of the Science of Food and Agriculture published by John Wiley & Sons Ltd on behalf of Society of Chemical Industry.