You can follow the steps listed here to cancel your subscription and payment details cannot be removed until the account charges and other pending charges are cleared. So once you have closed down resources and Subscription the account will be closed after a cooling period.
Hope this helps.
Please Accept the answer if the information helped you. This will help us and others in the community as well.