Clean payments implementation

* Pull lookup helpers to a support module
* Make it clear in every API method what it actually does
* Group API operation helpers and error handlers and visually
separate them in source.