search
Your Paytm for business app is working and will keep working beyond March 15th, 2024. Click to know more

Methods

init

init  method to be used to update the configuration. It'll return the promise object.

Note : init method is mandatory to be called.

  • Name: init

  • Input: Object

  • Return: Promise<Object>

<script>
    window.Paytm.CheckoutJS.init({}).then(function onSuccess() {
      console.log("merchant configuration updated successfully");
    }).catch(function onError(error){
        console.log("error while calling init method => ",error);
    });
</script>

invoke

invoke method is called when a user clicks Proceed to Pay. After executing this method, the payment page is shown to the user.

  • Name: invoke

  • Return: null

<script>
    window.Paytm.CheckoutJS.init({}).then(function onSuccess() {
        // after successfully updating configuration, invoke JS Checkout
      window.Paytm.CheckoutJS.invoke();
    }).catch(function onError(error){});
</script>