In the competitive electricity environment, the flexibility of power transactions is expected to drastically increase among the trading partners and can compromise the system security and reliability. These transactions are to be evaluated ahead of their scheduling in a day-ahead and hour-ahead market to avoid congestion and ensure their feasibility with respect to the system operating conditions. The security of the transactions has become essential in the new environment for better planning and management of competitive electricity markets. This paper proposes a new method of secure bilateral transaction determination using AC distribution factors based on the full Jacobian sensitivity and considering the impact of slack bus for pool and bilateral coordinated markets. The secure bilateral transactions have also been determined considering critical line outage contingencies cases. The bilateral transaction matrix pattern has also been determined in the presence of unified power flow controller (UPFC). The optimal location of UPFC has been determined using mixed integer non-linear programming approach. The proposed technique has been applied on IEEE 24-bus reliability test system (RTS).