CoinPayments.net Wallet Adapter extension
Allows your Bitcoin and Altcoin Wallets WordPress plugin to interface with your CoinPayments wallets.

features

  • Admins can
    • Connect to any number of CoinPayments.net accounts
      • Each CoinPayments account can act as a wallet for multiple currencies
      • All currencies enabled on the account, are auto-created on the plugin if they don’t exist
        • Currencies created in this way receive the CoinPayments tag on the wallets_currency_tags taxonomy, so they can be distinguished easily
        • Image logos are retrieved and assigned automatically via cron jobs
        • The following details are updated: Coin name, ticker symbol, wallet, number of decimals, display format, minimum withdrawal amount, blockchain fee for withdrawals, CoinGecko ID for retrieving exchange rates later, and block explorer URI patterns.
        • Currencies containing “Bitstamp” or “Bluezelle” in their name are skipped
        • The correct extra field name is reported for the following currencies: APL, BCN, ETN, LOKI, XMR, XRP, BNB, SBD, STEEM, XEM, WAVES
    • View error messages in case connection is not successful
      • Receive the error messages via email
    • View basic info about the account if it’s connected
    • Set the adapter to communicate with hidden CP site over Tor
    • Control automatic gas management parameters
    • Control gas price and limit for deposits
      • Can be based on current network conditions
      • For the Ethereum blockchain
      • For the Binance Smart Chain
      • Control minumum deposit amount per token on one address, before gas management occurs on address
    • Edit API keys for required APIs
      • etherscan.io
      • bscscan.io
  • Users can
    • Create new deposit addresses
  • Cron jobs can
    • Process withdrawals
      • Batch processing for multiple withdrawals of the same currency
      • Withdrawal transactions first get a temporary CPID, then are assigned the correct TXID later (when platform actually executes)
      • If actual withdrawal fee paid is larger than the withdrawal fee set by an admin in the currency settings, then the currency setting is updated to reflect the real fee. This ensures that the site does not continue to lose money on withdrawal fees.
  • CoinPayments.net platform can
    • Report incoming deposits to the plugin directly via IPN messages
      • This requires that the hosting provider has enabled this in the site’s firewall
      • IPN messages are checked for authenticity via SHA-512 HMAC

installation

  • If you are migrating from wallets 5.x, see Migrating from 5.x.
  • If you are performing a new installation, continue reading here:

Install the plugin on a new installation

TIP: You should first install and configure the parent plugin, Bitcoin and Altcoin Wallets.

Creating an account

1 Create an account on CoinPayments.net.

TIP: While not strictly necessary, it is HIGHLY RECOMMENDED that you use a separate account for each site you setup.

3 You will also need to go through the Verification process, because the coin adapter requires API access.

4 It is HIGHLY RECOMMENDED that you set up two-factor authentication. Go to: AccountAccount Settings, then click on the Login & Security tab to setup 2 Factor Authentication.

TIP: If you are not already using Google Authenticator on your phone or tablet, install it from Google Play.

5 Go to the Coin Settings screen, and select a few coins (check the box in the Enabled column), then click on Update Coin Preferences.

TIP: Do not enable all the coins at once, if you don’t need them. For now, enable the Litecoin testnet coin. You can test connectivity with the wallet and deposits on the Litecoin testnet, without transacting any actual coins of value. You can later enable more coins as needed.

6 Go to AccountAPI keys.

7 Click the Generate new key… button.

8 Next to your new API key, click the Edit Permissions button.

9 Set the following permissions: get_callback_address, rates, balances, create_withdrawal, Allow auto_confirm = 1 in create_withdrawal, get_withdrawal_info.

10 Click the Update Permissions button.

Installing the wallet adapter

11 Log in to dashed-slug.net using your account.

TIP: You do not need to pay for a premium account to download wallet adapters. They are available with a free subscription to the site.)

12 Go to https://www.dashed-slug.net/bitcoin-altcoin-wallets-wordpress-plugin/coinpayments-adapter-extension

13 Download the latest version of this wallet adapter extension.

14 Login to your WordPress installation as an admin.

15 Go to Plugins.

16 Click on Add New.

17 Click on Upload Plugin.

18 Click on Choose file.

19 Select the zip file that you downloaded.

20 Click on Activate plugin.

Connecting your account as a new wallet

We will now create a Wallet that will represent your CoinPayments.net account.

21 Go to Wallets.

22 Click Add New.

23 Give a title to your new Wallet. For example, let’s call it “CoinPayments account”.

24 At the Wallet Adapter dropdown, pick DSWallets\CoinPayments_Adapter.

25 Do not check Enabled for the wallet yet. Hit Update to save your new Wallet.

