DraftOrderCalculate only allows *one* shippingLine. Why?

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 DraftOrderCalculate endpoint only supports a single shippingLine, while OrderCreate supports 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 shippingLines object from checkout to our external site. So we could just use this and ignore shipping values via the DraftOrderCalculate endpoint. Are there scenarios where shipping taxes must be calculated via DraftOrderCalculate, 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!

Hi @Grant_Mickle,

This is expected behaviour that Split Shipping in Checkout (multiple shipping lines) doesn’t support Draft Orders at this time, and is described on the Shopify Help Center, explaining that Split Shipping isn’t available when there’s an existing shipping line on a Draft Order:

Considerations for split shipping in checkout:

That said, Orders created from Draft Orders can still have split shipping, as long as the Draft doesn’t have any shipping lines added to it, with the split shipping handled by the actual Shopify Checkout and order creation.


Additionally, I just wanted to make sure were informed, what you described here sounds like it is actually against our API Terms of Service, as we do not approve of any API order creation with the purpose of bypassing our Shopify Web Checkout for payment processing and order creation.

API Terms of Service 2.3.18

API Restrictions. When using the Shopify API, you will (and will ensure that your employees, agents and service providers will):

18. not use an alternative to Shopify Checkout for web checkout or payment processing, or register any transactions through the Shopify API in connection with such activity, without Shopify’s express written authorization;

We are unable to provide direct advice if your app is or is not against our TOS, and we recommend reviewing the app and our TOS with a professional legal advisor to confirm if your app is compliant with our Terms of Service.


That said, we do have a workaround so you can process external payments and continue to use the Shopify Checkout and order creation correctly.

If you are wanting to process payments through an external payment provider, I would recommend creating an Offsite Payment Extension through our Payment Platform API. This would allow you to continue using the Shopify Checkout, and when a customer selects your payment method in the checkout, they get redirected to the external payment provider to actually process the payment, and when the payment processing is done the customer gets redirected back to the Shopify Checkout to finalize the checkout and order creation.

Here’s some documentation with more information on Payment Extensions:

Please also note that the Payment Platform API is currently only available by invite at this time, however if you are developing this workflow for a specific Plus merchant, you can contact Shopify Support via the Shopify Help Center, and request access to the API to develop a custom payment method for the merchant you are working with.

Hi @Grant_Mickle,

I just wanted to follow up here and see if my previous post answered all your questions here? If so we can go ahead and mark this thread as solved, otherwise we can absolutely help further if you have any more related questions!