L

LunarPay Crypto Payments

Everything needed to accept crypto payments. Hosted payment pages, Webhook Integration, support for recurring payments with smart invoices, support for one-time charges and best in class security.

L

LunarPay Crypto Payments

Everything needed to accept crypto payments. Hosted payment pages, Webhook Integration, support for recurring payments with smart invoices, support for one-time charges and best in class security.

The problem LunarPay Crypto Payments solves

Online payments powered by crypto currency are essential in making crypto currency mainstream. However most of the successful SaaS companies rely on the business model of recurring payments which isn't currently possible. There are benefits to both the merchants using lunar pay and the customers paying with lunar pay.

Merchant benefits

  1. It is difficult to set up a gateway . With the presense of an API, a React Library, and hosted payment pages, SaaS companies can easily integrate lunar make their users experience seamless, in less than 10 lines of code.
  2. Recurring payments is extremely rare with existing crypto gateways, lunar pay supports this.
  3. Payments with credit cards cost merchants high credit card processing fees. Accepting payments with lunar pay means, they have to pay no processing fees.
  4. Content creators and open source developers can accept donations using their unique donation link.
  5. By accepting credit card payments, sellers are vulnerable to charge backs, which can be extremely hurtful as they incur losses. With crypto currency payments, they do not have to worry about chargebacks.

Users benefits

  1. The crypto payment gateways that support recurring payments require the money to be held with the payment processor. Lunar pay offers a solution such that the customer can hold their own money and the seller can accept recurring crypto payments.
  2. When users pay a vendor with their credit card, the payment gateway stores this information even if the payment is not recurring. This makes users extremely vulnerable as in case of a data leak, their finances will be at risk. With lunar pay, only their public wallet address is stored, which cannot be used to access funds.
  3. Oftentimes, users forget to cancel subscriptions and hence end up being charged automatically. With Lunar Pay smart invoices, they will never be charged, unless they want to make the transactions.

Challenges we ran into

All three of us are absolutely new to the web3 space and decided to learn the technology on the fly while developing the dApp. Since we were new, we encountered many challenges, but I am glad we were able to resolve most of them. Some of the main challenges were:

Limited Documentations
Since web3 and moralis are fairly new platforms, the documentation and online forum support was pretty limited, especially for react. We learnt along the way using a lot of trial and error as well as constant debugging.

Setting up CRON
When we were implementing our CRON based smart invoices, setting up cron was a massive challenge because we had to make sure it was setup reliably and would turn back on automatically. We also had to test every morning if the invoices were actually being sent. This took nearly a week of testing.

Signed Transactions Failed with Netlify and Heroku
We decided to host our web3 dApp on Netlify and Heroku. During testing, we realised that although the code was working on localhost. It was not working on netlify. Therefore we migrated to heroku. It did not work their either. The following error was present:

We think that the error could be because of mismatched libraries or their firewalls which prevented network traffic of the signed transaction.
We decided to switch to Google Cloud Platform and create a barebone Linux CentOS 8 virtual machine and deploy our application on it. The virtual machine gave us full control of the environment and the firewall settings. The application worked successfully on Google Cloud.

Problems with API and Library
While building the LunarPay react library and the API, we had to make sure that we made our code modular such that the same code can be used to power the API, the library and the dashboard itself. This was extremely challenging but we managed to do it by desiging our application modularly

Discussion