Integration Guide for Banks
[UKR] Посібник з інтеграції для банку
[UKR] Посібник з інтеграції для банку
  • General
    • 💰Загальний опис
      • Перекази між цифровізованими сутностями
        • Варіант 1. Швидке створення/видалення ідентифікаторів
        • Варіант 2. Стандартне створення/видалення ідентифікаторів (опціонально)
      • Історія версій
      • Журнал змін API
      • Глосарій
    • 🌐Загальні вимоги
    • 👉Базовий варіант впровадження
    • 📅План інтеграції
      • План інтеграції (Бізнес)
      • План інтеграції (Технічна команда)
      • Мультипідпис
    • ❗Повідомлення про помилки
  • 🛠️API МЕТОДИ
    • Автентифікація
      • Авторизація через JWT
      • Служба Аутентифікації Банку
      • JWT формат
    • Працівники
      • Призначити роль працівнику
      • Управління ролями
    • Клієнти
      • Сегмент
    • Цифровізовані сутності
    • Ідентифікатори
    • Трансфер (перерозподілення ідентифікаторів)
      • Мультипідпис для трансферів
      • Зворотні виклики
      • Категорія
    • Ліміти
    • Реконсиляція
    • [необов’язково] Відділення
      • Відділення (доступ)
      • Як додати працівника до віддлення (філії)
      • Фільтр по відділенню
      • Трансфери (Відділення)
Powered by GitBook
On this page
  1. API МЕТОДИ

Клієнти

PreviousУправління ролямиNextСегмент

Last updated 1 year ago

У роботі з Клієнтами існують наступні методи:

Клієнти - створення Клієнта та цифровізованого ідентифікатора

Клієнти - створення додаткового цифровізованого ідентифікатора Клієнта

Клієнти - отримання списку доступних ідентифікатроів Клієнта(ів)

Клієнти - отримання списку Клієнтів до певного Контрагента (Банку)

Клієнти - оновлення даних Клієнта

Створити Клієнта та рахунок

Важливо: Перш ніж створити Клієнта, необхідно переконатися, що Авторизація містить відповідний секрет. Для всіх облікових записів Клієнта використовується однаковий секрет.

Щоб створити Клієнта та його перший обліковий запис, необхідно використати наступний запит:

Response example:
{
    "customer_guid": "e13e81c4-056b-4e84-96ba-d9d9daba3557",         // customer's identifier
    "platform": "",
    "type": "5e3f4309-c152-48b3-8091-046708694f90",
    "guid": "51599e25-83b4-11ee-aa27-ba6fe7e5a0e5",                  // account GUID
    "wallet_account_guid": "51599e25-83b4-11ee-aa27-ba6fe7e5a0e5",   // account GUID
    "name": "customer",
    "assets_total": 1,
    "assets": [
        {
            "activated": true,
            "balance": 0,                                            // balance
            "platform": "",
            "code": "UAH",                                           // asset code
            "name": "Ukraine Hryvnia",
            "stellar_code": "eUAH",                                  // asset stellar code
            "stellar_issuer": "GDQQY7WXGK5JZJQHLY7GMNZOCJ2QVG3ZNHDT4WYCNJU6ZG53RVXZPN2E",
            "minor_unit": 2                                          // how many decimal places does this asset contain
        }
    ],
    "activated": true,
    "registered": false,
    "blocked": false,
    "iban": "LT966008050860332937"
}

До інфомації: Клієнт має один обліковий запис (одну ідентифікаційну сутність).

Сутність клієнта має наступні атрибути:

  • активний

  • зареєстрований

  • заблокований

ці атрибути наразі не використовуються.

Створення додаткового ідентифікатора Клієнта

До інформації: Перший ідентифікатор для клієнта відкривається під час створення сутності Клієнта.

Щоб створити додатковий ідентифікатор Клієнту, необхідно використовувати наступний метод:

Приклад відповіді:

{
    "wallet_account_guid": "4cd3a442-2240-11ee-9bcd-ce1b093270e2"    // customer's account's identifier
}

Отримання Ідентифікаторів Клієнта

Щоб отримати рахунки клієнта, необхідно використовувати наступний метод:

Response example
{
    "accounts": [
        {
            "platform": "",
            "type": "c77ed677-1d4d-4eac-993c-724d78cc3028",
            "guid": "f0ce3e50-2239-11ee-a188-62e161fdf271",
            "name": "customer",
            "assets_total": 1,
            "assets": [
                {
                    "activated": true,
                    "balance": 0,
                    "platform": "",
                    "code": "UAH",
                    "name": "Ukraine Hryvnia",
                    "stellar_code": "UAH",
                    "stellar_issuer": "GBWUVXEBXYAJITVDD6PEZAY4SBBEAOQFVPFJC4PKTWBNIZXSTSAH7LML",
                    "minor_unit": 2
                }
            ],
            "activated": true,
            "registered": true,
            "blocked": false,
            "iban": "AZ21DGOK50994005088730349858"
        }
    ],
    "total": 1
}

