This solution is not the most elegant, but since you're generating the code for this anyway, I don't think it's a critical problem.
First, I took the liberty of adding x tick label style={anchor=south,yshift=-0.5cm}, to your options list. This makes the baselines of each character (a,b,c,d) align nicely (typically not an issue because figures, each having the same height, are normally used here).
I added a style totals/.style={nodes near coords align={anchor=south}}, to typeset the totals on top of the stacked bars when we're ready to do so, overriding the anchor=north which is specified for the other nodes.
Next is where things start to get a bit inelegant. The first plot can remain unchanged. In the second plot, we use pgfplots' point meta=explicit feature to source the node label text from somewhere other than the point's actual y-coordinate on the plot. We need to provide this explicit source as a bracketed number in the coordinates list, simply repeating the second "coordinate". This is the complete code for the second plot:
%Inactive
\addplot [fill=red,point meta=explicit] coordinates {
({a},60) [60] % <--- note repeated number in brackets
({b},50) [50]
({c},40) [40]
({d},30) [30]};
\legend{Active,Inactive}
Finally, we add a third "dummy" stacked plot with all zeroes and the totals style applied to typeset the totals atop the bars.
Complete Code
\documentclass[border=5mm] {standalone}
\usepackage{pgfplots, pgfplotstable}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
title={Test stacked},
ybar stacked, ymin=0,
bar width=10mm,
symbolic x coords={a,b,c,d},
xtick=data,
nodes near coords,
nodes near coords align={anchor=north},%Move values in bar
totals/.style={nodes near coords align={anchor=south}},
x tick label style={anchor=south,yshift=-0.5cm},
]
%Active
\addplot [fill=blue] coordinates {
({a},15)
({b},25)
({c},35)
({d},15)};
%Inactive
\addplot [fill=red,point meta=explicit] coordinates {
({a},60) [60]
({b},50) [50]
({c},40) [40]
({d},30) [30]};
\legend{Active,Inactive}
%Dummy stacked plot to produce totals
\addplot[totals] coordinates {
({a},0)
({b},0)
({c},0)
({d},0)};
\end{axis}
\end{tikzpicture}
\end{document}
Output
