A single-serve capsule for preparing a beverage with a beverage preparation machine, the single-serve capsule comprises a base element having a cavity in which a beverage raw material is provided, the base element has an open end and an opposing closed end, an encircling flange at the open end, a capsule wall that extends between the open end and the closed end, a lid element comprising a top side and a bottom side, the bottom side of the lid element is fastened to the encircling flange to close the cavity, and an optically detectable identification code on the bottom side of the lid element,
- wherein the lid element comprises an annular element, the annular element has a diameter that is greater than a diameter of the encircling flange, the optically detectable identification code is provided on the bottom side of the lid element in a region projecting laterally beyond the encircling flange and/or on an underside of the annular element.