Hey guys
Let’s say we make a mistake and want to refund a symbolic amount to a customer as an apology.
To do that, we often just refund a manually input amount without selection a line item or shipping.
The problem is that this doesn’t refund any tax according to the order data through the API. Is that a bug, on purpose, or am I missing something?
Here are some relevant objects from the graphql response for the order after the refund:
"currentTaxLines": [
{
"priceSet": {
"shopMoney": {
"amount": "45.99",
"currencyCode": "DKK"
}
}
}
],
"totalTaxSet": {
"shopMoney": {
"amount": "45.99",
"currencyCode": "DKK"
}
},
"currentTotalTaxSet": {
"shopMoney": {
"amount": "45.99",
"currencyCode": "DKK"
}
},
"originalTotalPriceSet": {
"shopMoney": {
"amount": "229.95",
"currencyCode": "DKK"
}
},
"subtotalPriceSet": {
"shopMoney": {
"amount": "200.0",
"currencyCode": "DKK"
}
},
"totalRefundedSet": {
"shopMoney": {
"amount": "29.95",
"currencyCode": "DKK"
}
},
"return": null,
"refundLineItems": {
"edges": []
},
"refundShippingLines": {
"edges": []
},
Notice how the refund is reflected in the subTotalPriceSet, but not in any of the tax sets.
According to the API docs, currentTaxLines should be after refunds. But it looks like Shopify just ignores tax when a line item or shipping is not selected?