Getting the following response during refund REST API. The order is fulfilled and the marked as returned on the shopify. The quantity and amount are within the refundable parameters. The line_item id and quantity are correct as corss checked. Below are the attached logs:
REQUEST:
URL: https://***/admin/api/2023-10/orders/***/refunds.json
Method: POST
Body: {
"refund": {
"currency": "INR",
"notify": true,
"note": "",
"shipping": {
"amount": 0
},
"refund_line_items": [
{
"quantity": 1,
"line_item_id": ***,
"location_id": null,
"restock_type": "no_restock",
"price": "1421.00",
"subtotal": "1271.19",
"total_tax": "136.20",
"discounted_price": "1421.00",
"discounted_total_price": "1421.00",
"total_cart_discount_amount": "149.81"
}
],
"transactions": [
{
"order_id": ***,
"kind": "refund",
"gateway": "***",
"parent_id": ***,
"amount": "1271.19",
"currency": "INR",
"maximum_refundable": "5363.89"
}
]
}
}
RESPONSE:
{
"errors": {
"refund_line_items": [
"cannot refund more than refundable quantity"
]
}
}