Apple Wireless Magic Keyboard A1644 UK

So this keyboard is in great condition, and one morning I went to start my mac as usual and for some reason the keyboard was not connecting to my mac, I tried charging it and re connecting but couldn't make it work, for the life of me going from one evening to the next morning and its not working has thrown me so I bought another keyboard on Ebay and am selling this one, maybe someone out there knows what the issues is?