Not 100% sure about Java SDK, but JavaScript SDK allows to specify `"now"` as a cursor to be notified of payments happening starting from when this script runs.