Introduction
OpenNode plugin offers a powerful REST API that supports 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.
βNow you can use all plugins options!
Plugin content
Data calls
- Account balance - The request to get the account balance. (docs) Fields: env - The environment. Use "dev-api" for the development version and "api" for the live version
- Charge info - The request to get the charge info. (docs) Fields: env - The environment. Use "dev-api" for the development version and "api" for the live version id - ID of the Charge
- List of Paid Charges - The request to fetch the list of paid charges (docs) Fields: env - The environment. Use "dev-api" for the development version and "api" for thee live version
- List of Withdrawals - The request to fetch the list of withdrawals. (docs) Fields: env - The environment. Use "dev-api" for the development version and "api" for the live version
- Withdrawal Info - Request to receive a withdrawal of funds with a specific id. (docs) Fields: env - The environment. Use "dev-api" for the development version and "api" for the live version id - ID of the specific Withdrawal
- List of Refunds - The request to fetch the list of refunds (docs) Fields: env - The environment. Use "dev-api" for the development version and "api" for thhe live version
- Refund Info - Request to receive a refund with a specific id. (docs) Fields: env - The environment. Use "dev-api" for the development version and "api" for the live version id - ID of the specific Refund
- Exchange Rates - The request to receive the list of exchange rates (docs) Fields: env - The environment. Use "dev-api" for the development version and "api" for the live version
- Supported Currencies - The request to receive the list of supported currencies (docs)
Actions
Fields:
env - The environment. Use "dev-api" for the development version and "api" for the live version
description - Charge's description
amount - Charge's price in satoshis, unless currency parameter is used.
currency - Charge's currency
customer_email - Customer's email
customer_name - Customer's name
order_id - Order ID
callback_url - URL to receive webhooks
Fields:
env - The environment. Use "dev-api" for the development version and "api" for the live version
id - ID of the Charge
Fields:
env - The environment. Use "dev-api" for development version and "api" for live version
type - Types: "chain" (on-chain), "ln" (Lightning Network), "wire" (bank transfer)
amount - Amount in satoshis for types "chain" and "ln" - Amount in user's fiat currency when type ="wire". Required for type "chain" and "wire"
address - Type "chain": Bitcoin address, Type: "ln": Lightning Payment request. Not necessary for type "wire"
callback_url - URL to receive webhooks
Fields:
env - The environment. Use "dev-api" for the development version and "api" for the live version
checkout_id - Underpaid charge ID
address - Bitcoin address to send the funds
email - Buyer email to get notified of the refund
Demo to preview the settings
ββ