  We calculate the scalar product of Bethe states of the XXZ spin-$\frac{1}{2}$
chain with general integrable boundary conditions. The off-shell equations
satisfied by the transfer matrix and the off-shell Bethe vectors allow one to
derive a linear system for the scalar product of off-shell and on-shell Bethe
states. We show that this linear system can be solved in terms of a compact
determinant formula that involves the Jacobian of the transfer matrix
eigenvalue and certain q-Pochhammer polynomials of the boundary couplings.
