Orders - Itemized Refund, workaround to handle inventory restocking?

It’s 2024 and still no itemized refunds - I just ran into this issue per Refunds and Exchanges

  • In the current implementation, the Refunds API doesn’t support itemized refunds. However, sellers can use Square products (for example, Square Point of Sale) for itemized refunds.

This really limits what can be built on top of Square, leveraging the hardware/1st party products. Maybe you have a workaround you can share for putting inventory back in stock even if we can’t do an itemized refund?

When I looked at InventoryState Enum - Square API Reference, and compared it with some inventory adjustments Square did I can see these are the transitions that happen on a 1) sale 2) refund 3) restock the refund (in reverse order below, from ). It moves IN_STOCK → SOLD → RETURNED_BY_CUSTOMER → IN_STOCK. So maybe I could recreate that?

3) restock
 {
      "type": "ADJUSTMENT",
      "adjustment": {
        "id": "5SVGR2RUIZFK6WIPWYW77AY7",
        "from_state": "RETURNED_BY_CUSTOMER",
        "to_state": "IN_STOCK",
        "location_id": "...",
        "catalog_object_id": "2FFWXGLO5KRFIBKJXYUJBZIE",
        "catalog_object_type": "ITEM_VARIATION",
        "quantity": "1",
        "occurred_at": "2024-05-11T00:16:31.213Z",
        "created_at": "2024-05-11T00:16:31.302Z",
        "team_member_id": "...-"
      }
    },

2) itemized refund
    {
      "type": "ADJUSTMENT",
      "adjustment": {
        "id": "L5EBZVOKKUKBNUJMOB3O2KYF",
        "from_state": "SOLD",
        "to_state": "RETURNED_BY_CUSTOMER",
        "location_id": "...",
        "catalog_object_id": "2FFWXGLO5KRFIBKJXYUJBZIE",
        "catalog_object_type": "ITEM_VARIATION",
        "quantity": "1",
        "total_price_money": {
          "amount": 159,
          "currency": "USD"
        },
        "occurred_at": "2024-05-11T00:16:29Z",
        "created_at": "2024-05-11T00:50:47.752Z",
        "team_member_id": "...-",
        "transaction_id": "wfAJEts8WqVrXhfdMAHqAa7eV"
      }
    },
1) the original sale
 {
      "type": "ADJUSTMENT",
      "adjustment": {
        "id": "LJWVWTZEHFCGADVAVOB22V6U",
        "from_state": "IN_STOCK",
        "to_state": "SOLD",
        "location_id": "LTGR8RKS9T3X1",
        "catalog_object_id": "2FFWXGLO5KRFIBKJXYUJBZIE",
        "catalog_object_type": "ITEM_VARIATION",
        "quantity": "1",
        "total_price_money": {
          "amount": 159,
          "currency": "USD"
        },
        "occurred_at": "2024-05-11T00:12:01Z",
        "created_at": "2024-05-11T00:12:11.674Z",
        "transaction_id": "sNZBgbhxoATcHz1D728bGMLbddRZY"
      }
    }

However, unfortunately I don’t think I can recreate those adjustments because some are read only:

RETURNED_BY_CUSTOMER
The related quantity of items were returned through the Square Point of Sale application, but are not yet available for sale. READ-ONLY : the Inventory API cannot move quantities to or from this state.

Or if the itemized refunds are complicated for the 3rd party developers, why not have an api endpoint to manage the hard part of itemized refunds. Could create a draft refund (stateful) and add items to it, doing server validation by Square so you only expose part of the itemized refund model. Then 3P apps could build solutions while keeping inventory correct in refund scenarios.

Really hoping for some creative workaround options.

Trying to find a workaround, maybe:

  1. Do a custom refund, refunding a specific order $ amount. Refunds and Exchanges
  2. Then manually adjusting the inventory by the qty (this is a weight item) that was returned. E.g. 0.2 lb. Goal is our inventory and COGS are accurate.

The only hope may be this below? Could I move it from SOLD → UNLINKED_RETURN. However if I did, would that make it as if I received inventory with a cost? I think I’d want the same cost as the prior batch was, which may not be the item variation’s default cost. I assume the SOLD → IN_STOCK transition finds the appropriate inventory cost lot.

UNLINKED_RETURN
The related quantity of items were returned but not linked to a previous transaction. Unlinked returns are not tracked in Square. Transferring a quantity from UNLINKED_RETURN to a tracked state (e.g., IN_STOCK) introduces new stock into the system.

EDIT: or could we do a direct change in an adjustment from SOLD → IN_STOCK?

IN_STOCK
The related quantity of items are on hand and available for sale.

SOLD
The related quantity of items were sold as part of an itemized transaction. Quantities in the SOLD state are no longer tracked.

I’ll try out some ideas.

At this time itemized refunds aren’t currently available. This is a very popular feature request and we hope to have more for you soon. :slightly_smiling_face:

Hurray! Thank you! Itemized Refunds and Exchanges together are a really critical unlock, whenever it may happen.