How do I create a shopping cart link in PayPal Payments Standard?

This method allows you to take shopping cart variables and convert them to a URL format. For example:

<input type="hidden" value="you@domain.com" name="business">

Would be converted to the following in the link:

&business=you@domain.com

Example Add to Cart link

<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=YOUR_EMAIL_ADDRESS_HERE&item_name=ITEM_NAME_HERE&item_number=123456&amount=99.99&return=http://www.paypal.com&cancel_return=http://www.paypal.com" target="_click">Purchase</a>

  • Where it says YOUR_EMAIL_ADDRESS_HERE, enter your email address.
  • Where it says ITEM_NAME_HERE, enter the item name, and so on.


Additional variables (up to 127 characters unless noted)

  • &custom= Any value you may need
  • &on0= Any value you may need; proprietary (up to 15 characters)
  • &os0= Any value you may need; proprietary (up to 30 characters)
  • &on1= Any value you may need; proprietary (up to 15 characters)
  • &os1= Any value you may need; proprietary (up to 30 characters)
  • &invoice= Unique number per transaction
  • &image_url= URL for a banner image
  • & notify_url= URL for IPN only
  • &cn= A message title (up to 30 characters)

In each case, place the desired value after the = sign.

Note: The on and os variables are proprietary. You must use them from top to bottom in order. If you use the variables out of order, they won't pass the value. Use in this order: on0, then os0, then on1, then os1.


Example of View Cart code

https://www.paypal.com/cgi-bin/webscr?cmd=_cart&business=YOUR EMAIL ADDRESS&display=1

Creating Shopping Cart links from your PayPal account (Recommended)

Here’s how to create a Shopping Cart

  1. Log in to your PayPal account.
  2. Go to the PayPal buttons page.
  3. Select the Add to Cart button.
  4. Fill out the form and click Save and Create Button.
  5. Click Email link to see the auto-generated link for your shopping cart.

Additional variables

Visit HTML Variables for PayPal Payments Standard for a list of additional variables that can be passed for your button.

وسائل أخرى يمكننا مساعدتك بها

سنستخدم ملفات تعريف الارتباط لتحسين وتخصيص تجربتك عند التصفح. هل تقبل أن نستخدم ملفات تعريف الارتباط أيضاً لعرض إعلانات مخصصة بك؟ معرفة المزيد وإدارة ملفات تعريف الارتباط