Here is an example JSON needed to refund an order with multiple transactions since the shopify documenation does not provide one.
I wasted a lot of time with this, so hopefully this helps someone avoid that :))
{
"refund": {
"notify": "true",
"note": "",
"shipping": {
"full_refund": "false"
},
"refund_line_items": [
{
"price": 191.94,
"line_item_id": xxx,
"quantity": 1,
"restock_type": "no_restock",
"location_id": xxx
},
{
"price": 155.94,
"line_item_id": xxx,
"quantity": 1,
"restock_type": "no_restock",
"location_id": xxx
},
{
"price": 21,
"line_item_id": xxx,
"quantity": 1,
"restock_type": "no_restock",
"location_id": xxx
}
],
"transactions": [
{
"parent_id": xxx,
"currency": "EUR",
"amount": "347.88",
"kind": "refund",
"gateway": "bogus"
},
{
"parent_id": xxx,
"currency": "EUR",
"amount": "21.00",
"kind": "refund",
"gateway": "bogus"
}
]
}
}