Scenario: Sell 2 x Item A with custom fields for variations and metadata.
When I issue a refund for one of the items through snipcart backend the refund webhook notifies my server with the order token and the amount - but it does not let me know which of the 2 items was refunded.
How can I determine which item was refunded so I can free up that item for another buyer?
I have tried the /api/v1/orders/{token}/refunds/{id} endpoint but the item options or metadata is not present:
[orderToken] => 4c0dde02-xxxx-4ca8-xxxx-71cbf0791a59
[amount] => 11
[comment] =>
[notifyCustomer] =>
[refundedByPaymentGateway] => 1
[id] => 119e5000-xxxx-44d1-xxxx-6fc24a4c8086
[creationDate] => 2025-11-06T07:48:35.07Z
[modificationDate] => 2025-11-06T07:48:35.07Z
I have tried the /api/orders/{token} endpoint and that does give me the metadata but not what was refunded.
I feel there must be a way to do this but I cannot find it anywhere.
Ideally I need the metadata field from the refunded item as that contains the time-slot that has been sold.
[metadata]
[From] => 2025-11-16 07:00
Any help would be greatly appreciated.