Electricity demand is rising due to industrialisation, population growth and economic development. To meet this rising electricity demand, towns are renovated by smart cities, where the internet of things enabled devices, communication technologies, dynamic pricing servers and renewable energy sources are integrated. Internet of things (IoT) refers to scenarios where network connectivity and computing capability is extended to objects, sensors and other items not normally considered computers. IoT allows these devices to generate, exchange and consume data without or with minimum human intervention. This integrated environment of smart cities maintains a balance between demand and supply. In this work, we proposed a closed-loop super twisting sliding mode controller (STSMC) to handle the uncertain and fluctuating load to maintain the balance between demand and supply persistently. Demand-side load management (DSLM) consists of agents-based demand response (DR) programs that are designed to control, change and shift the load usage pattern according to the price of the energy of a smart grid community. In smart grids, evolved DR programs are implemented which facilitate controlling of consumer demand by effective regulation services. The DSLM under price-based DR programs perform load shifting, peak clipping and valley filling to maintain the balance between demand and supply. We demonstrate a theoretical control approach for persistent demand control by dynamic price-based closed-loop STSMC. A renewable energy integrated microgrid scenario is discussed numerically to show that the demand of consumers can be controlled through STSMC, which regulates the electricity price to the DSLM agents of the smart grid community. The overall demand elasticity of the current study is represented by a first-order dynamic price generation model having a piece-wise linear price-based DR program. The simulation environment for this whole scenario is developed in MATLAB/Simulink. The simulations validate that the closed-loop price-based elastic demand control technique can trace down the generation of a renewable energy integrated microgrid.