HELP: Save data received over bluetooth to EEPROM

Hi guys!
I'm building a smart door lock which uses an Arduino, keypad and Bluetooth module.
Currently I am already able to open and close the lock via entering a 4 digit pin code or over bluetooth using my Android phone.

What I want is to be able to update the pin code for the lock remotely using Bluetooth.
My question is how to receive 4 digit number over Bluetooth and store it on EEPROM so I would be able to read the pin code later to unlock the door?

have a look at the libraries