Adding PayPal Checkout to Your 3rd-party Shopping Cart

Some web developers may wish to integrate PayPal payment processing with their own 3rd party shopping cart instead of the standard PayPal Shopping Cart. Please use the instructions below to allow your buyers to pay with PayPal when they are ready to check out after adding all of their items to your 3rd party shopping cart.

There are now two ways to integrate your 3rd party shopping cart with the PayPal payment flow. The first is to pass in the aggregate amount of the Cart payment, rather than of the individual items. The second is to pass details of the items that have been selected to PayPal, instead of an aggregated amount for the entire Cart. Note: Posting the necessary variables to PayPal as described below will probably require you to implement some scripting on your website.

If you wish, you may aggregate your entire shopping cart and pass the total amount into PayPal's Buy Now Button code (that is, you will need to post a single name for the entire cart and the total price of the cart's contents as though it were a purchase of a single item).

One drawback of this method is that your buyers will not be able to see the individual items appearing in their carts. In addition, you cannot change our variable names, nor can you add your own variable names.

If your 3rd party shopping cart can be configured to pass individual items to PayPal, information about the items will be included in the buyers' and sellers' History logs and notifications. To include information about the items, you will post HTML form elements to a new version of PayPal's Shopping Cart flow. This process is much like the one described in Section #1 "Passing Aggregate Cart Amount to PayPal" with the following exceptions:

Set the "cmd" variable to "_cart"Replace this required HTML line

<input type="hidden" name="cmd" value="_xclick">

with

<input type="hidden" name="cmd" value="_cart">

Add a new variable called "upload"

Add the following line between the <form> and </form> tags:

<input type="hidden" name="upload" value="1">

Define item detailsFor each of the following item-specific parameters, define a new set of values that correspond to each item that was purchased via your 3rd party cart. Append "_x" to the variable name, where x is the item number, starting with 1 and increasing by one for each item that is added.

Name

Value

item_name_x

(Required for item #x) Name of item #x in the cart. Must be alpha-numeric, with a 127 character limit

item_number_x

Optional pass-through variable associated with item #x in the cart. Must be alpha-numeric, with a 127 character limit

amount_x

(Required for item #x) Price of the item #x

shipping_x

The cost of shipping the first piece (quantity of 1) of item #x

shipping2_x

The cost of shipping each additional piece (quantity of 2 or above) of item #x

handling_x

The cost of handling for item #x

on0_x

First option field name for item #x. 64 character limit

os0_x

First set of option value(s) for item #x. 200 character limit. "on0_x" must be defined in order for "os0_x" to be recognized.

on1_x

Second option field name for item #x. 64 character limit

os1_x

Second set of option value(s) for item #x. 200 character limit. "on1_x" must be defined in order for "os1_x" to be recognized.

Repeat for each item included in cartInclude a set of required variables and any optional variables from the table above for each item included in your buyers' cart. The first item included in the cart should be defined with parameters ending in "_1", such as "item_name_1", "amount_1", etc. Similarly the second item should be denoted with variables like "item_name_2", "amount_2", etc. Note: the "_x" values must increment by one continuously in order to be recognized. If you skip from item #1 to item #3 without defining an item #2,
the third item will be ignored.

To specify currency: All monetary variables (amount, shipping, shipping2, handling, tax) will be interpreted in the currency designated by the "currency_code" variable that is posted with the payment. Since it is not item-specific, there is no need to append a "_x" to the variable name. If no "currency_code" variable is posted, we will assume that all monetary values are in U.S. Dollars.