For registration onAfterSaveUserRegistration is fired just before the registration complete message is displayed. The triggers variables are as follows.
Code:
$_PLUGINS->trigger( 'onAfterSaveUserRegistration', array( &$userComplete, &$messagesToUser, 1 ) );
var3 (the 1) is noting this is a frontend registration. As for CBSubs it's best to use the below usage to act only when plan has been activated or deactivated.
Plan Active
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions (custom value conditions)
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Equal To A
Plan Expired
Global
Triggers: onCPayUserStateChange
User: Automatic
Access: Everybody
Conditions (custom value conditions)
1: [var3] Equal To PLAN_ID_HERE
2: [var2] Not Equal To A
Replace PLAN_ID_HERE with the ID of the plan you want this to act on.