Fetching Wallet IDs

For this step, it is necessary to interact with the List Wallets endpoint. If you've previously saved the id field of the wallets when they were initially created, this step might not be necessary.

Before we can transfer and exchange funds between your EP wallet and EPM wallets, it's essential to identify the wallet IDs of the existing wallets on both accounts. In this scenario, we aim to move money from the EUR wallet on your EP account to deposit USDT in your merchant's EPM account. These IDs could have been noted during the wallets' creation, but if not, they can be retrieved by listing all wallets at the account level.

❗️

Executing API calls on behalf of your Merchant

Make sure to apply your EPM's x-account-reference in the API call headers. Otherwise, you'll be transacting on the EP account.

Retrieving these wallet IDs involves two steps:

  1. First, list all wallets on your EP account using the parent API keys.
  2. Then, list all wallets on the EPM level, requiring both the parent API keys and the EPM account's x-account-reference.

Example Requests

These example requests are shown using curl, focusing on the headers:

Request to list all wallets on your EP account:

curl --request GET \
     --url https://api.sandbox.bvnk.com/api/wallet \
     --header 'Authorization: Hawk id="B9jnE1U8eLblzHtNeJZRxfcq03CQKcmcP9FOrACMzXb1HfrxrePWsTfuP70JNns9", ts="1633010032", nonce="guGXrD", mac="uKeg+w1qXqzaF/8mOQGv8Y9IlRxyxTT+iINLe03EQ60="' \
     --header 'accept: application/json'
  1. Request to list all wallets on your merchant's EPM account::
curl --request GET \
     --url https://api.sandbox.bvnk.com/api/wallet \
     --header 'Authorization: Hawk id="B9jnE1U8eLblzHtNeJZRxfcq03CQKcmcP9FOrACMzXb1HfrxrePWsTfuP70JNns9", ts="1633010032", nonce="guGXrD", mac="uKeg+w1qXqzaF/8mOQGv8Y9IlRxyxTT+iINLe03EQ60="' \
     --header 'accept: application/json'
		 --header 'x-account-reference: 39bd9cd2-8d57-4547-ae2a-f82c5bc328ce' \

📘

The key difference here is the inclusion of x-account-reference to specify operations at the EPM level.

Example Responses

  1. API response for the EP Account's EUR Wallet:
[
  {
        "address": "M62095193",
        "alternatives": [],
        "approxAvailable": "1084.02",
        "approxBalance": "1084.02",
        "approxConvertedAvailable": "22189.49",
        "available": 1084.02,
        "balance": 1084.02,
        "capabilities": [],
        "convertedAvailable": 22189.49,
        "currency": {
            "code": "EUR",
            "depositFee": 0,
            "fiat": true,
            "icon": null,
            "id": 1773,
            "name": "Euro",
            "options": {},
            "pricePrecision": 2,
            "protocols": [],
            "quantityPrecision": 2,
            "supportsDeposits": true,
            "supportsWithdrawals": true,
            "withdrawalFee": 0.400000000000000000,
            "withdrawalParameters": []
        },
        "custodianWallet": null,
        "depositFee": 0,
        "description": "Main EUR Wallet",
        "id": 543660,
        "isEmoney": false,
        "lookup": null,
        "partner": null,
        "protocol": null,
        "supportsDeposits": false,
        "supportsThirdParty": true,
        "supportsWithdrawals": true,
        "withdrawalFee": 0.400000000000000000
    }
  ]
  1. API response for the Merchant's EPM Account's USDT Wallet:
[
  {
        "address": "0xabcc1d7fb5351be0252179c31dc48b286d0b9c5c",
        "alternatives": [
            {
                "address": "TRqPrn6ChukQrZy7AtCu77QfAMucQKB323",
                "protocol": "TRC20",
                "tag": null,
                "uri": "TRqPrn6ChukQrZy7AtCu77QfAMucQKB323"
            }
        ],
        "approxAvailable": "1311.782294",
        "approxBalance": "1311.782294",
        "approxConvertedAvailable": "25399.68",
        "available": 1311.782294,
        "balance": 1311.782294,
        "capabilities": [],
        "convertedAvailable": 25399.68,
        "currency": {
            "code": "USDT",
            "depositFee": 0,
            "fiat": false,
            "icon": "https://media.dev.node.limited/5b9dd253-ef95-4570-8375-0bf56c583463.png",
            "id": 1979,
            "name": "Tether",
            "options": {
                "transaction": "https://usdt.tokenview.io/en/tx/{{hash}}",
                "explorer": "https://usdt.tokenview.io/",
                "address": "https://usdt.tokenview.io/en/address/{{address}}",
                "confirmations": 12
            },
            "pricePrecision": 5,
            "protocols": [
                {
                    "code": "TRC20",
                    "network": "Tron"
                },
                {
                    "code": "ERC20",
                    "network": "Ethereum"
                }
            ],
            "quantityPrecision": 6,
            "supportsDeposits": true,
            "supportsWithdrawals": true,
            "withdrawalFee": 0,
            "withdrawalParameters": []
        },
        "custodianWallet": null,
        "depositFee": 0,
        "description": "USDT Test Wallet",
        "id": 578199,
        "isEmoney": false,
        "lookup": null,
        "partner": null,
        "protocol": "ERC20",
        "supportsDeposits": true,
        "supportsThirdParty": false,
        "supportsWithdrawals": true,
        "withdrawalFee": 0
    }
  ]

These responses, provided as arrays, list all wallets on the account.

Important fields:

FieldsDescription
idThe required ID of the wallet.
currency.codeThe type of currency held by the wallet.
balanceThe available balance of the type of currency on the wallet

For our purposes, the critical fields to note for the subsequent steps are the EP EUR wallet ID (id: 543660) and the EPM USDT wallet ID (id: 578199).