Receive Payment into EPC Wallet
To send cryptocurrency funds into the wallet of an Embedded Partner Customer, you can use the Crypto Channels API feature. A Channel is a permanent, unique address that can receive funds at any time. You can provide the channel to an end-user so they won't need to create a new payment for every top-up.
For more information on crypto top-ups, see Integrate Cryptocurrency Top-up. The API operation is identical, except for the Embedded Partner use case: you must include "walletId": {{wallet_lsId}}
in your request instead of merchantId
.
To create a channel, send the POST /api/v2/channel
request with the body parameters:
{
"payCurrency": "ETH",
"displayCurrency": "EUR",
"walletId": "a:24092328494070:G5i4XZ9: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:
Parameter | Description |
---|---|
payCurrency | Currency code that defines the cryptocurrency of the wallet |
displayCurrency | Currency code that specifies the currency in which prices are displayed |
walletId | Wallet ID of your Embedded Partner Customer's wallet |
reference | Unique 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:24092328494070:G5i4XZ9: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 users each time they log in to your platform and initiate a top-up request.
Tip
Instead of just showing users 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. Users will also be able to view the exact exchange rate for the transaction.
After a channel is created, EPC can make and receive payments to that address.
Also, you can send the GET /v2/channel/{uuid}
request to display the wallet address to which the payment can be made.
Updated 2 days ago