Add Signup Code to Membership

Is there some way to integrate Signup Code with Membership?

I´m creating a site with hidden content and I´m using membership for that purpose. I don´t want to charge money for becoming a premium member, although I would like it to be for invited people only. I think a code would do the trick. Is that at all possible?