fbpx
Articles

Product Update: LNURL-Withdrawals2 min read

September 1, 2021 2 min read

author:

Product Update: LNURL-Withdrawals2 min read

Reading Time: 2 minutes

We’ve updated our API to make withdrawing Bitcoin using the Lightning Network (LN) even easier! Starting today, all developers will be able to generate LNURL-Withdrawals allowing for a seamless user experience on their platforms with the OpenNode API. 

What is new with the API?

Here’s the new functionality:

const opennode = require('opennode');
opennode.setCredentials('MY_API_KEY', 'live');

const withdrawal = {
  min_amt: 5000,
  max_amt: 5000,
  description: "Claim these 5000 sats",
  external_id: "my-external-uuid",
  callback_url: "https://example.com/webhook/opennode",
};

const lnUrlWithdrawal = await opennode.createLnUrlWithdrawal(withdrawal);

How does Lightning Network URL work?

Lightning Network URL allows LN-powered applications to send checkouts and invoices directly to LN wallets. Before LN URL, the wallet user had to copy and paste the LN address from an application into their wallet before completing the payment. Now, the copy-paste step is completely removed. Applications can simply generate the amount that needs to be paid on the fly and send it to the user’s wallet in one step. LN URL is an iterative step in improving overall the UI/UX of Lightning, and now it’s live on every OpenNode checkout!

Benefits of LNURL-Withdrawals 

As mentioned above, LN URL removes the process of having to copy and paste LN addresses, then generating an invoice and submitting. With LNURL, users can just scan a QR code or click a link to have those processes done automatically. The introduction of QR codes will make transacting on the Lightning Network much simpler and quicker for users by automating some of these extra steps. Additionally, it will help to bring in more users who may not have felt comfortable with all the extra steps that were previously required.

Are you a developer interested in implementing this with our API? Check out our developer portal for more information on LNURL-Withdrawals.


Adding the Lightning Network URL feature to our platform was another great feature suggested by one of our newest users. User feedback and product suggestions are some of the main drivers of innovation at OpenNode. We want to make the best Bitcoin payment processor for you and your business. 

If you have suggestions or comments about our product offerings, please reach out. You can email us at hello@opennode.com or reach out to us on Twitter @opennodeco. Keep those suggestions coming!