Understanding the workflow with channels
To facilitate crypto top-ups, you'll be using the Channels functionality of our API. A channel is essentially a permanent address that is unique to each of your end-users, that can freely accept top-ups without the need to create a new payment each time - allowing your customers to send crypto whenever they want to top up.
The first time your end-user chooses to top up with crypto, you will need to create a channel for them that you store against their user ID in your system - so that you can display the correct address to them each time they query where to send funds to.
After you've created a channel and they proceed to top up, you'll see transactions use the following states:
Status | Immutable? | Description |
---|---|---|
detected | No | A new cryptocurrency transaction has been detected at the channel address. BVNK creates a ChannelPayment transaction with the status of DETECTED in the Merchant's wallet. The status will be updated to COMPLETE once the cryptocurrency transaction gets the required number of confirmations on the network. |
complete | Yes | The cryptocurrency transaction has got the required number of confirmations on the Network. BVNK updates the ChannelPayment status from DETECTED to COMPLETE and adds funds to the Merchant's wallet balance. The payment is complete and the status will not be updated later. |
Be careful not to create a channel that is used by multiple of your end-users as you won't be able to reconcile who sent the funds. Cryptocurrency transactions, unlike fiat, do not have references sent over the blockchain, so by giving each customer a channel you can reconcile their top-ups against their account on your platform.
Channel Payment Flow Diagram
Updated 10 months ago