Magento Tutorials

How to Configure USPS Shipping Method in Magento 2

The United States Postal Service (or USPS) is integrated in Magento as one of its default shipping method. The USPS is the agency of the U.S offering domestic and international delivery to more than 190 countries, both by land and air. In this tutorial, we will guide you to configure USPS in Magento admin panel.

Get your USPS Web Tools credentials

First of all, having an account on USPS Web Tools is crucial. Kindly create a new one if you haven’t registered:

  • Open USPS Web Tools via this URL: https://registration.shippingapis.com/
  • Key in all required fields in a registration form as below
    USPS register
  • After completion, you will receive your User ID and a URL to the USPS test server.

Configure USPS in Magento 2

In your backend, navigate to Stores > Configuration (under Settings tab) > Shipping Methods (under Sales tab)

Expand the USPS set of options.

USPS settings in Magento 2

  1. Set Enabled for Checkout to Yes.
  2. The Gateway URL and Secure Gateway URL are set by default, and you should leave it as it is.
  3. Name this shipping method by key in the Title field if needed, or you can leave it as default.
  4. Enter the User ID and Password for your USPS account.
  5. Choose Mode as:
    • Development: if you want to run USPS in a test environment.
    • Live: if you want to run USPS in your live site.
      USPS settings in Magento 2 - 2
  6. Set Packages Request Type to:
    Divide to Equal Weight (one request): Choose this if the goods in packages have approximately equal weight.Use Origin Weight (few requests): Choose this if there are child products among other large goods in packages.
  7. Choose Container as the packaging type frequently used in your store. You can choose among:
    • Variable (if you are not sure what packaging type should be chose, choose this)
    • Flat-Rate Box
    • Flat-Rate Envelope
    • Rectangular
    • Non-Rectangular
  8. Set the Size as:
    • Regular
    • Large
  9. Set Machinable to Yes or No, depending whether your typical package can be processed by a machine or manually.
  10. Enter the Maximum Package Weight according to your carrier requirements.
    USPS settings in Magento 2 - 3
  11. Set Calculate Handling Fee to Fixed or Percent
  12. Determine Handling Applied to Per Order or Per Package
  13. Enter the amount of the Handling Fee. Use the decimal format for a percentage.
  14. Pick options in Allowed Methods list
  15. Set the Free Method to Yes or None.
  16. Set Enable Free Shipping Threshold field to Disable or Enable.
  17. Displayed Error Message: Leave this message as default or write a tailored message
    USPS settings in Magento 2 - 4
  18. Set Ship to Applicable Countries to all or specific countries where this shipping method can be used.
  19. Set Show Method if Not Applicable to
    • Yes: Lists all available USPS shipping methods during checkout, including those that don’t apply to the shipment.
    • No: Lists only the USPS shipping methods that are applicable to the shipment.
  20. Set Debug to Yes if you need a log file with activities of USPS shipments.
  21. In the Sort Order field, determine in which order USPS shipping method appears in the shipping methods list.
  22. Click Save Config.
Dom

A knowledge craver who always strive to be wiser everyday.

Subscribe
Notify of
guest

8 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments
fnf
10 months ago

Magento 2 provides a variety of shipping carriers to choose from, one of which is the United States Postal Service (USPS). 

Amanda The Adventurer
7 months ago

the availability and specific features of USPS integration may vary depending on the version of Magento you are using and any additional extensions or customizations you have implemented. It’s always a good idea to refer to the official Magento documentation or consult with your development team for detailed instructions tailored to your specific setup.

Pokemon Fusion
6 months ago

You can also Set Enable Free Shipping Threshold field to Disable or Enable.

dreadhead parkour
3 months ago

Configuring USPS shipping in Magento 2 is essential for online stores. This guide simplifies the process, ensuring smooth domestic and international deliveries. Remember to obtain your USPS Web Tools credentials, set your preferences, and save the configuration.

monkey mart
3 months ago

Thanks for this clear guide on configuring USPS shipping in Magento 2. It’s essential for online stores to offer reliable shipping options. This step-by-step tutorial simplifies the process, making it easier for merchants to set up USPS as a shipping method.

Kuaför Tezgahları
2 months ago

Thank you very much, this information was really helpful to me.

Coby Brian
Coby Brian
1 month ago

Configuring USPS shipping method in Magento 2 is seamless. In the admin panel, navigate to Stores > Configuration > Sales > Shipping Methods. Choose “USPS” from the available shipping methods and input your USPS account details. Ensure the “Enabled” option is set to “Yes” and configure additional settings based on your preferences. Remember to obtain the USPS Web Tools User ID to activate the service. For further guidance, refer to Magento’s official documentation. Come here to download Magento’s step-by-step guide for a detailed walkthrough.

Mike Hunt
Mike Hunt
1 month ago

To configure the USPS shipping method in Magento 2, navigate to the admin panel and access the “Stores” section. Choose “Configuration” and go to “Sales” where you can find “Shipping Methods.” Enable the USPS option and input your USPS account details. Configure the domestic and international settings according to your preferences. Save the changes to activate USPS shipping on your Magento store. Additionally, if you’re interested in pool maintenance, consider learning how a sand filter pump works for efficient water filtration and clarity.