Automation of subscription cancellation, refund, and revoking access

I want to give subscribers the ability to cancel their own membership and have automation for any associated refund and revocation of access. Infusionsoft support tells me this isn’t possible. Does anybody know of a way to accomplish this, perhaps through integration with a 3rd party ecommerce solution that integrates with Infusionsoft?

I would also like to be able to create an automation that can count the number of times a customer has purchased and refunded a particular product so that it they inadvertently purchase twice and then cancel once, they are still considered an active customer, but if they cancel both purchases of the product they are no longer considered an active purchaser and all access is revoked.

So nothing out of the box will help you accomplish this. IS isn’t setup to provide accounting features. In terms of third party options, I imagine using an actual accounting package and http posts to that software might be an option. Tracking churn/attrition might be simpler if you had a working option for the fist part (accounting automation) as it then would just be a matter of setting custom fields or raising tags based on the accounting integration.