Dear Shopify Support Team,
I am encountering an issue with the Shopify Admin GraphQL API when attempting to use ShippingAmountV2
in a suggestedRefund
query for multi-currency orders. Despite ensuring the query follows the documented structure, I am receiving the following error:
{
"errors": [
{
"message": "invalid money '{\"amountSet\" => {\"presentmentMoney\" => {\"amount\" => \"4.99\", \"currencyCode\" => \"USD\"}, \"shopMoney\" => {\"amount\" => \"3.45\", \"currencyCode\" => \"GBP\"}}}'",
"extensions": {
"code": "argumentLiteralsIncompatible",
"typeName": "CoercionError"
}
}
]
}
Here’s the query I’m using:
query suggestedLineItemRefundQuery {
order(id: "gid://shopify/Order/5665719058568") {
suggestedRefund(
shippingAmount: {
amountSet: {
presentmentMoney: {
amount: "4.99"
currencyCode: "USD"
}
shopMoney: {
amount: "3.45"
currencyCode: "GBP"
}
}
}
refundLineItems: [
{
lineItemId: "gid://shopify/LineItem/13497956008072"
quantity: 1
}
]
) {
amountSet {
presentmentMoney {
amount
currencyCode
}
shopMoney {
amount
currencyCode
}
}
shipping {
amountSet {
presentmentMoney {
amount
currencyCode
}
shopMoney {
amount
currencyCode
}
}
}
}
}
}
What I’ve Tried:
- Verified the currencies in the order:
- Presentment currency: USD
- Shop currency: GBP
- Attempted simplified queries without overriding
ShippingAmountV2
, which worked correctly. - Tested the latest Shopify API version.
Order Details:
- Order ID:
gid://shopify/Order/5665719058568
- Line Item ID:
gid://shopify/LineItem/13497956008072
Request:
Could you please:
- Confirm if the
ShippingAmountV2
structure in my query is correct? - Clarify if there are any undocumented limitations or requirements for using
ShippingAmountV2
in multi-currency refunds. - Provide guidance or corrections to resolve the error.
Your assistance would be greatly appreciated!
Thank you,