  Given a stochastic state process $(X_t)_t$ and a real-valued submartingale
cost process $(S_t)_t$, we characterize optimal stopping times $\tau$ that
minimize the expectation of $S_\tau$ while realizing given initial and target
distributions $\mu$ and $\nu$, i.e., $X_0\sim \mu$ and $X_\tau \sim \nu$. A
dual optimization problem is considered and shown to be attained under suitable
conditions. The optimal solution of the dual problem then provides a contact
set, which characterizes the location where optimal stopping can occur. The
optimal stopping time is uniquely determined as the first hitting time of this
contact set provided we assume a natural structural assumption on the pair
$(X_t, S_t)_t$, which generalizes the twist condition on the cost in optimal
transport theory. This paper extends the Brownian motion settings studied in
[15, 16] and deals with more general costs.
