Add customer [Private]

The endpoint allows you to create an account for your customer in the KUNA Core system.

Method name:/v2/customer/create
Request type:POST

📘

To call private endpoints, you need to get a JWT token or an API key for authentication.

Here you can learn in detail how to successfully authenticate.

The endpoint allows you to create a customer in the KunaCore system. Creating a customer is necessary for performing both financial and non-financial transactions. A preliminary verification of the client to obtain their personal data is also required.

The email used when creating a customer must be unique, as it serves as the primary key.

When creating a customer, the system generates not only a unique ID but also a wallet associated with the wallet ID. All operations in the KunaCore system are performed using this wallet ID.

Data dictionary

Name Type Parameter type Required Range Description

email

string

BODY

YES

Customer email. It must be unique for each customer.

phoneNumber

string

BODY

NO

Customer's phone number.

firstName

string

BODY

YES

Customer's name.

lastName

string

BODY

YES

Customer's surname.

comment

string

BODY

NO

Additional comment about the customer.

externalId

string

BODY

NO

Any string that identify the customer in your system.

referralId

string

BODY

NO

ID of another customer.
(For the referral program, if your service supports it).

country

string

BODY

YES

UA, IT, ES, FR, etc.

Customer's country.
(Country code in ISO 3166-1 Alfa2, e.g. UA - Ukraine, IT - Italy).

verificationDocumentId

string

BODY

YES

ID of the document that was used by the client for the verification process (passport, driver's license, etc.)

residenceAddress

string

BODY

YES

Customer's residential address.

itn

string

BODY

NO

Individual taxpayer number of the customer.

Exemplary request

const url = BASE_URL;
const path = "/v2/customer/create";

const body = {
  email: "alexsmith@mail.com",
  phoneNumber: "+380991234567",
  firstName: "Alex",
  lastName: "Smith",
  comment: "Alex is a special client. Hi is a refferal of Denis.",
  externalId: "12124d80-dd80-4c70-aa9c-c2aa014cc29e",
  referralId: "1f44b1c7-9fd4-4d20-b9a4-7aca3646d0d5",
  country: "FR",
  verificationDocumentId: "FV633452",
  residenceAddress: "Champ de Mars, 5 Av. Anatole France, 75007 Paris, France",
  itn: "633-123-92-12",
};

const options = {
  method: "POST",
  headers: {
    accept: "application/json",
    "Content-Type": "application/json",
    "Authorization": `Bearer ${data.accessToken}` // data.accessToken - generated a JWT token via /v2/auth/login.
  },
  body: JSON.stringify(body),
};

fetch(url + path, options)
  .then((response) => response.json())
  .then((showResponse) => console.log(showResponse.data));
import requests

url = BASE_URL
path = "/v2/customer/create"
headers = {
    "accept": "application/json",
    "Content-Type": "application/json",
    "Authorization": "Bearer " + data.accessToken # data.accessToken - generated a JWT token via /v2/auth/login.
}
body = {
    "email": "alexsmith@mail.com",
    "phoneNumber": "+380991234567",
    "firstName": "Alex",
    "lastName": "Smith",
    "comment": "Alex is a special client. Hi is a refferal of Denis.",
    "externalId": "12124d80-dd80-4c70-aa9c-c2aa014cc29e",
    "referralId": "1f44b1c7-9fd4-4d20-b9a4-7aca3646d0d5",
    "country": "FR",
    "verificationDocumentId": "FV633452",
    "residenceAddress": "Champ de Mars, 5 Av. Anatole France, 75007 Paris, France",
    "itn": "633-123-92-12"
}

request = requests.post(url + path, headers=headers, json=body)
print(request.json())

How to call private endpoints here

Swagger here

Response

{
  "data": {
    "id": "6d962783-f0cf-420d-a511-3a48c71c5595",                      // Customer’s ID
    "comment": "Alex is a special client. Hi is a refferal of Denis.", // Note for the customer  account
    "createdAt": "2024-02-26T16:36:14.499Z",                           // Account creation date
    "email": "alexsmith@mail.com",                                     // Customer’s email
    "firstName": "Alex",                                               // Customer’s name
    "lastName": "Smith",                                               // Customer’s surname
    "phoneNumber": "+380991234567",                                    // Customer’s phone number
    "externalId": "12124d80-dd80-4c70-aa9c-c2aa014cc29e",              // Customer’s external ID
    "walletId": "6d962783-f0cf-420d-a511-3a48c71c5595",                // Customer’s wallet ID
    "referralId": "1f44b1c7-9fd4-4d20-b9a4-7aca3646d0d5"               // External ID of the referral account
  }
}