# How to integrate B2BINPAY (non-PSS)

Follow the instructions below to configure a connection and set up deposit and withdrawal methods through [B2BINPAY](https://b2binpay.com/) in the B2CORE Back Office.

This instruction describes the **non-PSS** B2BINPAY integration that includes support for the **Travel Rule**.

## B2BINPAY integration with Notabene

B2BINPAY is integrated with **Notabene** to ensure compliance with the **Travel Rule**, which requires collecting client data for crypto transactions, including deposits and withdrawals. **Notabene** evaluates incoming client data for compliance and issues directives to either block or approve crypto transactions.

When setting up deposit and withdrawal methods through B2BINPAY in the B2CORE Back Office, you can select whether to collect and transmit client data to B2BINPAY for further forwarding to **Notabene** or disable data collection using the **Collect personal info option** described below.

{% hint style="info" %}
Before proceeding with the instructions, you must have signed up for B2BINPAY and have an active wallet.
{% endhint %}

## Configure connections to B2BINPAY

The non-PSS B2BINPAY integration allows you to use a single connection to configure both deposit and withdrawal methods.

To configure a connection to B2BINPAY:

{% stepper %}
{% step %}
In the B2CORE Back Office, navigate to **System** > **External connections**.
{% endstep %}

{% step %}
Click **+Create** in the upper-right page corner.
{% endstep %}

{% step %}
On the **Create connection** page, fill in the following fields:

* In the **Name** field, enter a name for the connection. The name must be unique and may only contain Latin letters, numbers, dashes, and underscores (for example, `B2BINPAY`).
* In the **Caption** field, enter a caption that will be applied to the connection in the Back Office.
* In the **Provider** dropdown, select **B2BINPAY**.
  {% endstep %}

{% step %}
Click **Save** to create the connection.

The B2BINPAY connection will appear in the list of external connections.
{% endstep %}

{% step %}
Click **Edit** to open the connection details and fill in the following fields:

* In **Service location** field, enter the URL of the B2BINPAY API.
* In the **Login** and **Password** fields, enter your API credentials generated in B2BINPAY.

For more details, refer to [How to access the API](https://docs.b2binpay.com/how-tos/manage-your-profile-and-system/how-to-access-api) in the B2BINPAY documentation.
{% endstep %}

{% step %}
Check the connection status.

If the connection is inactive (**No** is displayed in the **Enabled** field), enable it by setting the **Enabled** dropdown to **Yes**.
{% endstep %}

{% step %}
Click **Save** to apply the changes.
{% endstep %}
{% endstepper %}

Once the connection is configured, you can use it to create and set up deposit and withdrawal methods via B2BINPAY.

## Add a deposit method through B2BINPAY

To add and set up a deposit method through B2BINPAY:

{% stepper %}
{% step %}
In the B2CORE Back Office, navigate to **System** > **Deposit system** > **Deposit methods**.
{% endstep %}

{% step %}
Click **+Create** in the upper-right page corner.
{% endstep %}

{% step %}
On the **Create a deposit method** page, fill in the following fields:

* In the **Name** field, enter a name for the method. The name must be unique and may only contain Latin letters, numbers, dashes, and underscores (for example, `B2BINPAY_Deposits`).
* In the **Caption** field, enter a caption for the method. This caption will be assigned to the method in the Back Office and will be visible to clients in the B2CORE UI.
* In the **Provider** dropdown, select **B2BINPAY**.
* In the displayed **Currency** dropdown, select a currency for the method. After creating the method, you can add multiple currencies to it on the **TR Currencies** tab.
* In the **Connection** dropdown, select the previously configured [B2BINPAY connection](#configure-connections-to-b2binpay).
  {% endstep %}

{% step %}
Click **Save** to create the method.

The B2BINPAY method will appear in the list of methods.
{% endstep %}

{% step %}
Click **Edit** to open the method details and fill in the following fields:

* On the **Settings** tab, use the **Group** dropdown to select one or more groups where the method should be included.
* In the **Icon** field, specify `paymethod-b2binpay` to display the [predefined icon](https://docs.b2core.b2broker.com/integrations/payment-systems) for the method in the B2CORE UI. To use a custom icon, specify the URL of the image to be displayed.
* In the **Rates provider** dropdown, select B2BINPAY as the preferred rate provider for processing deposits with conversions. To do this, B2BINPAY must first be added as an exchange rate provider under **Currencies** > **Rates** (for details, refer to [How to configure currency exchange rates](https://docs.b2core.b2broker.com/how-to-articles/manage-currencies/how-to-configure-currency-exchange-rates)).
  {% endstep %}

{% step %}
In the **Provider settings** section, configure the following B2BINPAY-specific settings:

* In the **Wallet ID** dropdown, select your B2BINPAY wallet that will be used for processing transactions.
* In the **Payment page** dropdown, select **Local**.
* The **Local URL** field displays the payment page URL, such as:

  `https://{your-Front-Office-URL}/`\
  `conversion/payment/qrcode/{address}/{currency}/{message}`
* In the **Client type** dropdown, select **Enterprise** or **Merchant**, depending on your wallet type.
* In the **Collect personal info** dropdown, select:
  * **No** — to disable the collection of client personal data.
  * **Yes** — to enable the collection of client personal data, which is sent to B2BINPAY and then forwarded to **Notabene** for verifying crypto transactions.
    {% endstep %}

{% step %}
On the **TR Currencies** tab, check the added currency and add more if needed. The deposit method will be available for funding client wallets in B2CORE, which are denominated in the currencies added on this tab.
{% endstep %}

{% step %}
On the **PS Currencies** tab, add the currencies in which deposits can be processed. These are the currencies supported by B2BINPAY. For details, refer to [Currency codes](https://docs.b2binpay.com/references/currency-codes) in the B2BINPAY documentation.

To enable deposits in a specific currency via this method, make sure that this currency added on the **PS Currencies** tab.

For details, refer to [Add currencies on the PS Currencies tab](#add-currencies-on-the-ps-currencies-tab).
{% endstep %}

{% step %}
Click the **Test connection** button to validate the connection settings.

The green button indicates that the connection has been configured properly.

The red button indicates that some connection settings aren’t valid. The errors displayed below the button specify the connection issues that need to be addressed.
{% endstep %}

{% step %}
Check the method status.

If the method is inactive (**No** is displayed in the **Enabled** field), activate it by setting the **Enabled** dropdown to **Yes**.
{% endstep %}

{% step %}
Click **Save** to apply the changes.
{% endstep %}
{% endstepper %}

The B2BINPAY deposit method is now configured in the Back Office and available to clients in the B2CORE UI.

## Add a withdrawal method through B2BINPAY

To add and set up a withdrawal method through B2BINPAY:

{% stepper %}
{% step %}
In the B2CORE Back Office, navigate to **System** > **Payout system** > **Payout methods**.
{% endstep %}

{% step %}
Click **+Create** in the upper-right page corner.
{% endstep %}

{% step %}
On the **Create a payout method** page, fill in the following fields:

* In the **Name** field, enter a name for the method. The name must be unique and may only contain Latin letters, numbers, dashes, and underscores (for example, `B2BINPAY_Withdrawals`).
* In the **Caption** field, enter a caption for the method. This caption will be assigned to the method in the Back Office and will be visible to clients in the B2CORE UI.
* In the **Provider** dropdown, select **B2BINPAY**.
* In the displayed **Currency** dropdown, select a currency for the method. After creating the method, you can add multiple currencies to it on the **TR Currencies** tab.
* In the **Connection** field, select the previously configured [B2BINPAY connection](#configure-connections-to-b2binpay).
  {% endstep %}

{% step %}
Click **Save** to create the method.

The B2BINPAY method will appear in the list of methods.
{% endstep %}

{% step %}
Click **Edit** to open the method details and fill in the following fields:

* On the **Settings** tab, use the **Group** dropdown to select one or more groups where the method should be included.
* In the **Icon** field, specify `paymethod-b2binpay` to display the [predefined icon](https://docs.b2core.b2broker.com/integrations/payment-systems) for the method in the B2CORE UI. To use a custom icon, specify the URL of the image to be displayed.
* In the **Rates provider** dropdown, select B2BINPAY as the preferred rate provider for processing withdrawals with conversions. To do this, B2BINPAY must first be added as an exchange rate provider under **Currencies** > **Rates** (for details, refer to [How to configure currency exchange rates](https://docs.b2core.b2broker.com/how-to-articles/manage-currencies/how-to-configure-currency-exchange-rates)).
  {% endstep %}

{% step %}
In the **Provider settings** section, configure the following B2BINPAY-specific settings:

* In the **Fee level** dropdown, select **Low**, **Medium**, or **High**.
* In the **Wallet ID** dropdown, select your B2BINPAY wallet that will be used for processing transactions.
* In the **WithdrawDone Notification** dropdown, select **No**.
* In the **Client type** dropdown, select **Enterprise** or **Merchant**, depending on your wallet type.
* In the **Destination tag** dropdown, select:

  * **Yes** — if a destination tag is required for making withdrawals.
  * **No** — if a destination tag isn't required for withdrawals.

  This depends on the blockchain on which withdrawals will be processed.
* In the **Tag type** dropdown, select the type of the destination tag, either **Numeric** or **String**. Select **Not set** if you set the **Destination tag** dropdown to **No**.
* In the **Off-chain transactions** dropdown, select:
  * **Enabled** — to allow [off-chain transactions](https://docs.b2binpay.com/references/key-terms#off-chain-transaction) when possible.
  * **Disabled** — to use only [on-chain transactions](https://docs.b2binpay.com/references/key-terms?q=fee+level#on-chain-transaction).
* In the **Collect personal info** dropdown, select:
  * **No** — to disable the collection of client personal data.
  * **Yes** — to enable the collection of client personal data, which is sent to B2BINPAY and then forwarded to **Notabene** for verifying crypto transactions.
    {% endstep %}

{% step %}
On the **TR Currencies** tab, check the added currency and add more if needed. The method will be available for withdrawing funds from client wallets in B2CORE, which are denominated in the currencies added on this tab.
{% endstep %}

{% step %}
On the **PS Currencies** tab, add the currencies in which withdrawals can be processed. These are the currencies supported by B2BINPAY. For details, refer to [Currency codes](https://docs.b2binpay.com/references/currency-codes) in the B2BINPAY documentation.

To enable withdrawals in a specific currency via this method, make sure that this currency is added on the **PS Currencies** tab.

For details, refer to [Add currencies on the PS Currencies tab](#add-currencies-on-the-ps-currencies-tab).
{% endstep %}

{% step %}
Click the **Test connection** button to validate the connection settings.

The green button indicates that the connection has been configured properly.

The red button indicates that some connection settings aren’t valid. The errors displayed below the button specify the connection issues that need to be addressed.
{% endstep %}

{% step %}
Check the method status.

If the method is inactive (**No** is displayed in the **Enabled** field), activate it by setting the **Enabled** dropdown to **Yes**.
{% endstep %}

{% step %}
Click **Save** to apply the changes.
{% endstep %}
{% endstepper %}

The B2BINPAY withdrawal method is now configured in the Back Office and available to clients in the B2CORE UI.

## Add currencies on the PS Currencies tab

To add a currency:

{% stepper %}
{% step %}
Click **+Add** and select the currency in the dropdown.
{% endstep %}

{% step %}
For the selected currency, specify the following parameters:

* **Block explorer** — the URL template of the blockchain explorer used to track transactions.
* **Blockchain code** — the numeric identifier of the blockchain used for processing transactions. This ensures the deposit is processed on the correct network.

These codes must be taken from the B2BINPAY documentation: [Currency codes](https://docs.b2binpay.com/references/currency-codes) and [Block explorer list](https://docs.b2binpay.com/references/block-explorer-list).

#### Example

For example, `USDT` deposits can be processed on different blockchains, depending on the token standard:

For **Tron (TRC20)**, specify:

* **Block explorer**: —`https://tronscan.org/#/transaction/{address}`
* **Blockchain code** — 2145

For **Ethereum (ERC20)**, specify:

* **Block explorer**: —`https://etherscan.io/tx/{address}`
* **Blockchain code** — 2015

For **Binance Smart Chain (BSC/BEP20)**, specify:

* **Block explorer**: — `https://bscscan.com/tx/{address}`
* **Blockchain code** — 2065
  {% endstep %}

{% step %}
In the **Min** and **Max** fields, specify the minimum and maximum transaction amounts.

<figure><img src="https://514898401-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGoRxAprhHu1goANW7FXt%2Fuploads%2Fgit-blob-96b5a566f3e735d1b51fe59e5d9caa4dadd5b3c6%2Fps-currencies-tab.png?alt=media" alt="Add a currency on the PS Currencies tab"><figcaption><p>Add a currency on the PS Currencies tab</p></figcaption></figure>
{% endstep %}

{% step %}
Click **Save** to add the currency on the tab.
{% endstep %}
{% endstepper %}

Add as many currencies as needed for your deposit and withdrawal methods.
