add close payment function