You can only cancel a transaction if you haven’t confirmed it yet; once confirmed, you cannot retrieve the funds since all transactions with it are final and irreversible. Therefore, double-check all the info you entered before you confirm the transaction.