update sync gateway and do checks for to and amounts in payments