Giving custom capability via a link

Hi! I’ve been using s2member for years and use it for free and paid member levels as well as for managing content access via custom capabilities.

I’m currently developing a process that requires a customer to be given a custom capability because they completed a process - ideally I’d like them to be able to click a link and:

  1. Get a ccap added to their user account
  2. Get redirected to the next stage in the process

Could anyone give me a steer on how I might do this as I don’t see anything in the KB that seems to relate to giving customers capabilities for free when they click something. A button that gave a custom capability would be great,

Thanks in advance for suggestions!
Rich