The keyboard isn't rechargeable. The batteries are and you can remove the batteries and replace them. The mouse's battery is internal and cannot be replaced by the user.
“Magic Keyboard, Magic Keyboard with Numeric Keypad, Magic Mouse 2, and Magic Trackpad 2 have a built-in rechargeable battery that lets you use the devices for extended periods between charges.
...
If you have an earlier Apple wireless mouse, keyboard, or trackpad with removable batteries, learn how to install batteries.”