I created a mutation to refund an order
{
"query": "\n mutation RefundCreate($input: RefundInput!) {\n refundCreate(input: $input) {\n refund {\n id\n totalRefundedSet {\n presentmentMoney {\n amount\n currencyCode\n }\n shopMoney {\n amount\n currencyCode\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\n ",
"variables": {
"input": {
"refundLineItems": [
{
"lineItemId": "gid://shopify/LineItem/",
"quantity": 2,
"restockType": "NO_RESTOCK"
},
{
"lineItemId": "gid://shopify/LineItem/",
"quantity": 1,
"restockType": "NO_RESTOCK"
}
],
"notify": true,
"orderId": "gid://shopify/Order/",
"shipping": { "amount": "7.95" },
"currency": "USD",
"transactions": [
{
"orderId": "gid://shopify/Order/",
"parentId": "gid://shopify/OrderTransaction/",
"gateway": "shopify_payments",
"amount": "78.66",
"kind": "REFUND"
}
]
}
}
}
The request is successful but the shipping amount is not refunded.
In this case only the amount in the transaction is refunded.
Response
{
"data": {
"refundCreate": {
"refund": {
"id": "gid://shopify/Refund/",
"totalRefundedSet": {
"presentmentMoney": { "amount": "78.66", "currencyCode": "USD" },
"shopMoney": { "amount": "78.66", "currencyCode": "USD" }
}
},
"userErrors": []
}
},
"extensions": {
"cost": {
"requestedQueryCost": 20,
"actualQueryCost": 20,
"throttleStatus": {
"maximumAvailable": 20000.0,
"currentlyAvailable": 19980,
"restoreRate": 1000.0
}
}
}
}
Even though the request is successful the shipping is not refunded.