You shouldn't have let the courier take the item without having the code. Only the buyer can give it to you and so you will have to message them and ask for it.
Also note that a collection by courier removes the buyer from the protection of the money back guarantee.