26 Enter the following details from your account:

  • Public key — 64 hex digits. Should match the public part of your API key at: AccountAPI keys.
  • Private key — 64 hex digits. Should match the private part of your API key at: AccountAPI keys.
  • Merchant ID — 32 hex digits. Should match the value given at: Account SettingsBasic SettingsYour Merchant ID.
  • IPN Secret — This should match the value entered at: Account SettingsMerchant SettingsIPN Secret.

27 Click the Publish button to save your credentials.

If connection is successful, the wallet screen will show the following information about your CoinPayments.net account:

  • uername (sic)
  • username
  • merchant_id
  • email
  • public_name
  • time_joined
  • kyc_status
  • kyc_volume_limit
  • kyc_volume_used
  • swych_tos_accepted

28 Check the Wallet Enabled box and hit Publish again.

29 The wallet adapter contains a cron job task that will read the list ofcurrencies that you enabled previously on your account. If any currencies are not created yet on your WordPress system, it will create them. This happens asynchronously and may take several minutes.

If your site is not getting any traffic or if the cron jobs are not running on your system, you must fix the cron jobs.

After a few minutes, all the currencies enabled in your CoinPayments account should have been created. They are assigned the CoinPayments tag in the wallets_currencies_tags custom taxonomy, so you can find them easily by tag:

30 Go to CurrenciesCurrency tags and click the number next to the CoinPayments tag. The CoinPayments currencies will be listed.

TIP: The first CoinPayments wallet will be auto-assigned to all the Currencies that you have enabled in that account. Change these assignments if you are using multiple CoinPayments accounts for different Currencies..

31 Review and edit the created currencies as needed. Most of the information should be correct, including the coin logos. For each Currency, check the following details at a minimum:

  • Title (Name)
  • Ticker symbol
  • Decimals
  • CoinGecko ID

The remaining details can be set later.

TIP: As the wallet adapter’s cron job runs, images for your currencies are being downloaded, and added to your site’s media gallery. These images are saved under wp-content/uploads/wallets-cp/. You can set the feature image of a Currency to one of these gallery entries. This will set the icon that will displayed next to the Currency in the frontend UIs.

32 As a check, go back to CurrenciesCurrency tags. Click on the number shown next to the CoinPayments tag.

See if the Hot Wallet Balance is being displayed correctly for all the listed currencies.

At this point, this balance should be the same as the balance shown on CoinPayments.net for each currency. If this is a new/empty account, then all the hot wallet balances should read 0.00000000.

33 You can now enable more currencies in your CoinPayments account (Coin Settings screen). They will be added to the plugin after a few minutes.

34 If you have enabled any ERC-20 tokens, see Configuring ERC-20 gas management below:

Migrate from Bitcoin and Altcoin Wallets 5.x

We are going to re-connect to an existing CoinPayments account that was previously used with prior versions of the plugin. The wallet adapter must be defined. Since one CoinPayments account holds wallets for multiple Currencies, multiple Currencies will be assigned to our new Wallet (semi-)automatically!

1 Update Bitcoin and Altcoin Wallets: CoinPayments Adapter to its latest version 2.0.0 or later, and activate it!

2 Go to Wallets.

3 Click Add New. We will create a Wallet that will represent a CoinPayments.net account.

4 Give a title to your new Wallet. Let’s call it “CoinPayments account”.

5 At the Wallet Adapter dropdown, pick DSWallets\CoinPayments_Adapter.

6 Do not check Enabled for the wallet yet. Hit Update to save your new Wallet.

7 Enter the following details from your account:

Public key — 64 hex digits

Private key — 64 hex digits

Merchant ID — 32 hex digits. Should match the value given at: “Account Settings” → “Basic Settings”

IPN Secret — This should match the value entered at: “Account Settings” → “Merchant Settings”

8 Hit Publish.

If connection is successful, the wallet screen will show the following information about your CoinPayments.net account:

  • uername (sic)
  • username
  • merchant_id
  • email
  • public_name
  • time_joined
  • kyc_status
  • kyc_volume_limit
  • kyc_volume_used
  • swych_tos_accepted

9 Check the Wallet Enabled box and hit Publish again.

TIP: The migration task runs as a cron task. If your cron jobs are not running, fix that issue now. (See Troubleshooting.)

10 As the cron job runs, it will create any currencies that are enabled in your account. If it encounters existing currencies, based on their ticker symbol, it will attach them to this wallet if they are not yet assigned to a wallet.

11 After a few minutes all the currencies enabled in your CoinPayments account should have been created. They are assigned the CoinPayments tag in the wallets_currencies_tags custom taxonomy, so you can find them easily by tag:

