This document will give you with the basic information needed to create and add PayPal single item purchase buttons to your website. PayPal single item purchase buttons let you sell individual products on your website.
Before you begin, you should have a basic understanding of HTML and be able to edit and post pages on your website. The process of creating and adding a button is outlined below. If you need more detailed instructions, or information for a more advanced implementation, please see the Website Payments Standard Integration Guide.
When you create and add a PayPal Single Item Purchase button, you will need the following:
You may follow the steps below to create each of your buttons, or, if you are comfortable editing HTML by hand, you may create additional buttons by changing the values in the first button you create.
If you would like more detailed information on any of the following steps, please see the Website Payments Standard Integration Guide.
If you would like to edit your code by hand, the variables you need to change are highlighted below.
A Minimal Implementation
The example code below shows the minimum information you need to create a single item purchase button. This sample creates a button to buy an oil change at Dave's Garage for $29.99 USD:
To make this a payment button for a different item, you would only need to edit three variables: item_name, item_number, and amount.
A Full Implementation
The sample code below creates a button with URLs for successful payment and payment cancellation pages, does not prompt the buyer to include a note or their shipping address, and allows the buyer to purchase more than one item.
The additional variables included above are: image_url, undefined_quantity, no_note, return, cancel_return
If you have the ability to dynamically generate portions of your site, you could save time by populating your PayPal Single Item Purchase buttons automatically, updating the variables with information from your database.
A PayPal Single Item Purchase button lets you add an easy, fast, and flexible payment method to your website. More detailed information about the buttons, including a walk-through of the payment process, complete descriptions of all the code variables, and information on integrating PayPal payments with your website's back-end operations can be found in the Website Payments Standard Integration Guide.