We propose an online pricing mechanism for electric vehicle (EV) charging. A charging station decides prices for each arriving EV depending on the energy and the time within which the EV will be served (i.e. deadline). The user selects either one of the contracts by paying the prescribed price or rejects all depending on their utilities. The charging station has to select a price without knowing the future arrival times of the EVs and the utilities of the EV users. We show that there exists a social welfare pricing strategy, however, the above may not maximize the expected profit of the charging station and even the profit may be 0. We propose a fixed profit pricing strategy which provides a guaranteed fixed profit to the charging station. Numerically, we show that how the charging station can select a profit margin to trade-off between profit and the users' surpluses. We also show empirically that since our proposed mechanism also controls the deadline of the vehicles compared to the existing pricing mechanisms, hence, the number of charging spots required can be lower.