The United States Postal Service is the independent postal service of United States government, offering domestic and international shipping services by land and air.
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.
You can also 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. To learn more about USPS Web Tools, see their Technical Documentation.
On the Admin sidebar, go to Stores > Settings > Configuration.
In the left panel, expand Sales and choose Delivery Methods.
Expand the USPS section.
If necessary, first deselect the Use system value checkbox to change the following settings as described.
Set Enabled for Checkout to
If needed, enter the Gateway URL to access USPS shipping rates.
Effective June 24, 2021, USPS Web Tools will remove support for all unsecure HTTP endpoints. After this change, all Web Tools API requests that to an unsecure HTTP endpoint will fail. Make sure that your Gateway URL uses the secure HTTPS endpoint.
The field is preset by default, and normally does not need to be changed.
Enter a Title for this shipping method that appears during checkout.
Enter the User ID and Password for your USPS account.
Set Mode to one of the following:
Development - Runs USPS in a test environment. After running USPS in a development environment, make sure to return later and set Mode to
Live - Runs USPS in a live production environment.
To determine how the order is managed if sent as multiple packages, set Packages Request Type to one of the following:
Divide to Equal Weight - (One Request) The shipment of multiple packages can be submitted as one request if the packages are divided by equal weight.
Use Origin Weight - (Multiple Requests) Multiple packages must be submitted as separate requests if using origin weight as the basis of calculating the shipping cost.
Set Container to the type of packaging normally used to ship products ordered for your store.
Set the Size of the typical package shipped from your store.
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.
Enter the Maximum Package Weight according to carrier requirements.
The handling fee is optional, and appears as an extra charge that is added to the DHL shipping cost. If you want to include a handling fee, do the following:
Set Calculate Handling Fee to one of the following methods:
To determine how the handling fee is applied, set Handling Applied to one of the following:
Enter the amount of the Handling Fee to be charged.
To enter a percentage, use the decimal format. For example, enter
0.25 for 25%.
For Allowed Methods, choose each USPS shipping method to be available to your customers.
The methods appear under USPS during checkout. To select multiple methods, hold down the Ctrl key (PC) or the Command key (Mac) and click each option.
If you want to provide a Free Shipping option through USPS, set the free shipping options:
Set Free Method to the method you want to use for free shipping. If you don’t want to offer free shipping through USPS, choose
To require a minimum order amount that qualifies an order for free shipping with USPS, set Enable Free Shipping Threshold to
Enable. Then, enter the minimum value in Free Shipping Amount Threshold.
If needed, change the Displayed Error Message.
This text box is preset with a default message, but you can enter a different message that you want to appear if USPS becomes unavailable.
Set Ship to Applicable Countries to one of the following:
All Allowed Countries - Customers from all countries specified in your store configuration can use this delivery method.
Specific Countries - When you choose this option, the Ship to Specific Countries list appears. Select each country in the list where this delivery method can be used.
Set Show Method if Not Applicable to one of the following:
Yes - Lists all available USPS shipping methods during checkout, including methods that don’t apply to the shipment.
No - Lists only the USPS shipping methods that are applicable to the shipment.
To create a log file with the details of USPS shipments made from your store, set Debug to
For 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,
2 = third, and so on.
Click Save Config.