When someone receives ecash tokens, their wallet checks they are valid with the issuing mint. They do this by getting the mint to ” melt " the tokens to new tokens that are linked to their key. The paid tokens are then invalid at the mint and are useless to the payer, meaning that he cannot pay someone else because the mint won't melt them twice.
Discussion
And in order to do this the receiver has to be online, right?
Not necessarily, if the token is tied to your public key, but it's a trade off, you need to trust the payer and the mint. Everything is a trade-off
This is exactly what nostr:nprofile1qqsxwkuyle67y94tj378gw8w2xw2wa6nwmwlqhddlwnz0z7sztsaw2qpzamhxue69uhhyetvv9ujuurjd9kkzmpwdejhgtcnw0q5g had posted about. You need to connect with the mint in each ecash transaction.