If you bought from NA SE store, you get 18 digit code in your receipt email (it's titled something like Square-Enix, Inc. - Order Confirmation (Order #numberhere) which you should have received soon after pre-order. If you didn't receive this email, you can check it at findmyorder.com) which you should register at http://preorder.na.finalfantasyxiv.com/ which will give you 20 digit code which you should register at http://account.square-enix.com/accou...vearly/?rgn=na.
If you bought from EU SE Store, you should only receive 20 digit code which you have to register at http://account.square-enix.com/accou...vearly/?rgn=eu . If you haven't received your EU code in this case, you should contact support.