Creating a Channel via the API
When setting up a channel for crypto top-ups, you'll utilize the Create Channel endpoint.
Below is an overview of the parameters to include in your channel creation request:
| Parameter | Type | Description |
|---|---|---|
payCurrency | string | The cryptocurrency code for the wallet (e.g., ETH for Ethereum). |
displayCurrency | string | The currency code for displaying prices (e.g., EUR for Euro or BTC for Bitcoin). |
merchantId | string | Your Merchant Wallet ID, specifies the wallet and final settlement currency for payments. Available on your account's Merchant Wallet page. |
reference | string | A 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": "",
"uri": "ethereum:0xb4e8bb9918248007dc9d0dc12ae1142f0d62ef0e",
"alternatives": null
}The response includes an address for your end-user whenever they wish to top up on your platform.
- The
alternativesfield, if present, contains alternative addresses for cryptocurrencies supporting multiple protocols, such as USDT. - The
uuidis useful for retrieving channel details using the Get Channel endpoint at any time.
After creating the channel address, your next action is to display these details your end-user for them to complete their payment. Once shown, your role is simply to wait for the payment which will fire off a number of webhooks to let you know it has occurred.
Updated about 1 year ago
