Write query_payment_details method tests
Fix incorrect query payment details endpoint