How do you handle account deletion when user has an active paid subscription

I want to provide the ability to a user to delete its account on my SaaS. However, how can I handle that if the user has a current active subscription (monthly payment)?

Should I delete the account right away when asked, or plan the deletion at the end of the billing cycle?

If they want to delete their account, they want to delete it. Give them what they want and delete the account even if it's in the middle of a billing cycle. However, I would provide a warning/double confirmation though - i.e. you should definitely ask them via some modal/popup/confirmation screen "Are you sure you want to delete your account? You have X days left on your billing cycle, why not keep the account for the remainder of the month?"

Thanks for your answer, that seems the most accurate thing to do. I don't want to add complex logic to handle "account deletion scheduling when billing ended".

A fair, large warning with double-confirmation should be enough for the user.

Perfect - you can always manually do a partial refund if it comes to it. But I doubt it's going to be big problem.

You could delete it at the end of the cycle; but that kinda feels like a dark pattern. IMHO it's better to pro-rate it and refund the difference and get it done.