We’re using Softr for our SaaS subscriber portal, with the Stripe integration so our users can update their subscriptions in Stripe portal.
We also use Churnkey.co in our service to help recover lapsed renewal payments.
I want to integrate Churnkey’s unsubscribe flows into my Softr portal, so that my users will see a dedicated ‘Cancel’ button, that will launch the Churnkey functionality.
It wants a server-side auth hash to be generated, then it wants that auth hash plus the current user subscription ID to be passed to Churnkey on the button click event.
I took a look at the documentation you linked. In order to generate the auth token, you will need to write some code that passes your API key to a cryptographic function. That means that the code must not run as JavaScript in the customer’s browser, as that would expose your API key to the world.
Unfortunately Softr does not provide a way for you to run this code on their server. If I were trying to generate this auth token, I would use something like Make, I would create a webhook that I could call from the Softr page, and the implementation of the webhook would run some JavaScript (node.js) to generate the auth token. I have never actually tried running JS in a Make scenario, but from the Make documentation it looks like it is supported.
Hi David - I’m Rob, the CTO at Churnkey - thanks for exploring our docs and providing a path for implementing our cancel flow through Softr.
If you’re up for it, I’d be happy to work with you on a direct Softr-Churnkey integration so everyone with membership accounts could get instant access to Churnkey. We’ve done similar integrations with other platforms who handle billing on behalf of their users.
@foxyloxy to add what David suggested, also if you have your data in Airtable then airtable automation could also be used to generate HMAC token and then returned back to UI…
We are working on an email based cancel flow - so instead of needing to generate the HMAC token yourself, the cancel flow would ask the user for their email and Churnkey would automatically send them a verification code for authentication.
Practically speaking, this means that as long as you use Stripe and can add a JS snippet to connect a “Cancel” button to triggering the Churnkey script, you’ll be good to go.
@rob@artur Our users are already signed in / verified in our Softr portal via an email validation code, so we would not want to use a method that requires an additional Churnkey email & code.
I think that will mean we need to use the HMAC approach to avoid a double-validation scenario for our users?