App reviews, troubleshooting, and recommendations
Hello, when creating an order, I need to calculate the shipping price according to my logic, through my api, how can I do this?
Checkout Carrier Calculated Shipping (CCS) in Shopify
https://shopify.dev/docs/api/admin-rest/2023-01/resources/carrierservice
That is, I create an endpoint (I accept it), I process everything and give the response, will this be taken into account when ordering an order and during checkout?
Yes. Exactly.
Be mindful that you need CCS to be enabled on your store for this to work.
Check this document on how you can get CCS activated: https://help.shopify.com/en/manual/shipping/setting-up-and-managing-your-shipping/enabling-shipping-...
# Shipping lines format
shipping_lines = [{
title: your_shipping_title,
price: your_shipping_line_price,
code: your_shipping_code,
source: your_shipping_line_source
}]
# Example
shipping_lines = [{
title: "Standard Shipping",
price: 10.0, # if you want free shipping, you can set this as 0
code: "Standard Shipping",
source: "shopify"
}]
# Create order using Shopify API
payload = {
# other fields
shipping_lines: shipping_lines
}
ShopifyAPI::Order.create(payload)
Find Global Growth Opportunities For Your Business with Shopify AcademyLearn how to exp...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025