The United States Postal Service is the independent postal service of United States government, offering domestic and international shipping services by land and air. This article provides step-by-step instructions for setting up the USPS shipping method.

For field descriptions, see Configuration: Shipping Methods - USPS

Step 1: Open a Shipping Account

  1. Open a USPS Web Tools account. After you complete the registration process, you will receive your User ID and a URL to the USPS test server.
  2. You can skip the testing phase, and contact their Internet Customer Care Center to request immediate activation to the production server.  The ICCC will validate your store, and send you the URL to the production server.

    To learn more about USPS Web Tools, see their Ecommerce API Technical Guides.

NOTE: It is recommend to contact USPS and immediately have them switch your account to production. Inform them that you are using Magento and then no testing is required.

USPS Tech Support: 1-800-344-7779 (7:00 AM to 11:00 PM EST daily)

Helpful article for more details:

Step 2: Configure Your Store

  1. From the Admin panel, select Stores > Configuration.
  2. In the Configuration panel on the left, under Sales, click Shipping Methods.
  3. Click to expand the USPS section. Then, do the following:
    1. Set Enabled to Yes.
    2. The Gateway URL is needed to access USPS shipping rates. The field is preset by default, and normally does not need to be changed.
    3. Enter a Title for this shipping method that will appear during checkout.
    4. Enter the User ID for your USPS account.
    5. Set Container to the type of packaging usually used to ship products ordered for your store. Options include:
      • Variable
      • Flat-Rate Box
      • Flat-Rate Envelope
      • Rectangular
      • Non-Rectangular
    6. In the Size list, select the option that describes the typical package shipped from your store:
      • Regular
      • Large
      • Oversize
    7. Set Machinable to one of the following:
      • Yes: If your typical package can be processed by a machine.
      • No: If your typical package must be processed manually.
    8. Enter the Maximum Package Weight that you will ship by USPS. By default, this field is set to 70.  You can leave the value as it is unless you have special arrangements with USPS.

      Note: Consult your shipping carrier for maximum supported shipping weight.

    9. In the Calculate Handling Fee list, select one of the following methods:
      • Fixed Fee
      • Percent
    10. The handling fee is an additional charge that is added to the shipping cost. It is optional and not shown to the customer.
    11. In the Handling Applied list, select one of the following methods:
      • Per Order
      • Per Package
    12. In the Handling Fee field, enter the handling fee value either a fixed amount or percentage depending on which you selected in Calculate Handling Fee field.
    13. In the Allowed Methods list, select each USPS offered to your customers. The methods will appear under USPS during checkout. (Hold the Ctrl key down to select multiple options).
    14. Set the Free Method list to the method you want to use for free shipping. You may also select None.
    15. Set the Free Shipping with Minimum Order Amount to one of the following:
      • Enable: To provide free shipping for orders that meet the minimum monetary amount specified.
        Then, in the field below, enter the Minimum Order Amount for Free Shipping.
      • Disable: To not provide free shipping based on a minimum order amount.
    16. The Displayed Error Message text box is preset with a default message. You can either leave this message or you can type the message you want your customers to see if USPS shipping becomes unavailable.
    17. Set Ship to Applicable Countries to one of the following:
      • All Allowed Countries
      • Specific Countries
    18. If applicable, set Ship to Specific Countries to each country where your customers are allowed to ship by USPS. (Hold the Ctrl key down to select multiple options).

    19. Set Show Method if Not Applicable to one of the following:
      • Yes: To list all USPS shipping methods to customers, regardless of their availability.
      • No: To list only the methods which are currently available.
    20. Set Debug to Yes to create a log file with the details of all USPS activity relatted to your store.
    21. In the Sort Order field, enter a numeric value to determine the order in which USPS shipping method appears in the list with other shipping methods during checkout. The highest value is 0, which will put it at the top of the list.
  4. When complete, click the Save Config button to save your settings.