OpenNode plugin offers a powerful REST API that supports the bitcoin lightning network and standard on-chain operations, with associated actions and events, allowing you to receive and send micro-transactions instantly.
β
Prerequisites: You must have an OpenNode platform account to interact with the OpenNode plugin. Create your development account at: https://dev.opennode.com
Integration
To integrate the OpenNode plugin, you must get the API key from your account. Open the account control panel, go to the "Developer" tab, and select the "Integrations" section.
After that, you will see the API keys section with the keys (if any).
β
Note! You will not be able to get the keys again after creation! Make sure that after creating the key, you have saved it!
To create a new key, click on the +Add key section
βInsert the key label and select the permissions for this key. We recommend that you use the "Withdrawals" type to get all features.β
Invoice
Read
Withdrawals
Create charge & fetch charge info
β
β
β
Fetch charges & withdrawals info
β
β
β
Initiate withdrawals
β
β
β
The field with IP Whitelist is optional
β
Leave it empty if you do not want to restrict the IP address of the server
Use an authenticator application to generate a 2FA token. And click the "Generate" button. You will see the generated key for your application. Save it!
Use this key in the plugin settings.
β
Note! If you want to use both keys, the key for testing and the key for real transactions then:
1. Add the API Key that was generated in OpenNode Live Environment in the first field.
2. Add the API Key that was generated in OpenNode Dev Environment in the second field.
Now you can use all plugin options!
Plugin actions
Validate Webhook - This action validates the notification received from OpenNode Webhooks.
Fields:
Title
Description
Type
Hashed order
This is a hash code sent by OpenNode with a notification. See more here.
string
Event id
This is the id of the notification. Every OpenNode Webhooks notification has a notification id. See more here.
string
Returns:
Title
Description
Type
is valid
The answer of notification validity.
yes/no
API Calls
Plugin Data Calls
Account Balance - Retrieves the current account balance.
Fields:
Title
Description
Type
env
This field specifies the OpenNode Environment. Use "dev-api" for the development environment and "api" for the live environment.
Initiate Withdrawals - It is used to initiate a withdrawal.
Fields:
Title
Description
Type
env
This field specifies the OpenNode Environment. Use "dev-api" for the development environment and "api" for the live environment.
string
type
Determines the type of the withdrawal. Options: "chain" (on-chain), "ln" (Lightning Network), "wire" (bank transfer).
string
amount
Amount intended to be withdrawn from the account. Required for type "chain" and "wire". Amount in satoshis when type is "chain" and "ln". Amount in user's fiat currency when type is "wire".
string
address
Address that funds will be withdrawn to. Required for type "chain" and "ln" withdrawals. Type "chain": On-chain address, Type: "ln": Lightning Payment request.
string
callback_url
Bubble API endpoint URL to receive webhooks for payment status updates.
On the page, it is placed a Repeating Group element.
For βType of contentβ is selected βList of Paid Charges body data (OpenNode)β.
For βData sourceβ is selected βOpenNode - List of Paid Chargesβ bodyβ.
For the βenvβ field of the βOpenNode - List of Paid Chargesβ data call is a Dynamic value because it helps to use the βOpenNode Dev Keyβ when the Bubble app is in test mode, and the βOpenNode Live Keyβ when the Bubble app is in live mode.
β
The Bubble test mode is when your Bubble app URL contains β/version-testβ.
The Bubble live mode is when your Bubble app URL doesn't contain β/version-testβ.
In the Repeating Group element, it is the Group element with βCurrent cellβs List of Paid Chargesβ¦β.
This Group element has Text elements that contain βPaid Chargeβ information.
The result on page:
Subscribe for OpenNode Webhooks notification.
On the page, it is created a form for Withdrawal initiation.
In the workflow, is created an event When the Button Initiate Withdrawal is clicked with the βInitiate Withdrawalsβ action. In action, it is used the values from the form for Withdrawal initiation.
π‘
The βcallback_urlβ field is the Bubble API endpoint that is created in backend workflows.
β
Note! When the status of created withdrawal will be updated the notification will be sent to the indicated URL.
In the backend workflows, it is created βwebhookβ API.
The first action in βwebhookβ API endpoint is βValidate Webhookβ.
The following action is used with the condition, only when the Webhook is valid.
Changelogs
Update 31.03.2023 - Version 1.11.0
Updated documentation.
Update 29.03.2023 - Version 1.10.0
Added "Validate Webhook" action and removed deprecated element.
Update 23.02.2023 - Version 1.9.0
Deleted the icons.
Update 22.02.2023 - Version 1.8.0
Updated the description.
Update 31.01.2023 - Version 1.7.0
Updated service link.
Update 08.09.2021 - Version 1.6.0
Updated a lot of API calls and added documentation.