Hi everyone,
I am encountering an unexpected behavior when using the returnCalculate GraphQL API and am hoping someone can shed some light on whether this is an intended feature or a potential issue.
Issue Description:
The returnCalculate query is sometimes returning different totalTaxSet values for exchangeLineItems compared to their corresponding returnLineItems, even when there are no address changes or obvious reasons for a tax rate difference.
Specific Scenario (Tax Exemptions):
I’ve observed scenarios where the original order had no tax applied due to Shopify’s built-in tax exemption rules (likely involving specific tax overrides). However, when we process an exchange for the same product but in a different variant (e.g., a different size), the returnCalculate response applies tax to the exchange item (exchangeLineItems.totalTaxSet) where we expect the same tax exemption rule to apply (resulting in $0.00 tax).
Expected Behavior:
If the original item being returned was tax-exempt, the replacement item in the exchange (given no address change and similar product attributes) should also be tax-exempt, resulting in a $0.00 tax amount in the exchangeLineItems.
Actual Behavior:
The exchange line item is being taxed (e.g., $2.90), while the return line item is correctly reported as tax-exempt ($0.00 tax).
Technical Details (Example Query & Response):
- API Version:
2025-04 - Store URL/Name:
honey-buns-shapewear.myshopify.com
Input Query Snippet:
{
"input": {
"exchangeLineItems": [
{
"appliedDiscount": {
"description": "Frate exchange discount",
"value": { "amount": { "amount": 20.7, "currencyCode": "USD" } }
},
"quantity": 1,
"variantId": "gid://shopify/ProductVariant/42777432260686"
}
],
"orderId": "gid://shopify/Order/6162115985486",
"returnLineItems": [
{
"fulfillmentLineItemId": "gid://shopify/FulfillmentLineItem/13043183288398",
"quantity": 1
}
],
"returnShippingFee": null
}
}
Relevant Excerpt from the Response:
// ... (inside data.returnCalculate)
"exchangeLineItems": [
{
// ...
"totalTaxSet": {
"presentmentMoney": { "amount": "2.9", "currencyCode": "USD" }, // TAX APPLIED HERE
"shopMoney": { "amount": "2.9", "currencyCode": "USD" }
},
// ...
}
],
"returnLineItems": [
{
// ...
"totalTaxSet": {
"presentmentMoney": { "amount": "0.0", "currencyCode": "USD" }, // TAX EXEMPT HERE
"shopMoney": { "amount": "0.0", "currencyCode": "USD" }
}
}
]
// ...
What I’ve Tried So Far:
- I’ve reviewed the Shopify Help Docs on Tax Overrides.
- I confirmed that the merchant’s address settings have not changed since the original order was placed.
- I verified that both variants belong to the same product and should theoretically share the same tax profile.
Is this discrepancy intended behavior for exchanges via the API, or could there be an underlying issue with how returnCalculate handles existing tax exemption rules?
Thank you in advance for any insights!
Best,
Jake