Electricity markets are going through a comprehensive transformation that includes the large-scale appearance of intermittent renewable generators (RGs). To handle the local effects of new RGs on the distribution grid, the more efficient utilization of distributed local flexibility (LF) resources is necessary. However, the optimal market design is not yet known for LF products. This paper investigates a novel cost allocation mechanism in the context of this market challenge. The mechanism is designed to provide several important advantages of peer-to-peer trading without creating barriers to practical application. It provides partial disintermediation. The acquisition of LF remains the responsibility of the DSO, while the financial costs of the transaction are covered on power exchanges (PXs). To provide this functionality, the clearing algorithm of the PX in question has to incorporate a novel feature we call the Payment Redistribution Technique. This technique allows the buyers’ expenses to be larger than the sellers’ income, and the difference is used to finance flexibility costs. Its mathematical formulation is presented and analyzed in detail, considering computational efficiency and accuracy. Afterward, a realistic case study is constructed to demonstrate the operation of the algorithm and its energy market effects.