Create a Channel
First of all, let’s create a channel for our customer:
Let’s go over the parameters we used in the request above:
pay_currency
- is a cryptocurrency in which the customer will make a payment (in our case it isBTC
)network
- the blockchain in which the address is going to be created. The list of available networks can be found here.receiver_currency
- the currency to which incoming cryptocurrency transactions will be converted and in which the merchant will be credited to the balance account (in our case it isEUR
)name
- any channel namecustom_id
- we recommend indicating a certain reference by which you associate your customer with the created channel. It is important to note that all channel payments of this channel will be inherited by the parent channel - for example,631044494
You will receive the channel’s address and a link to its hosted page, which can be integrated into your website:
To create a channel payment, we need to send a BTC transaction to the Bitcoin address of our newly created channel 2N9uVK2MDFNgBVqPnvCTV66Dinx3cp5J7S4
. In order to send the transaction, please login to your test account and press the "Send" button, which is located on your Bitcoin account:
In the pop-up window, enter the address and amount of the transaction, and complete the process.
You can also automate the process of sending transactions using this endpoint so that you do not have to create payments manually.
Once the payment is sent, we will create a Channel Payment transaction in your account and send the callbacks to the Callback URL. We also recommend you using this endpoint to check the channel payment status before depositing funds to your customer's balance, as delivery of the callbacks is not guaranteed.
Below is an example of a callback for the final status completed
:
It is important to note that paid_amount
== received_amount
+ fee
. It means that the full amount of the payment made by the customer consists of the received_amount
and the fee
, where the received_amount
is the amount of the merchant balance credited to Cryptopay and the fee
is the amount of the processing fee charged by Cryptopay.
Last updated