How to Set up USPS Carrier in Magento?

USPS Carrier — United States Postal Service — is an American delivery service, which provides both domestic and international shipments by land and air. USPS is used by The United States government and is known to be a reliable and efficient service.

You can consider USPS as a shipping option for your store together with other Magento 2 shipping methods to deliver your products faster and provide your customers with more options to choose from.

To ensure easier integration of the USPS carrier into your store, we'll help you to set it up in Magento.

1. Create a USPS Shipping Account

First of all, you have to create a USPS shipping account. After registration, you will receive a User ID and a link to the USPS test server. Keep in mind, that your account credentials are crucial for the further USPS configuration in your Magento store.

2. Enable USPS for Magento

1. Go to Stores > Settings > Configuration > Sales > Delivery Methods and Enable the USPS carrier for checkout

2. Complete the following information:

  • Add Gateway URL for the USPS shipping rates calculation. 

Note: the already existing Gateway URL is appropriate for use and doesn't require any additional modifications.

  • Fill in the Title, which will be displayed on the checkout page.
  • Complete the User ID and Password using your USPS account credentials.
  • Set Mode either to Development to apply USPS in a testing environment, or to Live if you want to use it in a production environment. 

How to Set up USPS Carrier in Magento?

3. Complete the Packaging Description

  • Set the Packages Request Type to one of the following options: Divide to Equal Weight or Use Origin Weight. This feature is applied when an order is divided into multiple shipments. 
  • In the Container field choose the packaging for the shipment of your products.
  • Choose the allowed Size for a package shipment.
  • In the Machinable field choose Yes if you want your packaging process to be performed by a machine.
  • Specify the Maximum Package Weight, but don't forget to consult your carrier concerning any limitations or restrictions.

USPS Carrier Configuration

4. Configure Handling Fees

  • In the Calculate Handling Fee field, choose either "Fixed" or "Percent".
  • Choose whether you want to apply Handling per order or per package.
  • Specify the amount of the Handling Fee.

USPS Handling Fees

5. Set Allowed Methods and Applicable Countries

  • Choose the Allowed Methods of delivery that will be offered to your customers. 
  • In the Free Method field, specify the service you want to be free.
  • Enable the Free Shipping Threshold and in the Free Shipping Amount Threshold field specify the minimum number of quantities available for free shipping.
  • Add the Displayed Error Message that will be shown when the carrier is not available. 

USPS Allowed Delivery Methods

  • Select the Applicable Countries for the shipments. You have two options here: All Allowed Countries and Specific countries
  • In the Ship to Specific Countries field, select those countries you would like to sell your products to. 
  • Set Debug to Yes to create a log file with the shipments' details.
  • In the Show Method If Not Applicable field, choose Yes if you want to display the USPS carrier even if it's not available. 
  • Specify the Sort Order of the USPS carrier on the checkout page.

USPS Carrier in Magento 2

Don't forget to press the Save Config button.

Now you can use USPS carrier to provide your customers with one more convenient shipping service and create an up-to-mark customer experience. 

Once you finished configuring the USPS carrier in Magento, you might also want to set USPS as a default shipping method. This is exactly when Better Magento 2 Checkout Extension comes into play.