How to Configure USPS Shipping Carrier in Magento 2?

How to Configure USPS Shipping Carrier in Magento 2?
USPS is short for United States Postal Services. It is an independent shipping service of the United States government, offering both domestic and international shipping services by land and air. Magento 2 supports seven shipping methods that you can configure to let customers choose the one of their choice. By configuring the USPS shipping carrier in your Magento 2 store, you allow customers to deliver their parcels or big packages from the U.S. to anywhere in the world. USPS offers the lowest prices among its competitors and is perfect for low-cost, non-urgent deliveries. Following are the steps to configure the USPS shipping carrier in Magento 2.

Step 1: Open a USPS Shipping Account

Open a USPS Web Tools account to receive your User ID and a URL to the USPS test server.

Step 2: Enable USPS for your Store

  • Log into your Magento 2 admin panel and on the left sidebar, go to Stores -> Settings -> Configuration.
  • Under Sales, click Delivery Methods.
  • Expand the USPS section.
You will see the following form. configure-usps-shipping-carrier Configure the options as below.
  • Enabled for Checkout: Set this to Yes to enable USPS shipping in your store.
  • Gateway URL: Normally, the system value does not need to be changed. But if needed, enter the gateway URL to access the USPS shipping rates.
  • Title: Give a title that will appear during checkout.
  • User ID & Password: Enter the User ID and Password for your USPS account
  • Mode: Mode has the following two options. 1: Development: Development mode runs USPS in a test environment. Make sure to change it to Live after running it in a development environment. 2: Live: This runs USPS in a live production environment.

Step 3: Complete the Packaging Description

The following fields are related to the packaging details. set-configure-usps-shipping-carrier
  • Packages Request Type: Set this option to one of the following. These options decide how the order is managed if sent in multiple packages.
    1: Divide to equal weight (one request): One submission request for multiple packages will do if the packages are divided by equal weight.
    2: Use origin weight (few requests): Multiple packages must be submitted as separate requests if using origin weight as the basis of calculating the shipping cost.
  • Container: Select the type of container usually used to ship the ordered products.
  • Size: Set the size of the typical package shipped from your store.
  • Machinable: Set it to Yes if your typical package can be processed by a machine. Set to No if it must be processed manually.
  • Maximum Package Weight: Enter the maximum package weight according to carrier requirements.

Step 4: Set up Handling Fees

Next comes the configuration of handling fees. The handling fee is optional and is an additional cost that is added to the DHL shipping cost. configure-usps-shipping-carrier-in-magento-2
  • Calculate Handling Fee: Set it to either Fixed or Percent depending upon your strategy.
  • Handling Applied: To determine how the handling fee is applied, set this option to either Per Order or Per Package.
  • Handling Fee: Enter the handling fee that will be applied per order or per package. For percentage, use the decimal format. For example, 0.10 for 10%.

Step 5: Specify Allowed Methods

Next, you can see the following fields that let you specify the allowed shipping methods under USPS. setup-configure-usps-shipping-carrier
  • Allowed Methods: Select all the methods you want to be available to your customers. These methods appear under USPS during checkout. You can select multiple methods by holding down the Ctrl key in PC and the Command key on Mac.
  • Free Method: If you want to provide a free shipping option through USPS, set it to the method you want to use for free shipping. If you prefer not to provide free shipping, keep it as None.
  • Enable Free Shipping Threshold: If you want a minimum order limit that should qualify the order for free shipping, change it to Enable. Then, enter the Free Shipping Amount Threshold.
  • Displayed Error Message: This is the default message if USPS is not available. You can change it if the method becomes available.

Step 6: Specify Applicable Countries

Finally, you need to specify which countries are applicable for the USPS shipping carrier. usps-shipping-carrier-configuration-in-magento-2
  • Ship to Applicable Countries: Set it to All Allowed Countries if you want customers from any country to use this delivery method. When you choose Specific Countries, the Ship to Specific Countries list becomes active.
  • Ship to Specific Countries: Choose all countries you want the method to be available for.
  • Debug: Set it to Yes if you want to maintain a log file of all the shipments made through USPS.
  • Show Method if Not Applicable: Setting it to Yes will list all available shipping methods during checkout, including those that don’t apply to the shipment.
  • Sort Order: Enter a number to determine the sequence in which USPS appears when listed with other delivery methods during checkout. 0=first, 1= second, and so on.
  • Click Save Config.
If you have any questions, please don’t hesitate to contact us. Other Articles You Might be Interested in: