https://docs.mollie.com/reference/v2/refunds-api/create-refund
function(string $payment_id, string $amount, array $params = [])
{
$payment = $this->mollie->payments->get($payment_id, ['testmode' => !empty($params['testmode'])]);
$params = array_merge([
"amount" => [
"currency" => $payment->amount->currency,
"value" => $amount
]
], $params);
$refund = $payment->refund($params);
return X::toArray($refund);
}