Hi,
I tried to calculate refunds via refunds/calculate endpoint, and i got follwing response from Shopify:
http status: 422
array (
'errors' =>
array (
'refund_line_items.line_item' =>
array (
0 => 'can\'t be blank',
),
'refund_line_items.quantity' =>
array (
0 => 'cannot refund more items than were purchased',
),
),
)
Here is what i passed in as Json:
array(
'refund' =>
array (
'shipping' =>
array (
'amount' => 1.20,
),
'refund_line_items' =>
array (
0 =>
array (
'line_item_id' => 363433163,
'quantity' => 1,
),
),
),
)
The request body has the same format as listed in API Doc (https://help.shopify.com/api/reference/refund#calculate). I tried to pass in line_item array, and it still gave me same error message.
Also,I didnt even exceed the line item quantity, and it gave me "Cannot refund more items than were purchased". Any idea how to resolve this issue? Highly appreciate it.
Thank you!