Using the Shopify API how can I get tax details on individual line items? - api

In the UK some items have VAT charged on them while others don't. To import orders into our back office system we need to know whether tax was charged on particular items in the order. Ideally we'd also like to know how much tax was charged on each line item.
This information isn't shown in any of the example responses given in the online docs. Is it possible to get it via the API?

This is currently not available for individual line items, all that is available is the overall taxes charged. You could use this and taxable field on Product to attempt to divide the taxes charged.

Related

Shopify - Is there a way to offer discount after taxes are calculated

I have a collection of items which has a 13% tax. So if you buy $1 in goods, your final charge would be $1.13 because of this tax.
I give users the option to return certain items while purchasing others (imagine returning the keg of beer while buying another).
The problem, however, is that the "return" (where I subtract $X from the checkout) affects the checkout pre tax. So if the total was $100, which is $113 after tax, my current code would deduct $50 pre-tax, which would affect the tax I need to collect.
Is it possible to have the items purchased + tax show in the checkout, and subtract the "returns" after the price plus tax is calculated?
I have looked at this link identifying a similar issue and people claiming they can solve it. The only solution provided by shopify was to pay $2000/month to get access to checkout.liquid where * maybe * I could solve the problem.
Unfortunately, your question is unclear. You have to understand how Shopify works to accomplish certain goals. One, you cannot mess with the pricing of goods or taxes. About the only thing you can offer customers are discount codes.
Anything that gets committed to checkout is out of your control. You cannot adjust anything in the checkout, with the exception being, Plus merchants can indeed script checkout, and even alter the Liquid.
Until you are more clear about what you are attempting, I suggest you ensure that whatever you are doing, the cart is fair game, do as you wish. Have the customer replace one item with another. Submit to checkout. Be done.
Sure, there are cheesy Apps that help fake things financially by using discount codes, but that is often a road to more problems than it is worth.
we have tried this but it did not work for us.
We then ended up disabling the tax altogether
The items were calculated inclusive of tax and we would then provide a tax invoice separately using API

How do I refund a single item and shipping proportional to the item refunded?

I have an order with 3 different line items.
I need to refund 1 of those items (which is heavy and adds to the shipping price). Without this item I can reduce the price of the shipping by X.
How can I refund X? How can I automatically calculate how much I have to refund from the shipping? Does Shopify do that automatically?
The documentation example doesn't go too much in detail, it only states that you can send amount, but not how to figure out what the amount is.
Just refund the price of the item itself. Refunding a percentage of shipping? Who does that. I have never experience any e-commerce where you get shipping refunds. If I pay for shipping, I paid for something non-refundable.

Shopify Multiple Shipping Addresses

Does anyone know if there's a way to integrate multiple shipping addresses into a Shopify website? Currently they only support one address per order. The website I'm currently working on is a gift shop so needs to allow customer the option to ship each item to a different address.
So far the only workaround I've come up with is to add shipping address fields as line item properties on the product page and disable/hide shipping fields in the checkout area. However, the concern then becomes sales tax. For this website any items shipped Washington State are subject to tax. So, I either need find a way to integrate multiple shipping addresses into the checkout or figure out how to add some sort of javascript/jQuery to calculate Washington State taxes on the product page and have it included in the product price when added to cart.
Any ideas about how to make this work would be appreciated, whether it's multiple shipping addresses or a product page tax calculation.

How best to calculate sales tax in a marketplace (i.e., with multiple sellers)?

We process orders for multiple sellers (a typical "marketplace" scenario). Are there APIs or services that correctly compute sales tax for our use case?
I simply want to provide the sellers' (1 or more) locations and the buyer's location, and receive the correct tax rate to assess on the corresponding line item.
Most offerings I've evaluated (TaxCloud is one) seem to fall down in this use case.
I'm implementing a TaxCloud solution for a single-seller and multiple-buyer situation. You can utilize TaxCloud to determine tax cost by creating an account for each seller in the marketplace, configuring nexus for each, then using the appropriate API key/ID pair to lookup tax on items based on the seller.
Unfortunately, this means that you'll have to make multiple calls if the shopping cart has items from multiple sellers.

Shopify - Is there a way to determine the type of discount code in the api response

When discount codes are applied to orders the way they are brought in in an order is a 2 field array, code and amount. Although, in the admin interface a Shopify user can choose whether or not the type of code is an absolute amount, percent, or free shipping.
In the api response is there a way to determine whether the code used was for free shipping or one of the others? This is causing issues with our sync because taxes are handled different in different locations for shipping costs compared to general order line items.
Thank you,
Brandon
Short answer: No, you can't tell the difference.
Long answer: Internally, free shipping codes are actually applied to items in the cart up to the value of the shipping method selected, and then the shipping amount is applied on top.
The upshot of this is that there is no difference between the three discount types as stored on Shopify. They're all just dollar amounts taken off the order subtotal. Therefore you can't tell whether the shipping was discounted because it never is.