Member-only story
NodeJS / ReactJS: Payment Integration with PayUMoney
We had to build a Web app in NodeJS/Express + React/Redux + MongoDB. In the app, we planned to integrate multiple payment options like PayTM, PayUMoney, and CCAvenue. While we had no issues with PayTM integration (Their docs were clear), We really had really tough time with PayUMoney integration. Their documents weren't very clear and hence I thought let me make my first Medium post on it. Hope it helps :-)
BOLT CHECKOUT:
PayUMoney has a feature called BOLT Checkout, wherein, the users don't have to be redirected to a dedicated page and they can make payment using a Popup within the same page. The image below is a screenshot of it:
To integrate it, the following steps are required.
Step 1 : Add Meta Data and include Scripts
Step 2: Make the API call to Merchant/Developer Server and get the Hash value by passing the data
Step 3: With the hash value from response, pass it to Launch function of BOLT
Step 4: Handle the response and store the values. Done
Step 1: Add Meta Data and include Scripts
Add the following tags in head part of your html file. I am using React and hence the code examples will be in react: