The web has made it incredibly easy for anyone to sell digital products directly from their website, Twitter, Facebook or even through email newsletters. The world is your marketplace and you can sell PDF books, MP3 music, photos, software programs, video courses, website themes, and everything else that can be downloaded.
While there are quite a few web services that let you sell digital content online for a commission (around 5% per transaction), I want to share a do-it-yourself solution that I have been using on my services website. You can see another example here on labnol.org.
The workflow uses Google Drive for storing files, PayPal for payments and Gmail for delivering content to the buyer. There’re no limitation on the size of files or the number of products that you can sell. There’re no bandwidth restrictions. There’s no middleman fees except for the usual PayPal charges. And people can purchase your stuff through PayPal or using their debit or credit cards.
Sell Digital Downloads with PayPal and Google Drive
First, create a “Buy Now” button in your PayPal account for the product that you wish to sell online and assign a unique Item ID to the item (see screenshot above).
PayPal will now offer you the HTML code for the purchase button that you can embed in your website. Alternatively, you can copy the direct link – see example – to share your product over email or for selling on social media websites.
The next thing you need to do is upload the corresponding file to your Google Drive. When someone makes a purchase, the Google script will pull this file from Drive and send it to the buyer via Gmail as an email attachment. If the file is big, say the size >20 MB, the script will automatically share the file with the buyer and sends the shared link instead of the actual file.
The final step is to run the Google Script that will monitor your Gmail mailbox for any PayPal related transactions and sends the digital files to the buyer.
This is easy. Click here to make a copy of the PayPal script in your Google Drive and include the Item IDs and file names of all products that you are selling through PayPal. Next choose Run -> PayPal and authorize the script.
That’s it. The script will read your Gmail mailbox every 5 minutes and will process all PayPal related emails. Once the files have been delivered to the buyer, the PayPal emails will moved to the archive. You can check out the Programmer’s Library for the annotated source code.
Later, if you release an updated version of your digital files, you can use Mail Merge with Gmail to let all your previous buyers know about the new version. You can put all the PayPal emails under a new Gmail label, extract the email addresses and use this list for your merge.