Create draft order with no custom shipping line

Topic summary

A developer is encountering an issue when creating draft orders via Shopify’s API (both REST and GraphQL). Despite specifying a particular shipping line using shippingRateHandle, Shopify ignores the provided handle and automatically selects the cheapest available shipping option instead.

Technical Details:

  • Using GraphQL draftOrderCreate mutation with shippingRateHandle: "shopify-shipping-test-3.00"
  • The API call includes customer ID, line items, shipping address, and the specific shipping rate handle
  • The developer successfully created an order manually through the Shopify interface with the desired shipping rate minutes before the API test

Current Status:
The issue remains unresolved. The developer seeks guidance on how to properly assign a specific (non-custom) shipping line to draft orders programmatically, as the current implementation consistently defaults to the lowest-cost shipping option regardless of the specified handle.

Summarized with AI on November 9. AI used: claude-sonnet-4-5-20250929.

I’m trying to create an order with a specific (not custom) shipping line with the API. I’ve tried Rest and Graphql, but it always leads to the same result: Shopify ignores my handle and takes the cheapest delivery line available.
For example, in Graphql :

mutation draftOrderCreate($input: DraftOrderInput!) {
  draftOrderCreate(input: $input) {
    draftOrder {
      id
      name
      shippingLine {
        carrierIdentifier
        code
        custom
        title
      }
    }
    userErrors {
      field
      message
    }
  }
}
{
  "input": {
    "customerId": "gid://shopify/Customer/5997301825615",
    "lineItems": [
      {
        "variantId": "gid://shopify/ProductVariant/40540689924175",
        "quantity": 2
      }
    ],
    "shippingAddress": {
      "firstName": "John",
      "lastName": "(#66753) Smith",
      "address1": "149 rue des potiers",
      "address2": "",
      "city": "Villers-les-nancy",
      "zip": "54600",
      "countryCode": "FR",
      "country": "France",
      "phone": "+33606401020"
    },
    "shippingLine": {
      "shippingRateHandle": "shopify-shipping-test-3.00"
    }
  }
}

however, I managed to create an order with shopify-shipping-test-3.00 in the interface a few minutes before the test.
Do you have any ideas ?