How to Set up USPS Shipping on Shopify?

How to Set up USPS Shipping on Shopify?

The USPS is one of the most popular shipping carriers because it offers low rates and reliable service. If you're adding USPS shipping to your Shopify store, here's how to set it up:

  1. Log in to your Shopify store.
  2. Go to the "Settings" section of the Shopify Admin and click "Shipping."
  3. Click on "Add rate" in the Shipping Settings section to create a new shipping rate.
  4. In the "Add shipping rate" dialog, select "USPS" as the carrier and enter a name for the shipping rate, such as "USPS Shipping."
  5. In the "Services" section, select the USPS shipping services you want to offer your customers. You can choose from various options, such as First-Class Mail, Priority Mail, and Express Mail.
  6. In the "Rate" section, choose how you want to calculate the shipping rate by weight or price.
  7. Save the changes by clicking on "Save."

You must create a USPS Web Tools API account, which gives you access to shipping costs and labels, to use USPS shipping on Shopify. Additionally, it would help if you input your API key in the Shopify Admin's Shipping Settings section.

Here's an example of the code you can use to add USPS shipping rates to your Shopify store:

{% if shipping_rates.size > 0 %}

<table class="shipping-table">

  <thead>

    <tr>

      <th>{{ 'cart.general.Service' | t }}</th>

      <th>{{ 'cart.General.Price' | t }}</th>

    </tr>

  </thead>

  <tbody>

    {% for shipping_rate in shipping_rates %}

    <tr>

      <td>{{ shipping_rate.name }}</td>

      <td>{{ shipping_rate.price | money }}</td>

    </tr>

    {% endfor %}

  </tbody>

</table>

{% endif %}

This code shows the user a table of the shipping rates that are offered, together with the name of the shipping company and the cost. The template language used by Shopify, Liquid syntax, is used in the code.

Once that's done, go back to the Cart page, where you can select USPS as your shipping method. You'll then be able to enter any additional information about delivery time or location preferences if needed.

You may also read:
How to Remove "Shipping Calculated at Checkout" Shopify?
How to Create Shopify Free Shipping Code?