orderCreate does not include Shop configured taxes

Hi there,

When using orderCreate - GraphQL Admin it does not add shop configured taxes. What should I do?

Here’s the shop config

this is the input and response

{customer:
  {toUpsert:
    {firstName: "Jane",
     email: "test@example.com",
     note: "Test Customer",
     tags: ["test"],
     addresses:
      [{address1: "123 Fake Street",
        city: "Fakecity",
        phone: "1234567890",
        zip: "K2P 1L4",
        country: "CA",
        province: "Ontario",
        firstName: "Jane",
        lastName: "*"}]}},
 discountCode: {itemFixedDiscountCode: {code: "TEST DISCOUNT", amountSet: {shopMoney: {amount: 6.9, currencyCode: "USD"}}}},
 financialStatus: "PENDING",
 lineItems:
  [{priceSet: {shopMoney: {amount: 9.6, currencyCode: "USD"}}, requiresShipping: true, title: "TEST LINE ITEM", quantity: 1},
   {variantId: "gid://shopify/ProductVariant/30092406194240", quantity: 1, requiresShipping: true}],
 note: "TEST NOTE",
 tags: ["TEST", "TAG"],
 shippingAddress:
  {address1: "123 Fake Street",
   city: "Fakecity",
   phone: "1234567890",
   zip: "K2P 1L4",
   country: "CA",
   province: "Ontario",
   firstName: "Jane",
   lastName: "*"},
 shippingLines: [{title: "Test Shipping Line", priceSet: {shopMoney: {amount: 69, currencyCode: "USD"}}}],
 sourceName: "tokopedia"}

response
{"orderCreate" =>
  {"userErrors" => [],
   "order" =>
    {"id" => "gid://shopify/Order/4396465422400",
     "legacyResourceId" => "4396465422400",
     "name" => "#1314",
     "shippingAddress" =>
      {"address1" => "123 Fake Street",
       "address2" => nil,
       "city" => "Fakecity",
       "country" => "Canada",
       "firstName" => "Jane",
       "lastName" => "*",
       "phone" => "1234567890",
       "province" => "Ontario",
       "zip" => "K2P 1L4"}}}}

This is the order created. Note that it is a Canadian shipping address and the missing taxes

I’ve already tried

  • adding taxesIncluded: true on the input. It does not add the taxes.
  • using different currencies. It does not add the taxes.

I do not want to add taxLines on the input because I do not want to manually calculate the taxes. It will be great if the API can calculate the taxes for me since it is already configured on the store.

Hey @sengming, when using orderCreate, you do need to manually input the taxes that were applied to the order. The reason for this is this mutation is typically used for creating records of orders that have already been placed.

In order for the tax settings to be applied, the order needs to be processed through Shopify. Draft Orders are a good case for this.

Hope that helps.

1 Like

thanks @KyleG-Shopify !! By the way is there a page somewhere that describes the differences between creating orders through draft orders vs orders? I assumed they were going to be the same but I keep bumping into small differences like this.

Hey @sengming,

The easiest would be to compare the inputs.

vs