skip to Main Content

I’m relatively new to Shopify and I’m trying to find a way to accurately track the internal shipping costs we incur, especially when offering free shipping on orders above $40. While customers don’t pay for shipping in these cases, the shop does, and I want to reflect these costs in our reports.

Problem:

  • Free Shipping Over $40: We offer free shipping on orders above $40, but obviously, the shipping isn’t truly free—we, as the shop owners, bear this cost.
  • Accurate Reporting: I need a way to record these shipping costs for reporting purposes without including them in the unit costs of the products. The reasons are:
    1. Variable Costs: Shipping costs vary based on the number of items and the size of the package required.
    2. Conditional Customer Payments: Sometimes the customer pays for shipping (when the order is below $40), and sometimes we cover it. Means, it is impossible to add the shipping cost to the unit costs.

Question:

Is there a way to add these internal shipping costs directly in Shopify to ensure accurate reporting? If possible, how can this be achieved using the Shopify REST API?

I’ve come across this update regarding the Order Editing API, which allows adding and removing shipping lines. Could this be a solution to my problem? If so, how would I implement it?

Any guidance would be appreciated!

Thanks in advance!

2

Answers


  1. Adding and removing shipping lines using the Shopify REST API can help you accurately track internal shipping costs, even when offering free shipping to customers.
    By so doing, you have to remove the use of order editing API, add shipping line for free shipping.
    I hope you understand? If you don’t kindly let me know.

    Login or Signup to reply.
  2. 1: Fetch the Order: Use the Shopify API to fetch the details of the order. You’ll need the order ID to perform further actions.,

    GET /admin/api/2024-01/orders/{order_id}.json
    

    2: Determine Shipping Costs: Calculate the actual shipping cost that your shop incurs for this order. This can be done based on your internal shipping rates, which may vary based on the carrier, destination, and package size.

    3: Add a Shipping Line to the Order: Use the Order Editing API to add a new shipping line to the order, reflecting the cost that your shop incurs. This shipping line will not affect what the customer sees but will be recorded in your order details.

        POST /admin/api/2024-01/orders/{order_id}/shipping_lines.json
    {
      "shipping_line": {
        "title": "Internal Shipping Cost",
        "price": "10.00",
        "code": "internal_shipping",
        "source": "shopify"
      }
    }
    

    Replace "price": "10.00" with the actual cost your shop incurs.

    Update Order Reports: With the shipping line added, Shopify’s reporting tools will now reflect these costs. You can run reports to see how much you spend on shipping for orders that qualify for free shipping.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search