I would recommend to do both.
Consider the situation where a single discrete dividend is paid at $t$. You use a Finite Difference (FD) scheme to price a European option. Starting from the terminal condition at $T$, by backward induction you manage to obtain the solution $$V(t^+, \mathcal{S})$$ for a discrete grid of spot levels $\mathcal{S}$ at time $t^+$. For the moment, it is as if you did not consider dividends.
Now, because the stock goes ex at $t$, the no-jump condition writes: $$V(t^-,\mathcal{S}) = V(t^+,\mathcal{S}-D) \tag{1}$$
When you talk about "accounting for the dividend payment", I assume you talk about the transformation $V(t^+,\mathcal{S}) \to V(t^-,\mathcal{S})$ you need to take care of before being able to resume your FD backward stepping up to time $t=0$. From $(1)$ you know that $V(t^+,\mathcal{S}) \to V(t^-,\mathcal{S})=V(t^+,\mathcal{S}-D)$. This means you can (for instance) perform an interpolation to find $V(t^+,\mathcal{S}-D)$ from $V(t^+,\mathcal{S})$ and set $V(t^-,\mathcal{S})$ equal to the result.
For American options I would advise to do, when you reach time step $t$
- Once you get $V(t^+,\mathcal{S})$, do $V(t^+,\mathcal{S}) = \max( V(t^+,\mathcal{S}), (\phi(\mathcal{S}-K))^+)$ = check for optimal exercise opportunity after a dividend payment
- Account for the dividend payment $V(t^+,\mathcal{S}) \to V(t^-,\mathcal{S})=V(t^+,\mathcal{S}-D)$ = account for dividend payment
- Once you get $V(t^-,\mathcal{S})$, do $V(t^-,\mathcal{S}) = \max( V(t^-,\mathcal{S}), (\phi(\mathcal{S}-K))^+)$ = check for optimal exercise opportunity before a dividend payment
- Move backward to previous time step $t-\Delta t$... and repeat.
with $\phi=\pm1$ for call/put respectively.