Under high renewable penetration, the declining energy prices cannot reflect capacity costs of generators. To deal with the missing money problem, several markets around the world have introduced capacity remuneration mechanisms. These mechanisms act well for the generation side by compensating investment costs, but the cost allocation methods among the demand side are non-differentiated or lagging, thus failing to effectively guide consumption patterns. This research proposes a novel two-step cost allocation framework to formulate real-time cost obligations. In replacement of load levels, net load levels (load minus renewable output) are used to measure adequacy conditions under high renewable penetration. The capacity costs are pre-allocated by Shapley value to obtain a mapping function from net load levels to cost obligations. In the real-time, the mapping function is incorporated into the spot market clearing model to generate obligations endogenously. Numerical analyses are conducted on the IEEE test system and an empirical case with California real data. Compared with the lagging obligations formulated by the current mechanism, the proposed framework can reduce peak net load by incentivizing demand responses and storage participation. The profile of real-time capacity cost obligations is illustrated for the California market to show the practicability of the method on a real-market.