Go to CurrenciesCurrency tags and click the number next to the CoinPayments tag. The CoinPayments currencies will be listed.

TIP: The first CoinPayments wallet will be auto-assigned to all the Currencies that you have enabled in that account. Change these assignments if you are using multiple CoinPayments accounts for different Currencies..

12 Edit any currencies as needed. Most information should be correct. For each Currency, check the following details at a minimum:

  • Title (Name)
  • Ticker symbol
  • Decimals
  • CoinGecko ID

The remaining details can be set later.

TIP: As the wallet adapter’s cron job runs, images for your currencies are being downloaded, and added to your site’s media gallery. These images are saved under wp-content/uploads/wallets-cp/. You can set the feature image of a Currency to one of these gallery entries. This will set the icon that will displayed next to the Currency in the frontend UIs.

13 Go back to step 11 for each Currency that you want enabled on your CoinPayments account.

14 As a check, go back to CurrenciesCurrency tags and click the number next to the CoinPayments tag.

See if the Hot Wallet Balance is being displayed correctly for all CoinPayments currencies. At this point, this balance should be the same as the balance shown on CoinPayments.net for each currency.

15 If you have enabled any ERC-20 or BEP20 tokens, see Configuring gas management below:

Configuring gas management {#gas}

Blockchains such as Ethereum and Binance Smart Chain allow Tokens, i.e. currencies that are not the primary currency of the blockchain, but instead are backed by smart contracts on that blockchain.

Examples of such token technologies are: ERC-20, TRC-20, BEP-20, BEP-2, Ripple, Waves tokens, etc.

When these tokens are deposited to a CoinPayments deposit address, that address is actually an account in Ethereum parlance.

Usually the balance of the primary cryptocurrency (e.g. Ethereum, Binance Coin, etc) on that account/address will be 0. Therefore these tokens are now non-transferrable, which means they cannot be withdrawn.

The solution is for you to deposit some of the primary cryptocurrency on your hot wallet. For ERC-20 tokens, Ethereum will be required, for Binance Smart Chain tokens (BEP-20), Binance coin on BSC (BNB.BSC) will be required, etc.

For example, to deposit Ethereum, you can use your personal hot wallet deposit address for ETH at:

  • https://www.coinpayments.net/index.php?cmd=acct_balances&action=deposit&coin=ETH

while the personal hot wallet deposit address for BNB on the Binance Smart Chain is:

  • https://www.coinpayments.net/index.php?cmd=acct_balances&action=deposit&coin=BNB.BSC

DO NOT confuse it with the deposit address for BNB on the Binance Beacon Chain, which is:

  • https://www.coinpayments.net/index.php?cmd=acct_balances&action=deposit&coin=BNB

The wallet adapter includes a cron task that monitors token deposit addresses. If it detects an address with a token deposit, but not sufficient gas, it will estimate the gas to be transferred, and will transfer the required coin to that address, enough to pay for gas for one token transfer from that address. The token can now be withdrawn.

TIP: You must estimate what this gas costs to you, and pass the cost to the user via deposit fees or withdrawal fees.

16 Go to SettingsBitcoin and Altcoin WalletsCoinPayments. Follow the onscreen instructions and fill in the required settings.

Migrate from Bitcoin and Altcoin Wallets 5.x {#migrating}

We are going to re-connect to an existing CoinPayments account that was previously used with prior versions of the plugin. The wallet adapter must be defined. Since one CoinPayments account holds wallets for multiple Currencies, multiple Currencies will be assigned to our new Wallet (semi-)automatically!

1 Update Bitcoin and Altcoin Wallets: CoinPayments Adapter to its latest version 2.0.0 or later, and activate it!

2 Go to Wallets.

3 Click Add New. We will create a Wallet that will represent a CoinPayments.net account.

4 Give a title to your new Wallet. Let’s call it “CoinPayments account”.

5 At the Wallet Adapter dropdown, pick DSWallets\CoinPayments_Adapter.

6 Do not check Enabled for the wallet yet. Hit Update to save your new Wallet.

7 Enter the following details from your account:

Public key — 64 hex digits

Private key — 64 hex digits

Merchant ID — 32 hex digits. Should match the value given at: “Account Settings” → “Basic Settings”

IPN Secret — This should match the value entered at: “Account Settings” → “Merchant Settings”

8 Hit Publish.

If connection is successful, the wallet screen will show the following information about your CoinPayments.net account:

  • uername (sic)
  • username
  • merchant_id
  • email
  • public_name
  • time_joined
  • kyc_status
  • kyc_volume_limit
  • kyc_volume_used
  • swych_tos_accepted

9 Check the Wallet Enabled box and hit Publish again.

TIP: The migration task runs as a cron task. If your cron jobs are not running, fix that issue now. (See Troubleshooting.)

10 As the cron job runs, it will create any currencies that are enabled in your account. If it encounters existing currencies, based on their ticker symbol, it will attach them to this wallet if they are not yet assigned to a wallet.

11 After a few minutes all the currencies enabled in your CoinPayments account should have been created. They are assigned the CoinPayments tag in the wallets_currencies_tags custom taxonomy, so you can find them easily by tag:

Go to CurrenciesCurrency tags and click the number next to the CoinPayments tag. The CoinPayments currencies will be listed.

TIP: The first CoinPayments wallet will be auto-assigned to all the Currencies that you have enabled in that account. Change these assignments if you are using multiple CoinPayments accounts for different Currencies..

12 Edit any currencies as needed. Most information should be correct. For each Currency, check the following details at a minimum:

  • Title (Name)
  • Ticker symbol
  • Decimals
  • CoinGecko ID

The remaining details can be set later.

TIP: As the wallet adapter’s cron job runs, images for your currencies are being downloaded, and added to your site’s media gallery. These images are saved under wp-content/uploads/wallets-cp/. You can set the feature image of a Currency to one of these gallery entries. This will set the icon that will displayed next to the Currency in the frontend UIs.

13 Go back to step 11 for each Currency that you want enabled on your CoinPayments account.

14 As a check, go back to CurrenciesCurrency tags and click the number next to the CoinPayments tag.

See if the Hot Wallet Balance is being displayed correctly for all CoinPayments currencies. At this point, this balance should be the same as the balance shown on CoinPayments.net for each currency.

15 If you have enabled any ERC-20 or BEP20 tokens, see Configuring gas management below:

Configuring gas management {#gas}

Blockchains such as Ethereum and Binance Smart Chain allow Tokens, i.e. currencies that are not the primary currency of the blockchain, but instead are backed by smart contracts on that blockchain.

Examples of such token technologies are: ERC-20, TRC-20, BEP-20, BEP-2, Ripple, Waves tokens, etc.

When these tokens are deposited to a CoinPayments deposit address, that address is actually an account in Ethereum parlance.

Usually the balance of the primary cryptocurrency (e.g. Ethereum, Binance Coin, etc) on that account/address will be 0. Therefore these tokens are now non-transferrable, which means they cannot be withdrawn.

The solution is for you to deposit some of the primary cryptocurrency on your hot wallet. For ERC-20 tokens, Ethereum will be required, for Binance Smart Chain tokens (BEP-20), Binance coin on BSC (BNB.BSC) will be required, etc.

For example, to deposit Ethereum, you can use your personal hot wallet deposit address for ETH at:

  • https://www.coinpayments.net/index.php?cmd=acct_balances&action=deposit&coin=ETH

while the personal hot wallet deposit address for BNB on the Binance Smart Chain is:

  • https://www.coinpayments.net/index.php?cmd=acct_balances&action=deposit&coin=BNB.BSC

DO NOT confuse it with the deposit address for BNB on the Binance Beacon Chain, which is:

  • https://www.coinpayments.net/index.php?cmd=acct_balances&action=deposit&coin=BNB

The wallet adapter includes a cron task that monitors token deposit addresses. If it detects an address with a token deposit, but not sufficient gas, it will estimate the gas to be transferred, and will transfer the required coin to that address, enough to pay for gas for one token transfer from that address. The token can now be withdrawn.

TIP: You must estimate what this gas costs to you, and pass the cost to the user via deposit fees or withdrawal fees.

16 Go to SettingsBitcoin and Altcoin WalletsCoinPayments. Follow the onscreen instructions and fill in the required settings.

downloads

This is a free plugin extension available to all subscribers.

  • If you are running Bitcoin and Altcoin Wallets version 6.0.0 or later, use at least version 2.0.0 of this extension.
  • If you are running a Bitcoin and Altcoin Wallets version before 6.0.0, choose a version of this extension up to 1.2.1.

Subscribe for free and get access to all the wallet adapters.

documentation

As of Bitcoin and Altcoin Wallets version 6.0.0, the documentation can be accessed from the WordPress admin screens. Look for Wallets Admin Docs in the Admin menu.

Note that the documentation is only shown to administrators (users with the manage_wallets capability).

Previous versions of the plugin and its extensions had documentation in the form of an accompanying PDF file. This has now been replaced with markdown files placed in the source code directories of each component.

support

Please use the appropriate support forum:

You are welcome to send in any problems, questions, suggestions, thoughts, etc.

For all other communication, such as questions and issues regarding membership, you can email me.

CoinPayments.net Wallet Adapter extension

Updated on 2022-09-07T13:29:44+00:00, by alexg.