A distributed billing and paying system