Create an invoice from a transaction or refund