Suppose my application has handled a user request and charged him. As it is about to return a response to the user, my app shuts down either in an expected way (e.g. I disable it to perform maintenance of the database or PA closes for maintenance) or an unexpected one (e.g. power outage). In this case, I would have charged the user without giving him the service he paid for. Is there anything I can do besides manually detecting the affected users and making restitutions to handle such situations gracefully?