Make merchant reference optional in do_refund/payment