initial code for get_payments api