Requires write_orders access scope or write_marketplace_orders access scope. Also: Requires the write_returns access scope. The user must have refund_orders permission.

Refunds a return when its status is OPEN or CLOSED and associates it with the related return request.


The input fields to refund a return.


Was this section helpful?

The created refund.

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation returnRefund($returnRefundInput: ReturnRefundInput!) {
  returnRefund(returnRefundInput: $returnRefundInput) {
    refund {
      # Refund fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "returnRefundInput": {
    "notifyCustomer": true,
    "orderTransactions": [
      {
        "parentId": "gid://shopify/<objectName>/10079785100",
        "transactionAmount": {
          "amount": "29.99",
          "currencyCode": "AED"
        }
      }
    ],
    "refundDuties": [
      {
        "dutyId": "gid://shopify/<objectName>/10079785100",
        "refundType": "FULL"
      }
    ],
    "refundShipping": {
      "fullRefund": true,
      "shippingRefundAmount": {
        "amount": "29.99",
        "currencyCode": "AED"
      }
    },
    "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!
}