Anchor to returnRefundreturn
returnRefund
mutation
Requires access scope or
access scope. Also: Requires the
access scope. The user must have
permission.
Refunds a return when its status is or
and associates it with the related return request.
Anchor to Arguments
Arguments
- Anchor to returnRefundInputreturn•
Refund Input ReturnRefund requiredInput! The input fields to refund a return.
Was this section helpful?
Anchor to ReturnRefundPayload returnsReturnRefundPayload returns
- Anchor to refundrefund•
The created refund.
- Anchor to userErrorsuser•
Errors [ReturnUser non-nullError!]! The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
1mutation returnRefund($returnRefundInput: ReturnRefundInput!) {2 returnRefund(returnRefundInput: $returnRefundInput) {3 refund {4 # Refund fields5 }6 userErrors {7 field8 message9 }10 }11}
Input
1{2 "returnRefundInput": {3 "notifyCustomer": true,4 "orderTransactions": [5 {6 "parentId": "gid://shopify/<objectName>/10079785100",7 "transactionAmount": ""8 }9 ],10 "refundDuties": [11 {12 "dutyId": "gid://shopify/<objectName>/10079785100",13 "refundType": ""14 }15 ],16 "refundShipping": {17 "fullRefund": true,18 "shippingRefundAmount": ""19 },20 "returnId": "gid://shopify/<objectName>/10079785100",21 "returnRefundLineItems": [22 {23 "quantity": 1,24 "returnLineItemId": "gid://shopify/<objectName>/10079785100"25 }26 ]27 }28}
{
"returnRefundInput": {
"notifyCustomer": true,
"orderTransactions": [
{
"parentId": "gid://shopify/<objectName>/10079785100",
"transactionAmount": ""
}
],
"refundDuties": [
{
"dutyId": "gid://shopify/<objectName>/10079785100",
"refundType": ""
}
],
"refundShipping": {
"fullRefund": true,
"shippingRefundAmount": ""
},
"returnId": "gid://shopify/<objectName>/10079785100",
"returnRefundLineItems": [
{
"quantity": 1,
"returnLineItemId": "gid://shopify/<objectName>/10079785100"
}
]
}
}
input ReturnRefundInput {
notifyCustomer: Boolean
orderTransactions: [ReturnRefundOrderTransactionInput!]
refundDuties: [RefundDutyInput!]
refundShipping: RefundShippingInput
returnId: ID!
returnRefundLineItems: [ReturnRefundLineItemInput!]!
}
input ReturnRefundOrderTransactionInput {
parentId: ID!
transactionAmount: MoneyInput!
}
input RefundDutyInput {
dutyId: ID!
refundType: RefundDutyRefundType
}
input RefundShippingInput {
fullRefund: Boolean
shippingRefundAmount: MoneyInput
}
input ReturnRefundLineItemInput {
quantity: Int!
returnLineItemId: ID!
}