Actually, every device tied to the same iCloud account gets the 5GB. No need for codes or transfer issues. You take your phone off icloud, and your 5GB goes away.
Tie it into Find my Iphone or something like that.
I prefer my option
I bought soo many devices over the time; I think it it would be great to have such a little cookie but remain the storage even if I replace iDevices