How to modify dynamically the fee of a transaction? I want to modify dynamically the fee for each transaction made by the users who use my website. I calculate the fees dynamically but I don't know how can I apply that custom fee for each user. I am trying it in the following way:

$this-&gt;bitcoin-&gt;settxfee($fee);
$output = $this-&gt;bitcoin-&gt;sendtoaddress($toAddress, $amount);


If someone can point me in the right direction I'd be grateful
You can only do this if you set the RBF bit on the original transaction.