Widget integration types
There are two main flows of widget integrations described below
There are two main types of authorization for the widget:
- Authorization and KYC provided by Kuna.
- Authorization and KYC provided by the partner (institution).
The type of authorization is determined by Kuna at the beginning of the integration.
Type 1: Kuna Authorization and KYC
This type is optimal for public placement of the widget on websites where customers have no possibility to log in. In this case, each widget customer must complete an OTP password authorization procedure sent to their email before using the widget. Customers must complete verification to perform financial transactions within the widget.
Type 2: Partner Authorization and KYC (if available)
This type is optimal for placing the widget under the existing authorization of the partner (customerr's personal account). In this interaction model, customers do not need to perform authorization and verification themselves; this function is provided by the institution (partner) of KunaCore.
For interaction under Type 2, when a customer needs to use the widget, the institution must:
-
Make a request to KunaCore to create a customer and provide the necessary verification data.
Endpoint:
/v2/customer/create
{ "email": "[email protected]", "phoneNumber": "+380991234567", "firstName": "Viktor", "lastName": "Tatov", "comment": "Customer of our test program", "externalId": "abc12345-def6-7890-ghij-klmnopqrstuv", "referralId": "wxzy9876-5432-1abc-def0-ghijklmnopqr", "country": "UA", "verificationDocumentId": "1237654", "residenceAddress": "my street ap.12", "itn": "1237654" }
-
Obtain a unique
customerId
for the customer in the KunaCore system (id
).{ "data": { "id": "d2f1a123-4567-8901-bcde-f23456789abc", "email": "[email protected]", "walletId": "d2f1a123-4567-8901-bcde-f23456789abc", "phoneNumber": "+380991112233", "firstName": "Viktor", "lastName": "Tatov", "comment": "Customer of our test program", "externalId": "mnopqr12-3456-7890-abcd-efghijklmnop", "createdAt": "2024-11-01T08:01:19.952Z", "referralId": "stu56789-0123-4abc-def4-ghijklmnopqr", "verificationStatus": "ACCEPTED", "walletStatus": "Active" } }
-
Make a request to obtain a unique token for the customer using the
customerId
identifier.Endpoint:
/v2/ramp/token
{ "customerId": "d2f1a123-4567-8901-bcde-f23456789abc", "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36" }
-
Receive the unique token for further authorization in the widget.
{ "data": { "token": "eyJkbLciOiJIUzI1NiIsInR7cCI6IjpXVCJ9.eyJpZCI6IjA3MDY5YzYyLTMwYjQtNDk0OC05NTJmLTc0MTQ3YjRmNDY4NiIsImZpbmdlcnByaW50IjoiN2U4ODRhYjU0NTE5MTIwMmY3NjQyZWNhZjQ3YTg3ODAiLCJzZXNzaW9uQ3JlYXRlZEF0IjoxNzIzMDQ1MjM4MTYwLCJpYXQiOjE3MjMwNDUyMzgsImV4cCI6MTcyMzIxMjcyOH0.XsF8Ld3X5kOe_CVEXMlAGCvCdfHZY2U03zLqT8-Qy9s" } }
-
Perform authorization in the widget by adding the previously obtained token to the widget launch URL.
Example URL:
https://core-onramp-widget.anuk.tech/?institutionId=xyz98765-4321-0abc-def0-ghijklmnopqr&refreshToken=eyJkbLciOiJIUzI1NiIsInR7cCI6IjpXVCJ9.eyJpZCI6IjA3MDY5YzYyLTMwYjQtNDk0OC05NTJmLTc0MTQ3YjRmNDY4NiIsImZpbmdlcnByaW50IjoiN2U4ODRhYjU0NTE5MTIwMmY3NjQyZWNhZjQ3YTg3ODAiLCJzZXNzaW9uQ3JlYXRlZEF0IjoxNzIzMDQ1MjM4MTYwLCJpYXQiOjE3MjMwNDUyMzgsImV4cCI6MTcyMzIxMjcyOH0.XsF8Ld3X5kOe_CVEXMlAGCvCdfHZY2U03zLqT8-Qy9s
The institution can also deactivate the token, thereby canceling the customer's authorization.
Endpoint: /v2/ramp/invalidate
{
"customerId": "d2f1a123-4567-8901-bcde-f23456789abc"
}
Updated about 2 months ago