Magento2 includes 7 shipping methods out-of-the-box — the following set of instructions will guide you in setting up your Magento2 store’s shipping configurations.
Configure Shipping Settings
Login to your Magento2 Admin Panel >> Stores >> Configuration
From the Configuration area navigate to Sales >> Shipping Settings
Here you will enter your Store Location Information:
Select Save Config button (you should see a notice to refresh the Configuration and Page Cache)
Enable Shipping Methods
Next we’ll navigate to: Sales>Shipping Methods
Flat Rate shipping is enabled by default in Magento 2 – disable if desired.
Configure Shipping Methods
There are a variety of shipping options available by default. For this tutorial we will walk you through setting up the USPS shipping method. Note: Each carrier will require an account and associated API keys to function properly.
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 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.
Enabled for Checkout – Select Yes to enable the USPS Shipping Method
Gateway URL – should be http://production.shippingapis.com/ShippingAPI.dll
Secure Gateway URL – should be https://secure.shippingapis.com/ShippingAPI.dll
Title – enter the title of this shipping method as you want it displayed during checkout
User ID – the associated USPS account ID
Password – your USPS password
Mode – Live or Development depending on the environment
Packages Request Type – recommended “Divide to equal weight (one request)”
Container – most select “Variable” depends on the product(s) you are shipping
Size – Regular or Large (check with USPS for more information)
Machinable – More info here
Allowed Methods – select each USPS offered to your customers. The methods will appear under USPS during checkout. (Hold the Ctrl key down to select multiple options).
Set the Free Method list to the method you want to use for free shipping. You may also select None.
Set the Free Shipping with Minimum Order Amount to one of the following:
+ Enable – Provides 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 – Does not provide free shipping based on minimum order amount.
Displayed Error Message – 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.
Ship to Applicable Countries – to one of the following:
+ All Allowed Countries: Customers from all countries specified in your store configuration can use this shipping method.
+ Specific Countries: After choosing this option, the Ship to Specific Countries list appears. Select each country in the list where this shipping method can be used. (Ctrl + click)
Show Method if Not Applicable to one of the following:
+ 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.
Debug – “Yes” to create a log file with the details of all USPS activity related to your store. Product site select “No”.
Sort Order – 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 zero, which puts it at the top of the list.
Hit the Save Config button located at the top right corner of the page.
Congratulations, you’re all set! Be sure to test each shipping method is working and returning accurate results before releasing it to your customers.
Shipping Rate Discrepancies
Some of our clients have found discrepancies with the shipping rates being returned by the various providers. The most likely cause of this is inaccurate user data entered by your store’s customers. We have successfully integrated the USPS Address Verification API on multiple stores to mitigate and solve these discrepancies.
You can read more about the Address Information API here: USPS Address Information API
Magento Certified Developer
Our CTO, Joe Oppegaard, is one of Washington State’s top 3 Magento Certified Developers.Magento Certified