Page 3 of Jim Wheeler's tutorial is a good starting point.
http://wwwebworks.com/ht/fyi/Jim_Wheeler_Charging.htm