1. Documentation /
  2. UPS Shipping Method

UPS Shipping Method

UPS Shipping Method allows you to get shipping rates from the UPS API. It requires that your server uses SimpleXML. The extension primarily works with measurements in Inches (in) and weight in Pounds (lbs), but other units can be converted automatically. Returned rates’ currency is based on the origin country in the shipping instance setting. UPS can calculate quotes for both domestic and international parcels.

You can purchase shipping labels directly from UPS or use a label printing extension to handle that.

Note: This extension does not handle freight shipping, and there is a weight limit of 150 lbs per individual package. The API and the built-in box packer require that non-virtual products have weights and dimensions set. More at: Adding Shipping Dimensions and Weights to Products.

Installation

↑ Back to top
  1. Download the extension from your WooCommerce dashboard.
  2. Go to Plugins > Add New > Upload and select the ZIP file you just downloaded.
  3. Click Install Now, and then Activate.

More information at: Installing and Managing Plugins.

Connecting Your UPS Account

↑ Back to top

Using the new REST API (OAuth 2.0 security model)

↑ Back to top
  1. Go to https://developer.ups.com/.
  2. Click Create an Application.
  1. If you aren’t already logged in, log in to your existing account or create a new account. After logging in or signing up, you will be redirected away from the developer site. Return to it by going to https://developer.ups.com/ and clicking Create an Application again (as described above).
  1. Click Add App.
  1. A modal will be displayed. Select I want to integrate UPS shipping capabilities to my business and the UPS account you want to associate with the app. Then click Next.
Note: If you create a new shipping account during the app setup process, be aware that UPS might not guide you back to where you left off. In that case, please restart the app setup process and select the shipping account number you just created.
  1. Fill out the contact details and click Next.
  1. Enter a name for your app (e.g. UPS Shipping Method for WooCommerce).
  2. Search for and add the Authorization (OAuth) and Rating products, then click Save.
  1. Copy the Client ID and Client Secret keys. They will be required in the next step.
  1. In your WooCommerce store admin area, go to WooCommerce > Settings > Shipping > UPS and input the following settings:
    • UPS API type – REST.
    • UPS Account Number – Sent to you after signup.
    • UPS Client ID – Displayed on the UPS website in step 9).
    • UPS Client Secret – Displayed on the UPS website in step 9).
    • Customer Classification – Determines what rates are returned. Note that Retail Rates will match the online calculator.
    • Debug Mode – Enable/disable debug mode to show debugging information on your cart/checkout.
  2. Click Save changes and proceed to the Configuration section below to continue setting up the extension.

Using the XML API (legacy; for reference only)

↑ Back to top
Note: These instructions are only for reference of merchants already using UPS Shipping Method. The REST API (described above) offers better performance. Additionally, API keys for the XML API will only be issued by UPS until June 5, 2023 and will no longer work after June 3, 2024.
  1. To create a UPS account and obtain your UPS API credentials, sign up at UPS Developer Kit.
  2. After signing in, in the Access and Administration section select Manage Access Keys, then Request New Access Key.
  1. Fill out the first two form fields as follows:
  • I need an access key because: I was informed by a software vendor that I need to obtain an access key to share with them
  • Software/Vendor Name: WooCommerce
  1. Continue filling out the rest of the form.
  2. After successfully signing up, please go to WooCommerce > Settings > Shipping > UPS and fill out the following fields and save changes:
    • UPS API type – XML (legacy).
    • UPS Account Number – Sent to you after signup.
    • UPS User ID – Set by you during signup.
    • UPS Password – Set by you during signup.
    • UPS Access Key – Sent to you after signup.
    • Customer Classification – Determines what rates are returned. Note that Retail Rates will match the online calculator.
    • Debug Mode – Enable/disable debug mode to show debugging information on your cart/checkout.
  3. Click Save changes and proceed to the Configuration section below to continue setting up the extension.

Configuration

↑ Back to top
This shipping method has to be added to a Shipping zone. If you haven’t configured your Shipping zones yet, please check our Setting up Shipping Zones guide before proceeding.
  1. Go to WooCommerce > Settings > Shipping > Shipping zones.

2. Click the Edit button on the shipping zone where you want to offer this method.

3. Inside the shipping zone, click the Add shipping method button.

