Cheat Codes are typed in the Extras menu:
LEGO Harry Potter: Years 5-7: Cheat Codes Free Download
2FLY6B – Collecting LEGO Ghost Chips
ZEX7MV – falling into the abyss does no harm
H27KGC – tokens with characters
HA79V8 – character chip detector
T7PVVN – Everybody Wears Santa Hats
J9U6Z9 – extra hearts
84QNQN – gold brick detector
TTMC6D – Hogwarts emblem detector
QQWC6B – immortality
7AD7HE – red brick detector
74YKR7 – Double Collectable LEGO Chips
XK9ANE – six times
HUFV2H – eight times
H8X69Y – at ten
BMEU6X – super strength (you can pull heavy objects without drinking a potion)
And this code is typed in the Weasley store:
AAAAAA – unlocks the Immobulus spell