using codes to sign up for buddypress site

A client wants to setup a private social network that only people who have paid to be a part of their organization. They want to generate a list of codes. Before someone can sign up for the social network, they would have to enter a code on the registration form. Can this be done with buddypress?