Determining actual refunded amount on a return line level

Hi,

I cannot figure out how to find the actual amount refunded on a return order line.

I tried this:

{
  order(id: "gid://shopify/Order/6584484856113") {
    returns(first: 10) {
      edges {
        node {
          id
          name
          refunds(first: 10) {
            edges {
              node {
                id
                refundLineItems(first: 10) {
                  edges {
                    node {
                      id
                      quantity
                      priceSet {
                        presentmentMoney {
                          amount
                        }
                      }
                      lineItem {
                        id
                        sku
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

but the amount seems to be the unit price as it was when the order was placed as opposed to the actual refunded amount, that may differ from the original price in case the merchant decides to e.g. refund less for whatever reason.
I need the actual refunded amount on a line level. I know I can get the refunded amounts from the transactions, but in case there are multiple returns, I cannot tie a given refund to a given return.

Anybody knows how to get the actual refunded amount and being able to define it on a line level in case multiple lines are returned and refunded?

Kind regards,
-Louise

Ah I now realize (why is it always delayed to 2min after the post) that a refunded amount is not tied to a returned line, but there is a refund total per return:

{
  order(id: "gid://shopify/Order/6584501961009") {
    returns(first: 10) {
      edges {
        node {
          id
          refunds(first: 10) {
            edges {
              node {
                id
                totalRefundedSet{
                  presentmentMoney{
                    amount
                  }
                }
                refundLineItems(first: 10) {
                  edges {
                    node {
                      id
                      quantity
                      lineItem {
                        id
                        sku
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
1 Like

Glad you figured this out Lull!