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
mutation returnRefund($returnRefundInput: ReturnRefundInput!) {
returnRefund(returnRefundInput: $returnRefundInput) {
refund {
# Refund fields
}
userErrors {
field
message
}
}
}
Input
{
"returnRefundInput": {
"note": "<your-note>",
"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"
{
"returnRefundInput": {
"note": "<your-note>",
"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 {
note: String
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!
}