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. Creation of a customer is required for performing financial and non-financial transactions.

To create a customer, a preliminary verification of the client to obtain his personal data is also required.

When creating a customer, in addition to its unique ID, the system also creates a wallet with the identifier wallet id. All operations in the KunaCore system are performed using a wallet id.

Data dictionary

NameTypeParameter typeRequiredRangeDescription
emailstringBODYYES-Customer email. It must be unique for each customer.
phoneNumberstringBODYNO-Customer's phone number.
firstNamestringBODYYES-Customer's name.
lastNamestringBODYYES-Customer's surname.
commentstringBODYNO-Additional comment about the customer.
externalIdstringBODYNO-Any string that identify the customer in your system.
referralIdstringBODYNO-ID of another customer.
(For the referral program, if your service supports it).
countrystringBODYYESUA, IT, ES, FR, etc.Customer's country.
(Country code in ISO 3166-1 Alfa2, e.g. UA - Ukraine, IT - Italy).
verificationDocumentIdstringBODYYES-ID of the document that was used by the client for the verification process (passport, driver's license, etc.)
residenceAddressstringBODYYES-Customer's residential address.
itnstringBODYNO-Individual taxpayer number of the customer.

Exemplary request

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

const body = {
  email: "[email protected]",
  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": "[email protected]",
    "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": "[email protected]",                                     // 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
  }
}