complete integration of payment query