selling registration code/activation code/license key with digital products
to sell software or other digital products with a license key. License keys are in a list, and when a customer buys a software, s/he receives not just a link to the product, but a license key also.
Peter RENNER commented
Only when payment is done, the customer gets the license.
If payment is done by PayPal or credit card processor, the e-mail with the key can be automatic.
If payment is offline or bank transfer, order should be managed manually (send the mail manually after receiving the amount).