Card Not Present
the first step in collecting payments in a web application is to use the credit card collection form component to capture credit card information from the customer once the credit card information is captured, a nonce will be provided where you can exchange it for a token and process the payment further using the docid zv6lywcpenmiwygyg7uk setting up the credit card collection form to begin working with credit card collection form, you must insert the following scripts on your webpage's frontend \<script type="text/javascript" src= "https //cdn poynt net/collect js" async defer \>\</script> 2\ you can then instantiate the credit card collection component var collect = new tokenizejs("\<businessid>", "urn\ aid\ df5ae5f0 6360 4024 819f b7a17b92d5c7"); the business id is unique for each business that receives a merchant account, and is provided to you by moolah on boarding your merchant 3\ create an empty dom element for the collect component to mount the credit card form \<html> \<head>\</head> \<body> \<div id="card element"> \<! credit card form iframe will be inserted here > \</div> \<button>pay\</button> \</body> \</html> credit card collection methods once you have created the collect object, and prepared your dom to mount the form you can call the following method to mount the form in the div collect mount collect mount("card element", document, options); the mount method takes the following options const options = { iframe { width "500px", height "400px", border "1px", borderradius "4px", boxshadow "0 7px 14px rgba(50, 50, 93, 0 1), 0 3px 6px rgba(0, 0, 0, 0 08)" }, style { theme "default" // theme "customer", (alternative default theme) }, displaycomponents { firstname false, // toggle these to true if you wish to show the forms lastname false, emailaddress false, submitbutton false, showendingpage true // controls ending page, labels false }, fields { emailaddress customeremail, firstname firstname, lastname lastname, zipcode zipcode }, additionalfieldstovalidate \[] // fields to validate } retrieving a nonce once the credit card information is entered by the customer, you can retrieve a nonce that is used to process the payment further with the moolah payments api to collect a nonce use the following method collect getnonce collect getnonce({}); the getnonce method will either fire an error or nonce event to receive the nonce on success collect on("nonce", response => { console log('collect on get nonce', response data nonce); }) to handle an error on the retrieval of a nonce collect on("error", err => { console log("collect on error", err); }); that's it for the client side of your web application! once you have a nonce, you can turn your nonce into a token which is used for processing transactions using the docid zv6lywcpenmiwygyg7uk