Skip to main content

Collect via Channels

Use channels to add crypto payments to your checkout flow. In this guide, you'll use the BVNK-hosted page—though you can build your own UI using the API responses. Next, we'll outline the channels workflow so you understand how to implement it yourself if you decide not to use the hosted page.

When an end-user tops up with cryptocurrency for the first time, create a channel linked to their user ID in your system so you can display the correct address whenever they request sending funds.

Create a channel

To create a channel, send the POST /api/v2/channel request with the body parameters:

{
"payCurrency": "ETH",
"displayCurrency": "EUR",
"walletId": "a:25022613287255:zmHs0pg:1",
"reference": "customer1topup",
"customerId": "d063635e-0f83-4e47-a1f3-fc9484df1509",
"complianceDetails": {
"requesterIpAddress": "77.71.188.87",
"partyDetails": [
{
"type": "ORIGINATOR",
"entityType": "INDIVIDUAL",
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "1984-06-30",
"relationshipType": "THIRD_PARTY",
"countryCode": "DE"
}
]
}
}

The details to be sent in this request are as follows:

ParameterDescription
payCurrencyCurrency code that defines the cryptocurrency of the wallet.
displayCurrencyCurrency code that specifies the currency in which prices are displayed.
walletIdUnique identifier of the wallet linked to the channel.
referenceUnique reference that will be displayed to the end user and serve as the title of the channel.

After successfully submitting the request, you receive the following response:

{
"id": 65,
"dateCreated": 1631619193321,
"lastUpdated": 1631619193321,
"walletId": "a:25022613287255:zmHs0pg:1",
"walletCurrency": "EUR",
"displayCurrency": "JPY",
"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
}

Key takeaways include the following:

  • address is the created channel that you can share with the end-user.
  • redirectUrl is the URL to which you can redirect customers each time they log in to your platform and initiate a top-up request.
Avoid assigning the same channel to multiple end-users

You won't be able to determine which customer sent the funds. Unlike fiat transfers, blockchain transactions don't include customer references. Thus, providing each user with a unique channel ensures you can correctly match their top-ups to their account.

tip

Instead of just showing customers the destination address, redirect them to the redirectUrl whenever they want to top up. On that page, they will be able to scan a QR code from their wallet. This will eliminate the chance of mistyped addresses. Customers will also be able to view the exact exchange rate for the transaction.

Channel webhooks

To get notified when the status of the channel changes, listen to the following webhooks: