We have the option for a user to have their main membership and a second optional add on membership.
We want the user to be able to cancel the optional membership whenever they want.
Currently have built a process to end membership by cancelling recurring contribution via the api. This works well for single memberships or if they want to cancel both.
BUT I want them to just cancel the add on.
I have tried simply removing the 'contribution_recur_id' from the membership, but when the billing cycle comes round the full amount is charged and the add on membership is reinstated.
Any ideas or examples of how to manage this?