Answers.Body: <p>Technically it's possible to do using a token processor hook. Each membership is linked to contribution recur via civicrm_membership.contribution_recur_id so if you are using Membership entity for sending reminders you could use membership id to fetch contribution recur id and build the cancel subscription URL.</p>
  <p>You could also use smarty to add logic inside the reminder message using the above logic if you don't want to go via hook implementation.</p>
  <p>Note: Not all payment processor allows to cancel the subscription from Civi, however, the common ones do. In case it doesn't you will need to exclude the cancel subscription URL or build the cancel subscription URL of the payment gateway.</p>
  <p>Edited: Also I found out now that you could generate cancel subscription using mid i.e membership id, <code>civicrm/contribute/unsubscribe?reset=1&amp;mid=123</code></p>
  <p>HTH</p>
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-02-07T01:37:59.180Z
Answers.Text: Even mid can be used instead crid
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-02-08T21:33:56.840Z
Answers.Text: Thanks is pretty conprehensive!
Answers.UserDisplayName: Marsh
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-02-07T01:30:22.097Z
Answers.LastActivityDate: 2022-02-07T01:37:35.537Z
Answers.LastEditDate: 2022-02-07T01:37:35.537Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>Scenario - scheduled reminders for auto-renew membership goes out</p>
  <p>It notifies folk that 'hey your membership will auto renew in xx days'</p>
  <p>but what if we want to include a link so they can cancel it?</p>
  <p>Can this be done? What would it look like? Would it require a special token to be able to send the right crid?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-07T00:18:40.583Z
Comments.Text: I think this just won't be possible due to issues if contact has multiple CRID therefore perhaps best to send them to their civi 'user dashboard'
Comments.UserDisplayName: petednz - fuzion
Tags: <tokens><auto-renew>
Title: What link/token would work in a Scheduled (renewal) Reminder that would allow a person with an existing recurring payment to click and cancel it
ThreadText: # What link/token would work in a Scheduled (renewal) Reminder that would allow a person with an existing recurring payment to click and cancel it
  
  (Asked by: username_0 on 2022-02-07)
  
  Scenario - scheduled reminders for auto-renew membership goes out
  
  It notifies folk that 'hey your membership will auto renew in xx days'
  
  but what if we want to include a link so they can cancel it?
  
  Can this be done? What would it look like? Would it require a special token to be able to send the right crid?
  
  **Tags:** tokens, auto-renew
  
  > **Comments:**
  > **username_0**: I think this just won't be possible due to issues if contact has multiple CRID therefore perhaps best to send them to their civi 'user dashboard'  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-02-07. Score: 3
  
  Technically it's possible to do using a token processor hook. Each membership is linked to contribution recur via civicrm\_membership.contribution\_recur\_id so if you are using Membership entity for sending reminders you could use membership id to fetch contribution recur id and build the cancel subscription URL.
  
  You could also use smarty to add logic inside the reminder message using the above logic if you don't want to go via hook implementation.
  
  Note: Not all payment processor allows to cancel the subscription from Civi, however, the common ones do. In case it doesn't you will need to exclude the cancel subscription URL or build the cancel subscription URL of the payment gateway.
  
  Edited: Also I found out now that you could generate cancel subscription using mid i.e membership id, `civicrm/contribute/unsubscribe?reset=1∣=123`
  
  HTH
  
  Pradeep
  
  > **Comments:**
  > **username_1**: Even mid can be used instead crid  
  > **username_2**: Thanks is pretty conprehensive!  
  
  ---
  
  