Upgrade your hosted shopping cart integration

UpgradeCurrent

If you have a Hosted Shopping Cart integration, PayPal recommends upgrading to PayPal Shopping Cart Button using the Button Builder. The Payment Links & Buttons has the following benefits:

Accept Venmo, Apple Pay, Pay Later, and other alternative payment methods your customer prefer. *Availability may vary based on your region.
Mobile-optimized buyer experience that works seamlessly across all devices, capturing the growing mobile commerce market.
Enhanced fraud protection and PCI-DSS compliance with PayPal’s latest security infrastructure.
Hero Section Image

Get Started

What Your Current Button Looks Like

If you currently have a legacy Simple Buy Now integration, your PayPal button should look like the example below. If your button appears different, please refer to our Overview page to determine your specific Website Payments Standard use case.

image

What Your Upgraded Button Looks Like

After upgrading from your legacy Website Payments Standard integration, your PayPal Shopping Cart button will offer multiple payment methods in a modern, mobile-optimized interface. 

image

Key Considerations Before You Start
  1. One Button Per Product: You will need to create a unique "Add to Cart" button for each product you sell on your website. You will also create a single "View Cart" button for your entire site.
  2. Backup Your Website: Before making any changes to your website's code, we strongly recommend creating a full backup. This will allow you to restore your website to its previous state if you encounter any issues.

Choose Your First Product
  1. Select a product that currently uses a simple WPS “Hosted Shopping Cart” button
  2. Have product details ready
    • ex. Name, price, description, product images
  3. Note any variants (size, color) or quantity options

1

Set up Shopping Cart Button

Access Payment Links & Button Builder
  1. Navigate to Shopping Cart Button Builder
  2. Log into your PayPal business account
Configure Basic Settings
  1. Enter a “Item Name”
  2. Add product description (optional)
  3. Enter your product price
Add Product Images
  1. Toggle on “Images”
  2. Upload up to 5 high-quality product images, while following guidelines.
Configure Quantity
  1. Toggle on “Quantity” if you would like to allow customers to buy multiple items
  2. Set maximum quantity limits
Configure Product Variants and Inventory

For products with size, color, or other options:

  1. Click “Show More Options” and toggle on “Variants”
  2. Add different variants type (ex. size, color)
  3. List up to 10 options per variant (ex. blue, red, green, black for the “Color” variant)
  4. You can add images and set different prices for your first variant. To set prices, check “Add price per variant”

Inventory Management (optional but recommended)

  1. Toggle on “Inventory”
  2. Enter current stock quantity and item ID
  3. Set low stock alert under “Alert quantity” (ex. 5 items)
What If I Have More Than One Product?

The steps you just completed created a "Add to Cart" button for a single product.

If you sell multiple products on your website, you must repeat the process above for each individual product. Every item needs its own unique "Add to Cart" button to ensure your customers are charged the correct price and see the right product details during checkout.

After creating your first button, simply return to the Shopping Cart Button Builder to start creating the next one.


2

Implement Shopping Cart Buttons

Now that you have created your new button(s), it's time to update your website. This process involves removing the old, outdated code and pasting in the new, secure code you generated in Step 1.

Understanding Your New Button Code

The new code from the Button Builder is provided in two tabs; View Cart and Add to Cart. Understanding each part is essential for a successful upgrade.

View Cart Tab - Part 1: The PayPal Setup Script

This is a single line of code that loads PayPal's functionality onto your website. Think of it as the "engine" that powers all your new shopping cart buttons.

  • You only need to add this script ONCE to your website, even if you have many buttons.

View Cart Tab - Part 2: View Cart Button

This block of code displays a "View Cart" button.

  • This code can be placed ONCE per each of relevant page.
  • This code must be placed exactly where you want the button to appear on your page.

Example for PayPal Setup Script and View Cart button looks like this:

View Cart Tab - Part 1 Code Example
Upgraded
1
2
3
4
5
6
7
8
9
10
View Cart Tab - Part 2 Code Example
Upgraded
1
2
3
4
5
6
7
8
9
10

Add to Cart Tab: Add to Cart Button

This block of code displays a "Add to Cart" button.

  • You must add this code for EACH product you want to sell.
  • It needs to be placed exactly where you want the button to appear on your page, usually next to the product's description.
  • It looks something like this (note the unique ID in the first line; this is different for each Add to Cart Button):
Add to Cart Tab - Code Example
Upgraded
1
2
3
4
5
6
7
8
9
10
How to Replace the Code on Your Site

1. First, Find and Remove Your Old Legacy Code

Before adding anything new, you need to locate the old code. This legacy code is typically an HTML <form> block for each product.

  • What to Look For ("View Cart"): Search for the form containing "cmd=_cart" and "display=1". You should only have one of these per page on your site.
Old Legacy WPS View Cart Code Example
Deprecated
1
2
3
4
5
6
7
8
9
10
  • What to Look For ("Add to Cart")Search your website's HTML for forms containing cmd=_cart and add=1. This is the code you need to delete for each product.
Old Legacy WPS Add to Cart Code Example
Deprecated
1
2
3
4
5
6
7
8
9
10

2. Next, Add Your New Code

Now you'll paste in the new, two-part code.

  • Add View Cart Part 1 and Part 2 Once Each:
    • Copy the Part 1 from View Cart Tab. Paste it once in a central location on your website template, ideally just before the closing tag. Placing it here ensures the script is loaded on every page that might have a button.
    • Copy the Part 2 from View Cart Tab. Paste it once in a central location on your website template, in a specific location where you want View Cart Button to be.
  • Add Add to Cart Button for Each Product:
    • For each product, copy its unique "Add to Cart" Part 2 code from the Button Builder and paste it where you deleted the old legacy form for that same product. Make sure you are pasting the button code that corresponds to the correct product.
    • If you have multiple products, repeat this step: Go to the next button you generated in the Button Builder, copy its unique Add to Cart code, and paste it next to that corresponding product on your website. Do not use the same Add to Cart code for different products.
Example: Upgrading a Page with Two Products

Your old code might look like this
Deprecated
1
2
3
4
5
6
7
8
9
10
Your new code should look like this
Upgraded
1
2
3
4
5
6
7
8
9
10

3

Test your implementation

Before making your new button live to customers, complete this testing checklist for each product to ensure everything works perfectly.

Testing Checklist:
  1. You will see the Add to Cart button on your site next to items for sale. When clicking the button, you will be directed to a PayPal checkout page with your product info and multiple ways to pay.
  2. If you have multiple items for sale, try adding several to the cart. Then click View Cart to confirm items in the cart. From the cart, proceed to the PayPal checkout page to verify the full purchase flow.
  3. Test with a small amount ($1.00)
  4. Complete the test payment
  5. Confirm payment appears in your PayPal account
  6. Remember to refund the test transaction afterwards

4

Common Issues Troubleshooting

If you encounter any issues during migration, these solutions address the most common problems merchants face. Most issues can be resolved quickly without technical support.

Issues Solution
Items are added to different shopping carts Ensure all cart buttons on all pages are converted to Shopping Cart Button format, as different button types cannot share the same cart.
Button doesn't appear Check that JavaScript is enabled, Verify client-ID in your website code matches the client-ID in your code snippet.
Page looks broken Restore from backup, try to go through implementation process again
Payment doesn’t work Verify PayPal account is verified and in good standing
Mobile display issues Add this to your HTML: <meta name="viewport" content="width=device-width, initial-scale=1">

Need additional troubleshooting help? Check our detailed FAQ page.

Having Issues?

Contact a Payment Specialist who can guide you through the upgrade process or call us at (888) 429-3035.