A method for producing a capsule containing beverage ingredients designed for insertion in a beverage production device in which a liquid under pressure enters the capsule in order to interact with the ingredients in the capsule and to form beverage. The method includes preforming the capsule body and at least a portion of said flange-like rim, placing a premade sealing member on the flange-like rim, crimping a portion of the flange-like rim on a portion of the sealing member so resulting in the sealing member becoming attached to the flange-like rim.