If you are using Active Campaign, then follow these steps to cancel a user via API.
Once you are ready to cancel the user and de-activate him from one of your products, follow these steps:
- Go to Settings and then select Integrations.
- Scroll down to Other Systems then click Custom API.
- Under Cancellation, Copy the API URL provided.
To do this:
- Go to your Active Campaign account.
- Create or click the Campaigns on the left sidebar or go directly to Automations menu and select the one that you’re working with.
- Depending on your settings, you may select the trigger first like a tag is added.
- Then, click the + sign to add new action.
- In the Add a New Action pop up window, click on Conditions and Workflow and then select Webhook.
- Lastly, paste the complete Cancellation API URL here and click on Save.
- POST URL: Insert the custom API URL you copied from your site
- Add the following parameters to the URL:
type > credit
email > %EMAIL% - Optional Parameters:
course_id => the ID of the Online Course (You can find this by going to “Online Courses” and the course ID is located on the bottom left of each course)
bundle_id => the ID of the Bundle
forum_full_access => `yes` to remove user user full forum access
forum_category_id => the ID of the Forum category
NB! Always add an ampersand if you’re going to add a new parameter to the URL and then an equal sign before the value.
Here are the sample URLs for each product:
Course – https://yourdomainname.com/customapi.php?secret=XYZ&type=credit&email=%EMAIL%&course_id=2
Bundle – https://yourdomainname.com/customapi.php?secret=XYZ&type=credit&email=%EMAIL%&bundle_id=2
Forum Full Access – https://yourdomainname.com/customapi.php?secret=XYZ&type=credit&email=%EMAIL%&forum_full_access=yes
Forum Category – https://yourdomainname.com/customapi.php?secret=XYZ&type=credit&email=%EMAIL%&forum_category_id=8
How this works:
When somebody cancels their purchase, you may apply the relevant Tag to the user’s Active Campaign profile. What you could do is have a Tag Goal to start the campaign. This will add the contact to the sequence where Active Campaign will send an HTTP post to notify your site that the access should be canceled. Your site will then know to deactivate that particular access in the customer’s account.
Related Articles:
Integrating Active Campaign with your website
Register User to an Online Course, Bundle, Forum, Forum Category and Full Access using Active Campaign