While it might seem like the end of the world, unless you’ve lost customer data, don’t worry too much about it.
Be honest with your customers about the issue. Let them know something broke in the software and that you are fixing it. You will find that customers can be pretty understanding of such issues, as long as you communicate effectively to them. They can also be quite accomodating of some serious downtime.
You are going to face issues like this every once in a while - the only surety in software is that “shit happens”. Everytime it will be a different issue you have not faced before - a bug that only is reproduced under specific conditions, a third party api that does not work as expected, a random server crash you cannot diagnose.
Data backup and restore strategy is your friend. Make sure to test backups for correctness.
My favorite personal story - after a straight 14 hour coding session, I inadvertently ran a mysql query on the production server that disabled all customer accounts and then I promptly went to bed. Woke up 12 hours later to a bunch of emails from paying users who were confused why they could not use the software anymore. Fixed data from backup, then replied to each of them with a sincere apology. Not one cancelation - infact not one angry reply.