So, HubSpot doesn’t natively support server-side code like Node.js since it’s a client-side CMS platform. That being said, you’ve got a few options to make this work.
You’ll need to run that Node.js code on an external server (like AWS Lambda, Heroku, or your own server). Once the verification is done, you can send the response back to your HubSpot page using an API call.
If you’re using HubSpot CMS Enterprise, you can use their serverless functions feature. This lets you run backend code directly in HubSpot. Check out their serverless functions documentation.
Once you have your verification logic running on the external server, send the user_hash back to your HubSpot page using AJAX, and then embed it into the frontend.
For the next step, I need to edit the front end and back end on a specific page in my website. However, I have no clue how to edit the front (HTML) and back end (Node.js) functions on the specific page. Appreciate if you give me instructions.
In 2025, HubSpot pages don’t run raw Node.js; you either use a small external service or HubSpot’s serverless functions. Since you only need to HMAC the Stripe customer ID for Churnkey, the clean native path is a serverless function: create a project, add a serverless function that computes user_hash, deploy, then call that endpoint from your page/module and pass the result into the embedded script
If you decide to host this externally, Heroku isn’t a great fit anymore. The free and low-tier dynos tend to sleep, IP addresses rotate, and callbacks can silently fail exactly the kind of fragility you don’t want when verifying Stripe requests.
Even with paid dynos, you’re still left managing uptime, scaling, and monitoring yourself. By contrast, Stacksync removes that operational burden: it runs your integrations on stable infrastructure, handles auth rotation, retries, and event logging automatically, and guarantees real-time two-way sync between HubSpot and your source system. That way, your cancel flow verification stays reliable without you needing to babysit servers or rebuild plumbing when data scales.