OpenNode

Demo to preview the settings

Introduction

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.
Image without caption
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
Image without caption
​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
Image without caption
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!
Image without caption
Use this key in the plugin settings.
Image without caption
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

  1. Validate Webhook - This action validates the notification received from OpenNode Webhooks.
    1. 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

  1. Account Balance - Retrieves the current account balance.
    1. 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
      Returns:
      Please check the OpenNode documentation.
  1. List activity - Retrieves the list of activities.
    1. 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
      Returns:
      Please check the OpenNode documentation.
  1. Charge Info (data) - Retrieves the info about a charge.
    1. 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
      id
      The ID of the charge.
      string
      Returns:
      Please check the OpenNode documentation.
  1. List of Paid Charges - Retrieves a list of paid charges.
    1. 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
      Returns:
      Please check the OpenNode documentation.
  1. Withdrawal Info - Retrieves the info about a withdrawal.
    1. 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
      id
      The ID of the withdrawal.
      string
      Returns: Please check the OpenNode documentation.
  1. List of Withdrawals - Retrieves a list of withdrawals.
    1. 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
      Returns:
      Please check the OpenNode documentation.
  1. Refund Info - Retrieves the info about a refund.
    1. 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
      id
      The ID of the refund.
      string
      Returns:
      Please check the OpenNode documentation.
  1. List of Refunds - Retrieves a list of refunds.
    1. Title
      Description
      Type
      env
      This field specifies the OpenNode Environment. Use "dev-api" for the development environment and "api" for the live environment.
      string
      Returns:
      Please check the OpenNode documentation.
  1. Exchange Rates - Retrieves all exchange rates.
    1. 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
      Returns:
      Please check the OpenNode documentation.
  1. Supported Currencies - Retrieves a list of supported currencies.
    1. 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
      Returns:
      Please check the OpenNode documentation.

Plugin Action Calls

  1. Create Charge - It is used to create a charge.
    1. 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
      description
      Arbitrary description string that will be attached to the charge.
      string
      amount
      Amount intended to be collected. The default currency is in 'satoshis', specify 'currency' param for fiat amounts.
      string
      currency
      Three-letter ISO currency code, in uppercase. If specified will generate a charge for the equivalent amount of BTC at the current exchange rates.
      string
      customer_email
      Payers email for merchant's internal use.
      string
      customer_name
      Payers name for merchant's internal use.
      string
      order_id
      Order id for merchant's internal use.
      string
      callback_url
      Bubble API endpoint URL to receive webhooks for payment status updates.
      string
      Returns:
      Please check the OpenNode documentation.
  1. Charge Info (action) - Retrieves the info about a charge.
    1. 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
      id
      The ID of the charge.
      string
      Returns:
      Please check the OpenNode documentation.
  1. Initiate Withdrawals - It is used to initiate a withdrawal.
    1. 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.
      string
      Returns:
      Please check the OpenNode documentation.
  1. Create Refund - It is used to create a refund.
    1. 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
      checkout_id
      Underpaid charge ID.
      string
      address
      Bitcoin address to send the funds.
      string
      email
      The buyer email to get notified of the refund.
      string
      Returns:
      Please check the OpenNode documentation.

Workflow example

Display the info on paid charges

  1. On the page, it is placed a Repeating Group element.
Image without caption
  1. For “Type of content” is selected “List of Paid Charges body data (OpenNode)”.
Image without caption
  1. For “Data source” is selected “OpenNode - List of Paid Charges’ body”.
Image without caption
  1. 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.
Image without caption
Image without caption
The Bubble test mode is when your Bubble app URL contains “/version-test”.
Image without caption
The Bubble live mode is when your Bubble app URL doesn't contain “/version-test”.
Image without caption
  1. In the Repeating Group element, it is the Group element with “Current cell’s List of Paid Charges…”.
Image without caption
  1. This Group element has Text elements that contain “Paid Charge” information.
Image without caption
Image without caption
  1. The result on page:
Image without caption

Subscribe for OpenNode Webhooks notification.

  1. On the page, it is created a form for Withdrawal initiation.
Image without caption
  1. 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.
Image without caption
💡
The “callback_url” field is the Bubble API endpoint that is created in backend workflows.
Image without caption
Note! When the status of created withdrawal will be updated the notification will be sent to the indicated URL.
  1. In the backend workflows, it is created “webhook” API.
Image without caption
  1. The first action in “webhook” API endpoint is “Validate Webhook”.
Image without caption
  1. The following action is used with the condition, only when the Webhook is valid.
Image without caption

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.

Update 07.09.2021 - Version 1.5.0

  • Updated title.

Update 19.07.2021 - Version 1.4.0

  • Updated icon.

Update 09.02.2021 - Version 1.3.0

  • Updated icon.

Update 26.08.2019 - Version 1.2.0

  • Minor improvements.

Update 25.08.2019 - Version 1.1.0

  • Minor improvements.

Update 23.08.2019 - Version 1.0.0

  • Initial Release.