Handling Mandate Signing via JavaScript on your payment page.

After you have retrieved your E-Mandate token, you need to add some JavaScript to your Web site page to handle the redirect.

Your JavaScript needs to include:

  • The appropriate references to the E-Mandate REST endpoints
  • A reference to the E-Mandate token
  • A Redirect function

If we assume that the E-Mandate token returned in the Prepare E-Mandate Token request was:


Then your Web site script would need to be similar to the following

<script> /*<![CDATA[*/




function redirect() { window.location = 'https://api.nuapay.com/emandate/web/show?token=07e43737-22d5-491e-9dd1-423e2270d190'; }; /*]]>*/


The redirect() method is then called to redirect your payer to the E-Mandate platform with the onclick event: