Tax Calculation Problem

Highlighted
New Member
3 0 0

Can any one help me solve tax issue via Private App (not sure from where the issue is originating)

Ex: All orders falling into Shopify directly showing correct tax on orders and conditions are set in Shopify only however orders coming via Private App created for a partner fall into Shopify properly but without any taxes at all.

Private App created by me only for a company who wanted to take orders on their own platform and pass onto us via Shopify API - everything else works fine.

Mentioning few details below:

ORDERS via Private App API (taxes not coming at all)

#336008Z
#336361Z

ORDERS from Store (taxes coming properly for direct orders on website)

#336348Z

What is the solution as the tax is calculated in Shopify only - invoices raised are also wrong

0 Likes
Highlighted
Shopify Staff
Shopify Staff
496 64 111

Hey @AmeenN,

If your private app is importing orders into Shopify, the tax amounts need to be included in the API call (docs here). 

If you want Shopify to calculate the tax, you can use the DraftOrder endpoint which will automatically calculate tax based on the items + customer address, then complete the draft using this endpoint which will convert it to an order.

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

1 Like
Highlighted
New Member
3 0 0

Thanks JB for confirmation.

Please note only the orders coming via API does not show taxes rest all orders falling in Shopify directly works perfect - let me know what should we do to fix this.

Mentioning sample below of what we are passing at the moment - let me know the tweaks.

 

"order": {
"line_items": [
{
"variant_id": 34654420828322,
"quantity": 1,
"price": "2948.0"
}
],
"shipping_address": {
"first_name": "Richard",
"last_name": "Peter",
"address1": "4-380 A Ram Garden Street, Anna Salai, Palavakkam",
"phone": "9717968983",
"city": "Chennai",
"province": "TAMIL NADU",
"country": "India",
"zip": "600041"
},
"transactions": [
{
"amount": "15.0",
"kind": "capture",
"status": "success",
"gateway": "RPay"
}
],
"email": "richard.p@active.agency,
"phone": "+919873178494",
"inventory_behaviour": "bypass",
"tags": "",
"send_receipt": true,
"financial_status": "paid",
"total_discounts": "2933.0"
}
}

 

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
496 64 111

Hey @AmeenN,

You need to pass in the tax amounts yourself. The tax amounts can be passed either be passed on each individual line_item, or as a total_tax amount on the order object. From your example this is how it looks when passed on the line_item:

"order": {
    "line_items": [
      {
        "variant_id": 34654420828322,
        "quantity": 1,
        "price": "2948.0",
				"tax_lines": [
          {
            "price": 13.5,
            "rate": 0.06,
            "title": "State tax"
          }
        ]
      }
],

 

And this is how it looks when passed on the order:

 

{"order": {
    "line_items": [
      {
        "variant_id": 34654420828322,
        "quantity": 1,
        "price": "2948.0"
      }
    ],
    "shipping_address": {
      "first_name": "Richard",
      "last_name": "Peter",
      "address1": "4-380 A Ram Garden Street, Anna Salai, Palavakkam",
      "phone": "9717968983",
      "city": "Chennai",
      "province": "TAMIL NADU",
      "country": "India",
      "zip": "600041"
    },
    "transactions": [
      {
        "amount": "15.0",
        "kind": "capture",
        "status": "success",
        "gateway": "RPay"
      }
    ],
    "email": "richard.p@active.agency",
    "phone": "919873178494",
    "inventory_behaviour": "bypass",
    "tags": "",
    "send_receipt": true,
    "financial_status": "paid",
    "total_discounts": "2933.0",
    "total_tax": 13.5
  }
}

JB | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
New Member
3 0 0

Thanks again for response and I have a doubt.

1. What if same API is being used to pass orders to multiple Shopify merchants with different SKUs and tax rate is dynamic for each merchant.

What should i do? Calculation should happen as per tax rates set on merchant shopify store. 

Private App is basically throwing orders to multiple merchants some selling bag some apparels so tax rates change depending on merchant.

Basically tax should be calculated on merchant Shopify store but the API should pass a condition that tax to the calculated based on Shopify settings. Right now no taxes show up.

 

2. Billing address is also not showing up in Shopify - what fields should i  add so that billing address also shows up? 

0 Likes