До інформації: один ідентифікатор має одну сутність (накшталт валюти до банківського рахунку). Наразі дві різні сутності до одного ідентифікатру не створюється (накшталт, рахунки з однаковою валютою в Банку не відкриваються - один рахунок в одній влюті).

Сутність ідентифікатору має наступні атрибути:

  • активний

  • зареєстрований

  • заблокований

ці атрибути наразі не використовуються.

Оновлення даних клієнта

Список Клієнтів до Контрагента

Щоб отримати список всіх клієнтів конкретного Контрагента, необхідно використовувати наступний метод:

Response example:
{
    "customers": [
        {
            "wallet_user_guid": "b948d0e4-93c0-43ee-b861-7d699c73a355",
            "counterparty_guid": "e8fd9c29-24d5-4af4-a6b9-933f59e5023d",
            "login": "customer1@gmail.com",
            "kyc_level": 1,
            "is_disabled": false,
            "balance_allowed": 1000,
            "balance_asset_code": "UAH",
            "balance_asset_issuer": "GBWUVXEBXYAJITVDD6PEZAY4SBBEAOQFVPFJC4PKTWBNIZXSTSAH7LML",
            "branch_name": "",
            "name": "NameOfCustomer",
            "paternal_name": "Testik",
            "phone_number": "1124988888888888888888",
            "segment": "test",
            "status": "active",
            "surname": "SurnameOfCustomer",
            "created_at": "2023-07-14T11:31:14.137931Z",
            "updated_at": "2023-07-14T12:27:15.486653Z"
        }
    ],
    "total": 1
}

Щодо заповнення asset_code та asset_issuer, необхідно взяти інформацію з .

🛠️
Загальних вимог

Customer's accounts

get

Get customer's accounts on behalf of employee

Path parameters
counterparty_guidstringRequired

Counterparty GUID

customer_guidstringRequired

Customer GUID

Query parameters
ibanstringOptional

iban (string)

Responses
200
OK
application/json
400
json with error msg
application/json
get
GET /api/v1/counterparty/{counterparty_guid}/customers/{customer_guid}/accounts HTTP/1.1
Host: your_host
Accept: */*
{
  "accounts": [
    {
      "activated": true,
      "assets": [
        {
          "activated": true,
          "balance": 1,
          "code": "text",
          "minor_unit": 1,
          "name": "text",
          "platform": "text",
          "stellar_code": "text",
          "stellar_issuer": "text"
        }
      ],
      "assets_total": 1,
      "blocked": true,
      "guid": "text",
      "iban": "text",
      "name": "text",
      "platform": "text",
      "registered": true,
      "type": "text",
      "wallet_account_guid": "text"
    }
  ],
  "total": 1
}

Get customers list

get

Get customers list with filter

Path parameters
counterparty_guidstringRequired

Counterparty GUID

Query parameters
wallet_user_guidsstring[]Optional

Customer's GUIDs

loginsstring[]Optional

Customer's logins

kyc_levelsstring[]Optional

Customer's kyc levels

is_disabledbooleanOptional

Include disabled

min_balance_allowednumberOptional

Customer's allowed balance

max_balance_allowednumberOptional

Customer's allowed balance

balance_asset_codesstring[]Optional

Balance's asset code

balance_asset_issuersstring[]Optional

Balance's asset issuers

branch_guidsstring[]Optional

Customer's branch guids

namesstring[]Optional

Customer's names

paternal_namesstring[]Optional

Customer's paternal names

phone_numbersstring[]Optional

Customer's phone numbers

segmentsstring[]Optional

Customer's segments

statusesstring[]Optional

Customer's statuses

surnamesstring[]Optional

Customer's surnames

search_stringstringOptional

Parameter to search by name or login

min_created_atstringOptional

Customer's time of creation

max_created_atstringOptional

Customer's time of creation

min_updated_atstringOptional

Customer's time of last update

max_updated_atstringOptional

Customer's time of last update

offsetintegerOptional

Offset

limitintegerOptional

Limit

orderingstring · enumOptional

Ordering

Possible values:
Responses
200
OK
application/json
400
json with error msg
application/json
get
GET /api/v1/counterparty/{counterparty_guid}/customers HTTP/1.1
Host: your_host
Accept: */*
{
  "customers": [
    {
      "balance_allowed": 1,
      "balance_asset_code": "text",
      "balance_asset_issuer": "text",
      "branch_guid": "text",
      "branch_name": "text",
      "counterparty_guid": "text",
      "created_at": "text",
      "is_disabled": true,
      "kyc_level": 1,
      "login": "text",
      "name": "text",
      "paternal_name": "text",
      "phone_number": "text",
      "segment": "text",
      "status": "text",
      "surname": "text",
      "updated_at": "text",
      "wallet_user_guid": "text"
    }
  ],
  "total": 1
}
  • Створити Клієнта та рахунок
  • POSTCreate customer
  • Створення додаткового ідентифікатора Клієнта
  • POSTCreate customer's accounts
  • Отримання Ідентифікаторів Клієнта
  • GETCustomer's accounts
  • Оновлення даних клієнта
  • PUTUpdate customer
  • Список Клієнтів до Контрагента
  • GETGet customers list

