Several fixes and improvements to the payment API, documentation, added more exceptions