Enabling reCaptcha for Helcim.js

Protect against card testing and secure your Helcim.js transactions through your website using reCaptcha.

reCaptcha is intended to protect websites from fraud and abuse without creating friction for the user interacting with the website. This is recommended as a security measure to protect Helcim merchants using our API products and services to process transactions to, as websites without reCaptcha are often targeted in order to complete card testing.

Enabling reCaptcha for Helcim.js is a quick and simple process and will ensure that transactions below your risk threshold are not processed through our API.

How does reCaptcha work for Helcim.js?

The script tag to trigger reCaptcha is copied onto the page of your website where Helcim.js is implemented. Once the reCaptcha check is triggered through the helcimProcess action on your website, the score is collected then passed to Helcim.js via a hidden HTML input field. Helcim.js will compare that score to the threshold set in the Helcim.js configuration. If it passes, it will process the transaction. If it fails, it will decline instead.

How do I enable reCaptcha for Helcim.js?

First you'll want to toggle reCaptcha on for your Helcim.js.

  • Log in to your Helcim account and navigate to All Tools and Integrations
  • Select the Helcim.js configuration option in the left hand sub-menu and then select your Helcim.js configuration that you have implemented on your website
  • Under Security Settings, toggle on the Require Captcha setting and set your Captcha Score Threshold


We recommend 0.50 as a good starting place for your Captcha Score Threshold. This can always be amended if you find too many legitimate customers are being flagged, or not enough bots are being caught.

Now that reCaptcha is enabled, you need to copy the appropriate script and input elements into your websites HTML on the page where Helcim.js is implemented.

  • Select the "Code Generator" option from the left hand sub-menu
  • Click the Generate Code button in the top right corner
  • This will generate a template of HTML code that can be copied into your integration, however if you already have Helcim.js working and just want to enabled reCaptcha, then you only need to copy the script element with the google.com src attribute, and the hidden input element with the id g-captcha-response.
  • The script tags generated for helcim.js configuration will be unique and should be copied into the header element of your website
  <script type='text/javascript'src="https://www.google.com/recaptcha/api.js?render=6LdixK0UAAAAABmBXVo_jyFJSkQ5Doj9kloLyxGG"></script>

    grecaptcha.ready(function() {
      grecaptcha.execute('6LdixK0UAAAAABmBXVo_jyFJSkQ5Doj9kloLyxGG', {action: 'helcimJSCheckout'})
      .then(function(token) {
        document.getElementById('g-recaptcha-response').value = token;
  • The input element should be copied into the form element on your page with the helcimForm id.
	<input type="hidden" id="g-recaptcha-response" value="">