Instead of $4$ pairs of points, let's look at the case with $3$ pairs of points first.
- Let $H = \big\{ (x,y,h) \in \mathbb{R}^3 : h \ge 0 \big\}$ be the upper half-space.
- For any $p = (x,y,h) \in H$, let $\tilde{p} = (x,y,0)$ be its projection on the $xy$-plane.
Given any $3$ points $p_1, p_2, p_3\in H$ whose projections $\tilde{p}_1$, $\tilde{p}_2$, $\tilde{p}_3$ bounding a triangle in the $xy$-plane in counter-clockwise orientation,
consider the convex hull formed by following $6$ vertices $p_1, p_2, p_3, \tilde{p}_1, \tilde{p}_2, \tilde{p}_3$. The resulting polyhedron is a truncated triangular prism.
To compute its volume, we split it into $3$ tetrahedra:
$$\tilde{p}_1, \tilde{p}_2, \tilde{p}_3, p_3;\quad
\tilde{p}_1, \tilde{p}_2, p_3, p_2;\quad\text{ and }\quad
\tilde{p}_1, p_2, p_3, p_1$$
We find
$$\begin{align}
\verb/Volume/ &=
\frac16
\begin{vmatrix}
1 & x_1 & y_1 & 0\\
1 & x_2 & y_2 & 0\\
1 & x_3 & y_3 & 0\\
1 & x_3 & y_3 & h_3\\
\end{vmatrix}
+
\frac16
\begin{vmatrix}
1 & x_1 & y_1 & 0\\
1 & x_2 & y_2 & 0\\
1 & x_3 & y_3 & h_3\\
1 & x_2 & y_2 & h_2\\
\end{vmatrix}
+
\frac16
\begin{vmatrix}
1 & x_1 & y_1 & 0\\
1 & x_2 & y_2 & h_2\\
1 & x_3 & y_3 & h_3\\
1 & x_1 & y_1 & h_1\\
\end{vmatrix}\\
\\
&= \frac{h_1+h_2+h_3}{6}\begin{vmatrix}
1 & x_1 & y_1\\
1 & x_2 & y_2\\
1 & x_3 & y_3\\
\end{vmatrix}
\end{align}
$$
For the truncated quadrilateral prism at hand, we can split it into two
truncated triangular prisms.
Up to a sign, the volume you seek will be equal to:
$$\verb/Volume/ =
\frac{h_1+h_2+h_3}{6}\begin{vmatrix}1 & x_1 & y_1\\1 & x_2 & y_2\\1 & x_3 & y_3\end{vmatrix}
+
\frac{h_1+h_3+h_4}{6}\begin{vmatrix}1 & x_1 & y_1\\1 & x_3 & y_3\\1 & x_4 & y_4\end{vmatrix}
$$