4. Then, select the shipping method and click the Continue button.

  • Click the Edit button on the right side of the Shipping methods table to configure the settings:
  • Method & Origin Settings
    1. Method Title – Name the shipping method. This is visible to customers.
    2. Origin City – Enter city you are sending from.
    3. Origin Postcode – Set to the postcode from where you ship. It is sent to the UPS API.
    4. Origin Country – Set to the country from where you ship. It is sent to the UPS API.
  • Services and Packaging
    1. Services – Choose to rename and/or rearrange the order of UPS shipping rates.
    2. Offer Rates – Select whether to display all rates available or only the cheapest.
    3. Negotiated Rates – Enable negotiated rates or not. More at: Account-Specific Negotiated Rates. This must be approved by UPS, or the API returns an error. It is sent to the UPS API.
    4. Delivery Confirmation – Optionally you may charge customers for delivery confirmation. This just adds the specified amount to the returned rates.
    5. Parcel Packing Method – See below.
    6. UPS Packaging – You can select from a built-in list of standard UPS packaging to use.
    7. Custom Boxes – Here you can add custom box sizes to pack into.
  • Advanced Options
    1. Origin Address – Sometimes you may need to enter the address for the sender/origin.
    2. Residential – Choose whether to indicate deliveries as residential or commercial addresses.
      * Users are permitted to enter PO Boxes as a shipping address, even though UPS does not allow it.
    3. Insured value – Request Insurance to be included in UPS rates.
    4. Fallback – Enter a fallback amount for shipping, if no rates are found.
    5. Weight/Dimension Units – Only change this if you’re getting the “This measurement system is not valid for the selected country method.”
Note: The UPS shipping extension is a calculator for all products in the cart and does not exclude products based on shipping classes.

Parcel Packing Methods

↑ Back to top

There are two packing methods with UPS, and each affects the parcels you send to the API.

Pack items individually (Default)

↑ Back to top

Each item in your cart (non-virtual) is sent to the UPS API. Quotes for all items are combined to calculate the final cost. Only the weight is required, but also entering product dimensions produces a more accurate quote. For even more accuracy, we recommend the box packer method.

To use this method, add a new product then scroll down to Product Data > Shipping to enter the product dimensions.

Pack into boxes with weights and dimensions (Recommended)

↑ Back to top

Using this method, you create your own custom box sizes in UPS Settings. The extension uses the weight/dimensions of products added to the cart, filling the custom box size from smallest to largest based on volume and size, then sends the number of boxes/size to the UPS API for a shipping estimate. Both product weight and dimensions are needed for this option to accurately calculate what boxes are needed.

Selecting this option you must follow the steps listed below for UPS Packaging or Custom Box Packing for this method to work.

UPS Packaging

↑ Back to top

UPS offers standard boxes for shipping. UPS Packaging:

UPS Packaging Settings

Start typing the package you want to include, and it auto-populates the field for you.

Note: If you choose Pack into boxes with weights and dimensions (Recommended) but have not chosen any UPS Packaging, nor defined any custom boxes (as explained below), the plugin displays the error message: “UPS is enabled, and Parcel Packing Method is set to ‘Pack into boxes’, but no UPS Packaging is selected and there are no custom boxes defined. Items will be packed individually.”

Custom Box-Packing

↑ Back to top

The box packer included with this shipping method groups items into boxes that you define by height, width, length, weight, and max-weight. The packing is mainly volume based, but also considers item sizes.

The box packer is volume based. In most cases, this provides good results but is never as accurate as a real person packing a box (see BIN Packing Problem). Therefore, it is important to understand that packing results are as accurate as they can be, and any anomalies should be acceptable.

Setting up box sizes

↑ Back to top
  1. Go to: WooCommerce > Settings > Shipping.
  2. Select your Shipping Zone containing UPS, then click UPS
  3. Scroll down to Custom Boxes and select Add Box to set up box dimensions:
Box Settings
Box Settings

Outer dimensions are used for parcel dimensions and are passed to the API.

Inner dimensions are used for packing, and items should fit within these.

Box weight is the weight of the actual box, and is added to the weight of contents.

Max weight is the maximum weight your box can hold. This includes contents weight and box weight. (Note: This value should never be set to 0 , as that will result in that box not being used due to the Max Weight limitation being met before any items are packed inside.)

How the calculation works

↑ Back to top

The packer:

  1. Finds boxes that fit items being packed (uses H x W x D).
  2. Packs all fitting items into boxes (using volume).
  3. Uses the smallest box that fits 100% of items *or* uses the highest % packed box, and then passes unpacked items back and repeats the process.
  4. Packs unpackable items alone, using item dimensions.
  5. Returns all packed boxes.

Handling Fees

↑ Back to top

To add handling fees to shipping calculations, you can use a Price Adjustment column in the Services section. Each UPS service can be increased or decreased (by adding the “-” sign) separately, using price adjustment columns in the row.

Use the Price Adjustment ($) column to add a flat amount to the shipping quote. In this example, the 3-Day Select and Ground shipping methods are increased by $3.50.

