Create a Channel
First of all, let’s create a channel for our customer:
curl -X POST \
https://minfeesandbox.com/api/channels \
-H 'Authorization: HMAC ***' \
-H 'Content-Type: application/json' \
-H 'Date: Tue, 19 Mar 2019 10:11:40 GMT' \
-d '{"pay_currency":"USDC", "network":"bnb_smart_chain", "receiver_currency":"EUR", "name":"Demo Channel", "custom_id":"631044494"'
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 isUSDC
)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:
{
"data": {
"id": "132c9643-1ec5-4597-acdc-68ec0bd6f521",
"status": "enabled",
"name": "Channel 1",
"description": "My first channel",
"receiver_currency": "EUR",
"pay_currency": "USDC",
"address": "0x8D0bc3d28811A20a4AbC0CB504e08b47f337F91f",
"network": "bnb_smart_chain",
"project_id": "dc48e0ff-f686-4b38-b9f5-d26c8736336b",
"custom_id": "631044494",
"customer_id": null,
"uri": "0x8D0bc3d28811A20a4AbC0CB504e08b47f337F91f",
"hosted_page_url": "https://hosted-page.minfeesandbox.com/channels/132c9643-1ec5-4597-acdc-68ec0bd6f521"
}
}
To create a channel payment, we need to send a USDC transaction to the USDC address of our newly created channel 0x8B0aEd48d0e3dE9D25E06A13afDd735940C2FB46
. In order to send the transaction, please log into your test account, locate your USDC account (you can also use funds from fiat account) and press the "Send" button:

In the pop-up window, enter the address and amount of the transaction, and complete the process.
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 the delivery of the callbacks is not guaranteed.
Below is an example of a callback for the final status completed
:
{
"data": {
"id": "a6a8b8dc-2f6e-4010-825d-add417534fcf",
"fee": "0.21",
"risk": {
"level": "medium",
"score": 0,
"resource_name": "default",
"resource_category": "unknown"
},
"txid": "0x6bc36ea0c6d1def86536cf1eef007832c3e797fba95299630c9bb96345ece7bf",
"status": "completed",
"address": "0x8D0bc3d28811A20a4AbC0CB504e08b47f337F91f",
"network": "bnb_smart_chain",
"exchange": {
"fee": "0.0",
"pair": "USDCEUR",
"rate": "0.8929",
"fee_currency": "EUR"
},
"custom_id": "631044494",
"channel_id": "132c9643-1ec5-4597-acdc-68ec0bd6f521",
"created_at": "2025-04-22T15:13:59+00:00",
"customer_id": null,
"paid_amount": "22.678308",
"fee_currency": "EUR",
"paid_currency": "USDC",
"refund_address": null,
"status_context": null,
"received_amount": "20.03",
"received_currency": "EUR",
"coin_withdrawal_id": null
},
"type": "ChannelPayment",
"event": "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 MinFee and the fee
is the amount of the processing fee charged by MinFee.
Last updated