Selling per kWh is legal in California, and a few other states. (Car Charging Inc. has set their fee set at $.49 per kWh in their mostly parking garage location sites... whenever possible.) In the other states, charging is billed per hour plugged in.
It is illegal to resell electricity in California, but California voted not to consider car charging to be regulated under CPUC in 2010.
http://gigaom.com/cleantech/cali-makes-it-official-electric-car-charging-wont-fall-under-utility-rules/