Use the Price Adjustment (%) to increase the shipping quote by a percentage. In this example, the 3-Day Select and Ground shipping methods are increased by 1% of the quote returned by UPS.

Customer Usage

↑ Back to top

Customers get quotes, after inputting their address, from two places:

  • Cart page – via the shipping calculator
  • Checkout page – via the shipping and billing forms
Rates can be selected by customers as normal.
ups-checkout-options
 

Available Shipping Services for UPS Extension

↑ Back to top

These services are included with the UPS Shipping extension:

Domestic

3-Day Select
Ground
2nd Day Air
2nd Day Air AM
Next Day Air
Next Day Air Saver
Next Day Air Early AM
Simple Rate
SurePost Less than 1LB
SurePost 1LB or greater
SurePost BPM
SurePost Media Mail

International

Standard
Worldwide Express
Worldwide Express Plus
Worldwide Expedited Standard
Worldwide Saver

FAQ

↑ Back to top

I dropship items. Can I use multiple origin zip codes?

↑ Back to top

Yes. Multiple UPS methods in the same zone with different origin addresses will return the appropriate rates for each method. Multiple API requests are made and each origin address is used.

Does this create shipping labels and tracking codes?

↑ Back to top

No it does not. It provides the integration between UPS and WooCommerce, so you can calculate shipping rates for customers and collect the correct amount of payment in checkout.

You get shipping labels and tracking numbers directly from UPS or can buy a different plugin to handle that for you.

Rates are not in the correct currency

↑ Back to top

UPS will use the currency that is enabled on your account. So if your site uses a different currency then the one which is set on the account, the rates won’t be returned. If the debug setting is enabled this will be indicated with a warning like:
[UPS] Rate for Standard (UPS) is in USD but store currency is EUR.

If you need to convert these rates to the correct currency we would suggest using the Multi Currency extension and setting up a conversion rate for both the account currency and the store currency.

Troubleshooting

↑ Back to top

No rates returned/no rates available

↑ Back to top
  • Confirm that your API credentials are correct.
  • Enable development mode, or turn on WP_DEBUG to see debugging information on the cart page. This often reveals the issue.
  • Check that your products have sizes and weights set – without this, the calculation cannot be performed.

“Invalid Authentication Information” error

↑ Back to top

If you see Invalid Authentication Information in the “UPS RESPONSE” section of the Debug output on your site, there is a problem with the API credentials or the App in your UPS account dashboard. To resolve this error, do the following:

  1. Log in to https://developer.ups.com/ and click on “My Apps”. Then, click on the link in the “App Name” column.
  2. Confirm that your App has “Rating” and “Authorization ( OAuth)” listed in the Product In Use column. If either of those are not listed there, click the “Add Products” button. Next, click the + icon on the right for any missing products and save the changes.
  3. Confirm that both the “Rating” and “Authorization ( OAuth)” products show “Approved” in the Status column when viewing the App info screen (described in Step 1). If any products show as “Pending“, try removing them with the “Remove” link on the right and re-adding them via the “Add Products” button (as described above).
  4. Even if your API credentials show as “Authenticated” on the UPS plugin settings page on your site (WooCommerce > Settings > Shipping > UPS), delete the information in the UPS Account Number, UPS Client ID, and UPS Client Secret fields, making sure that there aren’t any ‘spaces’ or any other characters in those fields and they are completely blank. Then, on the App Info/Credentials page described in Step 1, copy the Billing Account number and paste it into the UPS Account Number field in the UPS plugin settings on your site. Next, copy the Client ID in the App and paste it into the UPS Client ID field in the UPS plugin settings on your site. Finally, copy the Client Secret in the App and paste it into the UPS Client Secret field in the UPS plugin settings on your site and save the changes. (Note: The “Client ID” and “Client Secret” info is not visible in the App by default but you can click on the ‘eye’ icon to reveal that info and you can click the ‘clipboard’ icon to copy it.)
  5. Once those steps have been completed, do another test on the front end of your site with Debug enabled to see if the error has been resolved. If you continue to see Invalid Authentication Information in the “UPS RESPONSE”, reach out to the UPS Support team and let them know that you are receiving this error.

Customize

↑ Back to top

If you would like to remove UPS as a shipping option for some shipping classes you can use the WooCommerce Conditional Shipping and Payments extension.

Or you can use code to do this.

You can add the following code to your functions.php. You need to change shipping classes used on the 14th line:

View on Github

Questions and Feedback

↑ Back to top

Have a question before you buy? Please fill out this pre-sales form.

Already purchased and need some assistance? Get in touch with a Happiness Engineer via the Help Desk.