Adding PayPal Buy Now Buttons to Your Web Site


Want to sell products from your web site, and use PayPal as your payment processor? How simple are their BUY NOW buttons to use?

Firstly, why select PayPal to process payments? Well, even though if you already have a merchant account to take Visa and Mastercard, it is much simpler for PayPal to look after the REAL-TIME payment processing for you. They only charge a little bit extra for that convenience. Their back-end system also keeps more than adequate records, and it is accepted in most countries you'll want to do business with.

Assuming you are already registered with PayPal, and are upgraded to either a Premium or Business Account - what's involved with putting "BUY NOW" buttons on your web site?

The first question to ask is:

How MANY products do you want to sell?

Remember, the BUY NOW buttons are used when you want someone to purchase ONE particular item - right NOW.

They are NOT part of a solution where your customer can add multiple products to a shopping cart. That is an entirely different process which can also be set up with PayPal.

If you have ONLY one product to sell, the entire process is dead simple (even though it appears complicated).

If you have MORE than one product to sell (one at a time), the trickiest bit is specifying the CORRECT thank you page related to the specific product your customer purchased. More on that later...

For now...

Let's Set Up BUY NOW Buttons for Just ONE Product

Login to your PayPal account and click on the MERCHANT TOOLS tab. Then under the Key Features of the WEBSITE PAYMENTS section (on the RHS of screen) you'll see a link for BUY NOW BUTTONS.

The next page allows you to add descriptions, prices etc for your product, and select a button to use on your web site.

Here, select NO for the encryption option, because you CAN'T modify encrypted links.

Click on ADD MORE OPTIONS at bottom of screen.

Here, the main items to check are:
  1. the SUCCESSFUL PAYMENT URL - enter the URL on your web site which people are directed to AFTER they have paid.
    e.g. http://www.yourrsite.com/thankyou/index.html
    and
  2. tick the "No postage needed" option if goods are delivered digitally.
Now click CREATE BUTTON NOW to get your linking code.

You'll be given two lots of code to use:
  1. HTML code for a form and button to place on your web page, and
  2. a link to use in an email - note THIS link uses URL encoding to convert certain characters (spaces, @ and & signs for example) so the link make sense to a web browser. If you edit this link for any reason, please be VERY careful that you use the right encoding.
Big Tip: SAVE the code generated in a text file on your computer. It is a lot easier to modify the product name, item number and price in your text editor, than go through this process again to make new links... just be careful!!!!

HUGE TIP: Copy the email link, and paste it into the form at tinyurl.com to SHORTEN the link into one which won't break in an email!

Your Thank-You Page

All that's left now is to set up your thank-you page at the address you mentioned for the SUCCESSFUL PAYMENT URL. On that page:
  1. you MUST say something about how PayPal has processed their payment and has sent them an email receipt (it's a PayPal requirement that you do this), and

  2. provide FULL DETAILS on how/when/where they can collect the product they just ordered from you.
IF your product is capable of being downloaded immediately - i.e. digital delivery of zipped file - the only real complication is WHERE to put the file on your web site.

You DON'T want search engine spiders finding it and publishing the location across the internet, so there are some things you can do to prevent that happening:

1. use a robots.txt file at the top/root level of your web site to stop search engines from spidering your images directory: e.g.
User-agent: *
Disallow: /images/
(this is simply a text file called robots.txt, which contains the above info, which is uploaded to your web server at the same level as your home page)

2. and then upload your zipped product file into your images directory.
i.e. http://www.yoursite.com/images/productfile.zip

Tip: It might be a good idea to place thank-you page/s in the images directory, so they aren't spidered by search engines either!

If your web server has been set up correctly, PEOPLE are not usually able to browse the files in that directory, so they won't be able to "accidentally" discover it either. If they CAN see a list of files, then put an index.html file in there to stop that happening. This can either be a "warning - you aren't supposed to be here" type of page, or maybe something more useful...

The only "other" complication with this method, is that once a (dishonest) person has your "thank you" page, they can easily share the download link with their friends to download your product for free...

More Than 10-20 Products To Sell?

To sell a LOT of single products from your site, you'll need to:
  1. add the special variable &rm=2 to your SUCCESSFUL PAYMENT link, which tells PayPal to send ALL the transaction data back to your web server for processing

  2. and change the SUCCESSFUL PAYMENT URL so that it points to a cgi or php script that can process all this data, and create customised thank-you pages depending on the product purchased (you'll need to hire a programmer for this bit).


The Verdict?

Putting a PayPal BUY NOW button on your web site is a fairly painless process if you only want to sell a few products, one at a time.

IF you are comfortable with putting some HTML code into your product web page and uploading it to your server, you should be able to put these buttons on your site. If not... show this article to your webmaster.

The process is almost identical for their DONATE and SUBSCRIPTION buttons and equally simple to implement. Just paste the code they give you onto your web page, and upload it to your server.

Anytime anyone buys from you, donates money, or subscribes to your service, you'll get sent an email from PayPal.

BUT... to sell more than ONE item, you'll need to EITHER:
  • use a different SUCCESSFUL PAYMENT page for each single item sold (which is probably fine for up to 10-20 products but not too easy to manage if you have a lot more...)

  • OR if you have a LOT of single products to sell, you'll need some cgi or php scripting to customise your SUCCESSFUL PAYMENT page.

  • OR you could look at putting the PayPal SHOPPING CART solution into your web site.
Happy selling!

Author Credits ::

Stephen Spry is the webmaster of OzSmallBiz.net and has been helping small business succeed on the Internet since 1997. He can help you implement PayPal as a payment processor on your web site.

W3 Schools is a great place for information on URL encoding including a handy form to do it for you (and lots more stuff for web developers).

The Web Robots Pages will help you understand robots.txt files

Sign up for PayPal and start accepting credit card payments instantly.