Creating a channel

When setting up a channel for crypto top-ups, you'll utilize the Create Channel endpoint.

❗️

Executing API calls on behalf of your Merchant

Ensure you include your EPM's x-account-reference in the API call headers to perform transactions on behalf of your merchant account, rather than the default EP account.

Below is an overview of the parameters to include in your channel creation request:

ParameterTypeDescription
payCurrencystringThe cryptocurrency code for the wallet (e.g., ETH for Ethereum).
displayCurrencystringThe fiat currency code for displaying prices (e.g., EUR for Euro).
merchantIdstringYour Merchant ID, specifying the settlement currency for payments. Available on your account's Merchant Details page.
referencestringA unique identifier for the channel, visible to the end-user.

Example Request

Here's an example of a channel creation request:

{
     "payCurrency": "ETH",
     "displayCurrency": "EUR",
     "merchantId": "123456789",
     "reference": "customer1topup"
}

Example Response

Upon successful submission, the response will look something like this:

{
  "id": 65,
  "dateCreated": 1631619193321,
  "lastUpdated": 1631619193321,
  "merchantId": "0a12a214-1619-43fa-9be1-0029f6a440a0",
  "walletCurrency": "EUR",
  "displayCurrency": "EUR",
  "payCurrency": "ETH",
  "address": "0xb4e8bb9918248007dc9d0dc12ae1142f0d62ef0e",
  "tag": null,
  "reference": "c1b933d5-3354-4f83-a05f-0b53f1be85f2",
  "status": "OPEN",
  "uuid": "9d1f67f2-a647-404b-9b02-247c77be81d0",
  "redirectUrl": "https://pay.sandbox.bvnk.com/channel?uuid=9d1f67f2-a647-404b-9b02-247c77be81d0",
  "uri": "ethereum:0xb4e8bb9918248007dc9d0dc12ae1142f0d62ef0e",
  "alternatives": null
}

The response includes an address for your end-user and a redirectUrl for directing the user whenever they wish to top up on your platform.

  • The alternatives field, if present, contains alternative addresses for cryptocurrencies supporting multiple protocols, such as USDT.
  • The uuid is useful for retrieving channel details using the Get Channel endpoint at any time.

📘

It's advisable to guide your user to the redirectUrl for top-ups. This ensures they encounter a simple interface for scanning a QR code from their wallet, thereby minimizing the risk of incorrect address inputs. Additionally, this approach allows them to view the exchange rate applicable to their transaction.