implement payments apis and close #20