You can initiate DELETE /api/v2/config/ API to deactivate Ansible tower or automation platform subscription. The command to deactivate is given below.
$ curl -X DELETE https://<MY_ANSIBLE_TOWER_URL>/api/v2/config/ -u admin -k
Enter host password for user 'admin': <password for admin user>