Skip to main content
Question

Update Restock Item fee as Nonstock Item in refunds-

  • September 24, 2026
  • 2 replies
  • 24 views

Forum|alt.badge.img

Adding a restocking fee to an RC return order | Community

 

Has anyone implemented a Shopify restocking fee import into Acumatica RC refund orders?

I’m looking for a code-level approach to retrieve the restocking fee from Shopify and add it as a separate line to the RC refund order.

I checked the Shopify refund data and couldn’t find the restocking fee directly in the REST OrderRefund model.

Is there an existing Acumatica API/model or recommended approach to retrieve the Shopify restocking fee and add it to the refund order?

2 replies

Forum|alt.badge.img
  • Author
  • Freshman I
  • September 24, 2026

​@Steve Milner ​@rkenna Any Help?


Steve Milner
Varsity III
Forum|alt.badge.img+4
  • Varsity III
  • September 24, 2026

@Adcirruserp the fee isn't on the refund in either API, which is why OrderRefund doesn't have it. It's on the return line instead: ReturnLineItem.restockingFee in the GraphQL Admin API, which you reach from the refund through Refund.return. Your token needs the read_returns scope.

query ($id: ID!) {
  refund(id: $id) {
    return {
      returnLineItems(first: 50) {
        nodes {
          ... on ReturnLineItem {
            restockingFee {
              amountSet {
                shopMoney { amount }
                presentmentMoney { amount }
              }
            }
          }
        }
      }
    }
  }
}

The 2026 R1 connector (26.101) has a class for the fee, ReturnLineItemTypeGQL.RestockingFee, but none of its code reads it. It only loads returns for POS orders, and that query leaves the fee out: its GraphQLQueryBuilder runs at UnionPathDepth 2, and 4 brings it in.

Look at one of your RCs first. Shopify doesn't deduct return fees for you, so staff lower the refund and Shopify logs the gap as an order adjustment. The connector posts that to the RC as your Refund Amount Item line. If the fee is already on that line, move it to your fee item instead of adding a second one, or you'll deduct it twice.

For the line, override AddOrderAdjustments in a graph extension on SPRefundsProcessor. It runs per refund while the RC is built, and it's the method that writes the Refund Amount Item line. Copy how it builds and matches that line (quantity -1, positive unit price, Manual Price on). It's synchronous, so make the GraphQL call first in CreateRefundOrders, which is async. simonliang91's How-To shows that override, written against 2023 R2's REST types: https://community.acumatica.com/retail-113/how-to-create-a-custom-mapping-in-shopify-refund-entity-22051