How to integrate the CardConnect payment with Node JS

This tutorial shows how we can integrate the CardConnect payment gateway within your nodeJs based projects. We gonna use axios npm module to make request to CardConnect APIs.

Here are simple steps to access the CardConnect APIs and make payments using CardConnect.Authorization

Step 1: Initialize the project with npm init command. It will create a package.json file in the project root folder.

Step 2: Install the dependencies of the project, as I mentioned above we gonna use <code>axios</code>, it’s a Promise based HTTP client. So let’s install it with below command.

Step 3: We gonna use two APIs, first one is to get payment auth token and the second one is to charge the customer. copy and paste below code in a .js file, ex: payment.js file and run the code.

Step 4: Run the above code with below command.

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments Protection Status
Would love your thoughts, please comment.x