In this paper, an initial boundary value problem for a wave equation with unusual boundary condition is considered. Giving an integral over-determination condition, a time-dependent potential is determined and existence and uniqueness theorem for small times is proved. We characterize the estimates of conditional stability of the solution of the inverse problem. Also, the numerical solution of the inverse problem is studied by using finite difference method,