Sell software licence PIN codes

Sell software licence PIN codes with PayPal ....

Use this application on a web site that supports PHP / mySQL to sell software licence codes, key codes or PIN numbers using the PayPal IPN system with single purchase buy now buttons.

PHP-KeyCodes provides the checking of the completed transaction before the codes are sent out to the purchaser.

In the case of PayPal, the key codes are sent to the customer by email.

After successful purchase, the top key code is extracted and automatically sent to the customer without any intervention by yourself.

The application does not create the pin numbers themselves although there are a set of php functions which can be modified to do your own custom processing, for example, create a pin code based on the customer name.

The customer does not have to have a PayPal account to purchase an item but can use any supported Credit Card. PayPal then becomes just a payment gateway for the credit card.

Main features

  • Interacts with PayPal's IPN system to monitor when a payment is complete.
  • Codes are stored in a table in the database for each product and are extracted when purchased.
  • Used codes are removed from the database and when a minimum number is reached an email is sent to the site administrator.
  • The buy now button code is displayed in the admin section for copying onto your web site.
  • Includes a test page to check the basic operation of the scripts.
  • Incorporates testing via the PayPal Sandbox test environment so that the complete system can be tested.
  • Includes a facility to send a complementary sell to a customer.
  • All pages written in PHP and script is NOT encrypted. requires mySQL.
  • All credit card transactions are handled by PayPal.

Purchase Demo

Click on the following button which shows what happens when someone wants to buy from PHP-KeyCodes.


The above item costs $0.01. After purchase you will receive an email with a test PIN code. This demonstrates what happens when a customer makes a purchase.

Paypal security

There are a number of checks in the script to ensure that the data received from PayPal has not been modified.

  • The script checks the PayPal transaction id in the database to make sure that it has not been previously used.
  • The cost/currency of the item is checked against the database to make sure that it has not been changed.
  • The receiver email address is checked to make sure that it is your primary PayPal receiver email address.

Email customers via newsletter

The email functions can be used to send out newsletters to all or specific customers.

  • Email all customers who have purchased any item.
  • Email all customers who have purchased a particular item.

Installation and requirements

  • PHP 5 and PHP 7
  • Apache web server
  • mySQL database version 3.23 or higher
  • Linux, FreeBSD or Windows operating system on the web server
  • A Paypal Business or Premier account - sign up here.
  • Email functionality on the web server so that the PHP scripts can send out emails to customers.
  • If you are looking for a suitable host for you site, I would recommend the basic web hosting plan from LunarPages which has all the required features for this application.

It uses only 'standard' php, does not require any extra php modules, it should not need any changes to the .ini file and it requires only minor modifications to file folder permissions.


asterisk Hints, tips and tricks : A free pdf on selling key codes from your web site

Find out more

Pricing : PHP-KeyCodes costs $45 U.S. Dollars. Click here to go to the purchase page for further details.

Demo : To view an on-line demo illustrating the admin pages click here.
The demo is live and you may purchase items to see how the system works. Items are $0.01 in value.

Enquiries : If you have any questions about the product, go to the contacts page by clicking here.