Create customer

post

Create customer

Path parameters
counterparty_guidstringRequired

Counterparty GUID

Body
asset_codestringRequired

required Asset's code of e-money currency

asset_issuerstringRequired

required Address in stellar which issues token

balance_allowednumberOptional

optional default 0, customer's allowed balance

balance_asset_codestringOptional

optional Balance's asset code

balance_asset_issuerstringOptional

optional Balance's asset issuers

branch_guidstringOptional

optional Branch's GUID

ibanstringOptional

optional IBAN

is_disabledbooleanOptional

If you need to disable an employee you should make this parameter true, default it is false

kyc_levelintegerOptional

optional default 0, customer's level of verification(KYC)

loginstringOptional

Login unique user name phone, email or other

namestringOptional

optional Customer's name

paternal_namestringOptional

optional Customer's paternal name

phone_numberstringOptional

optional Customer's phone number

segmentstringOptional

optional Customer's segment: Public Liability (PL) or Professional Indemnity (PI)

statusstringOptional

optional Customer's status

surnamestringOptional

optional Customer's surname

Responses
200
OK
application/json
400
json with error msg
application/json
post
POST /api/v1/counterparty/{counterparty_guid}/customers HTTP/1.1
Host: your_host
Content-Type: application/json
Accept: */*
Content-Length: 313

{
  "asset_code": "text",
  "asset_issuer": "text",
  "balance_allowed": 1,
  "balance_asset_code": "text",
  "balance_asset_issuer": "text",
  "branch_guid": "text",
  "iban": "text",
  "is_disabled": true,
  "kyc_level": 1,
  "login": "text",
  "name": "text",
  "paternal_name": "text",
  "phone_number": "text",
  "segment": "text",
  "status": "text",
  "surname": "text"
}
{
  "activated": true,
  "assets": [
    {
      "activated": true,
      "balance": 1,
      "code": "text",
      "minor_unit": 1,
      "name": "text",
      "platform": "text",
      "stellar_code": "text",
      "stellar_issuer": "text"
    }
  ],
  "assets_total": 1,
  "blocked": true,
  "customer_guid": "text",
  "guid": "text",
  "iban": "text",
  "name": "text",
  "platform": "text",
  "registered": true,
  "type": "text",
  "wallet_account_guid": "text"
}

Create customer's accounts

post

Create customer's accounts on behalf of employee

Path parameters
counterparty_guidstringRequired

Counterparty GUID

customer_guidstringRequired

Customer GUID

Body
ibanstringOptional
Responses
200
OK
application/json
400
json with error msg
application/json
post
POST /api/v1/counterparty/{counterparty_guid}/customers/{customer_guid}/accounts HTTP/1.1
Host: your_host
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "iban": "text"
}
{
  "wallet_account_guid": "text"
}

Update customer

put

Update customer

Path parameters
counterparty_guidstringRequired

Counterparty GUID

customer_guidstringRequired

Customer GUID

Body
balance_allowednumberOptional

customer's allowed balance

balance_asset_codestringOptional

optional balance's asset code

balance_asset_issuerstringOptional

optional balance's asset issuer

branch_guidall ofOptional

optional customer's branch's name

is_disabledbooleanOptional

if you need to disable an employee you should make this parameter true, default it is false

kyc_levelintegerOptional

customer's level of verification(kyc)

namestringOptional

optional customer's name

paternal_namestringOptional

optional customer's paternal name

phone_numberstringOptional

optional customer's phone number

segmentstringOptional

optional customer's segment: Public Liability (PL) or Professional Indemnity (PI)

statusstringOptional

optional customer's status

surnamestringOptional

optional customer's surname

wallet_user_guidstringOptional

customer's guid

Responses
200
OK
application/json
Responseobject
400
json with error msg
application/json
put
PUT /api/v1/counterparty/{counterparty_guid}/customers/{customer_guid} HTTP/1.1
Host: your_host
Content-Type: application/json
Accept: */*
Content-Length: 291

{
  "balance_allowed": 1,
  "balance_asset_code": "text",
  "balance_asset_issuer": "text",
  "branch_guid": {
    "valid": true,
    "value": "text"
  },
  "is_disabled": true,
  "kyc_level": 1,
  "name": "text",
  "paternal_name": "text",
  "phone_number": "text",
  "segment": "text",
  "status": "text",
  "surname": "text",
  "wallet_user_guid": "text"
}
{}