After the widget.js file has loaded, access is available to the functions of the cnp_Api object within the cnp_Options onReady function.
<script>
var cnp_Options = {
//initialization
autoStart: false, // Render payment forms on DOM ready.
onReady: function(){ // Triggers when the Api is available.
// Available api methods
cnp_Api.start(); // Triggers the rendering of the payment form if not rendered automatically or when disabled via cnp_Options.autoStart: false.
},
}
</script>
<script async src="></script>
<!-- change {token} to be your token -->