Thanks for the follow-up.Although circumstances vary
( depending on your iDev configuration ); under normal/typical circumstances, you would ONLY terminate a commission whenever a Refund/Reversal occurs. In other words, you are only losing money in that specific scenario. In the case of a Cancellation, all that's happening is that future payments are being stopped
( i.e. no money from the past is being lost ).
So in the case of a Cancellation, you would
only contact iDevAffiliate if you're paying commissions on a recurring basis; and even then, you would only
terminate recurring commissions
( i.e. terminate_recurring.php ). So for Cancellations, when you setup your API Notification URL with s2Member, you'd use
%%subscr_id%% as the Order Number, because that's what should be associated with the recurring commission.
In the case of a Refund/Reversal, you would also use
%%subscr_id%%. The Subscription ID remains constant throughout the life of the paid Subscription, so this is what you'd use to reference and terminate a previous commission paid to an affiliate.
For the sake of being thorough, it won't hurt to create a second API Notification, which includes the
%%parent_txn_id%% as well. For example, you might have two lines in your s2Member Refund/Reversal Notifications box. Something like this would cover you in any Membership situation.
- Code: Select all
http://example.com/affiliates/API/scripts/terminate_commission.php?secret=xxx&order_number=%%subscr_id%%
http://example.com/affiliates/API/scripts/terminate_commission.php?secret=xxx&order_number=%%parent_txn_id%%
In addition, if you're using s2Member's
Specific Post/Page Access, be sure to setup an API Notification for that as well. There's a separate API Notification processed by s2Member, specifically for Refunds/Reversals that were originally associated with the purchase of a Specific Post/Page.
- Code: Select all
http://example.com/affiliates/API/scripts/terminate_commission.php?secret=xxx&order_number=%%parent_txn_id%%