Recently, instant delivery has been growing rapidly, with numerous platforms emerging to offer such services. Requestors dynamically arrive at the platform to place delivery service requests that detail their pickup locations, recipient locations, package weights, departure times, and willingness-to-pay (WTP). The platform then uses its dedicated riders, scattered in different places, to fulfill these requests. Given the dynamic and fluctuating characteristics of the demand, coupled with limited rider resources and heterogenous pickup costs, the platform faces the critical problem of dynamically pricing the requests and assigning the riders to maximize social welfare. To address this problem, we propose an online auction-based transaction mechanism. Specifically, we first propose a scoring function to evaluate the values of the requests over multi-period operations taking into account the requests’ attributes, riders’ delivery costs, and resource availability. Based on the scoring function, we design a time-varying Vickrey–Clarke–Groves (VCG)-like payment rule that can reflect the impacts of fluctuating supply-demand imbalances. Under this rule, a requestor will pay more during undersupply periods than during oversupply periods. To carve out the different impact degrees of the supply-demand imbalances, we further consider the linear, quadratic, and exponential time-varying resource parameters to construct the payment rule. In addition, we develop an online instant delivery resource allocation model to efficiently assign the riders to fulfill the accepted requests. We show that the proposed mechanism has desirable properties (individual rationality, budget balance, and incentive compatibility) and is computationally efficient. Furthermore, we give a lower bound for the mechanism efficiency. To validate the practicality of our mechanism and get some managerial insights into the operations of the instant delivery platform, we conduct numerical studies to compare the performance of our mechanism to the First-in, first-out (FIFO) allocation mechanism and to investigate the impacts of pricing functions, rolling horizon configurations, and rider numbers on the mechanism's performance.