Context
We have an external site that processes payment after a customer is redirected from Shopify checkout. Before the redirect, we collect all required checkout data so we can later create the order externally using an offline access token.
After the redirect, the customer completes an assessment to determine HSA/FSA eligibility for the products in their cart. Based on the assessment results, some items may be removed.
To ensure Shopify remains the “source of truth” for pricing and taxes on the remaining items, we use the DraftOrderCalculate endpoint (API version 2026-01) to calculate subtotals and taxes for the remaining items. After successful payment, we create the order using the OrderCreate endpoint (API version 2026-01).
Questions
We’re running into an issue with DraftOrderCalculate related to shipping—specifically when there are multiple shipping lines or “groups” (i.e. different fulfillment options, different shipping rates per product, etc).
-
The
DraftOrderCalculateendpoint only supports a singleshippingLine, whileOrderCreatesupports multiple shipping lines. Why is this the case, and how is multi-shipping intended to be handled during draft order calculations? -
If the expected approach is to calculate each shipping line separately, how should discounts be handled? For example, if a discount depends on multiple products that belong to different shipping groups, how can totals, taxes, and shipping be calculated correctly? Is this the wrong approach altogether?
-
We already pass the
shippingLinesobject from checkout to our external site. So we could just use this and ignore shipping values via theDraftOrderCalculateendpoint. Are there scenarios where shipping taxes must be calculated viaDraftOrderCalculate, or is it safe to rely on the shipping data provided from checkout?
Any guidance or clarification on the intended workflow here would be greatly appreciated. Thanks in advance!