This article is written in collaboration with a law agency. However, it is intended for general information purposes only. It does not constitute a client-attorney relationship or personalized legal advice.
If a customer orders something from you, you enter into a contract with them. For fulfilling that contract, you need to process their personal data. This means that you can keep the data you need for fulfilling the order. However, if a customer requests deleting their data, you should do so after the order is processed.
However, in many countries, you are obliged to keep order/invoice data even after fulfilling an order. See this article for more details.