DW-Dynamics API Documentation (2.2.x)

Download OpenAPI specification:

API Support Team: support@dw-dynamics.com

Welcome to the API documentation page for the DW-Dynamics Banking-as-a-Service (BaaS) platform.

DWD API Overview

This section covers a number of API features of the DW-Dynamics platform that are required to perform banking operations:

  • Account management
  • Customer-related functions
  • Transactions
  • Application data
  • Customer contact data
  • Other functions — reference data management

It also presents the core data models used (Customer, Account, Transaction, etc.).

The following base objects are described among the models:

Response

This is the base server response, including the error response. It also contains fields for working with object selections: total (the total number of items in the selection), page (the current page number) and per_page (the number of items per page).

AbstractObject

All models that in one way or another have an identifier (id) and are entities stored in databases inherit from this object.

These objects may also have a state (state) and state-related fields (state_info and state_changed).

AbstractSignableObject

If objects require signing with OTP during their lifecycle, the following group of fields is used for this purpose (otp, otp_num, otp_time, confirm_channel).

Objects with attributes

The last common field is attrs — a set of attributes of arbitrary kind. As a rule, it holds various custom attributes. Example of structures with attributes:

{
  ...
  "attrs": {
    "card.last_digits": ["4234"],
    "card.valid_thru": ["03/24"],
    "card.cardholder": ["IVANOV", "IVAN"]
  }
}

Attribute values are arrays, since in the general case they are multi-valued.

Operation Signing

We look at the general principle of signing objects (transactions, various documents) using one-time passwords (OTP).

The object models contain dedicated fields for working with OTP: otp, otp_num, otp_time and confirm_channel.

The general signing scenario is as follows:

1). A model of the object that requires signing is prepared, for example:

{
  "amount": "1000.00",
  "details": "Payment under invoice No. 123 dated 12.12.2022. VAT excluded",
  "confirm_channel" : "SMS"
}

2). The signing initialization function is called (for example, see methods of the /{id}/sign kind), which returns the original object model with the following fields filled in: otp_num (code number) and otp_time (code generation time):

{
  "amount": "1000.00",
  "details": "Payment under invoice No. 123 dated 12.12.2022. VAT excluded",
  "otp" : "",
  "otp_num": 68,
  "otp_time":"2023-01-10T12:00:11.213+00:00",
  "confirm_channel" : "SMS"
}

3). A code and its number arrive by SMS (or through another channel).

4). Only the otp field has to be filled in the model; it is important to keep the other fields unchanged, because the models are compared when the signature is verified. The "otp" field is a string so that a code with leading zeros can be passed.

{
  "amount": "1000.00",
  "details": "Payment under invoice No. 123 dated 12.12.2022. VAT excluded",
  "otp" : "0367",
  "otp_num": 68,
  "otp_time":"2023-01-10T12:00:11.213+00:00"
}

5). The filled-in model is submitted to the server to complete the signing. For a transaction, for example, the /confirm/transaction/{id} function is used for this purpose. Confirmation functions usually look like confirm/xxx/{id}/xxx

Attributes in signing errors

In error situations, for example when the user is blocked or a wrong one-time password is entered, the response may contain additional attributes, for example:

If the code is wrong, the current number of failed signing attempts (otp_counter) and the one-time code type (Confirmation — operation confirmation, Authentication — additional authentication at sign-in) are returned.

{
  "error_id": "otp.code.invalid",
  "message": "Invalid verification code",
  "attrs": {
    "otp_state": ["Active"],
    "otp_counter": [1],
    "otp_type": ["Confirmation"]
  }
}

If the user is blocked after exceeding the number of signing attempts:

{
  "error_id":"api.otp.confirm.locked",
  "message":"You have entered an incorrect confirmation code several times. Confirmation is blocked for 4 minutes",
  "attrs": {
     "lock_time":["2024-10-07T05:19:29.000+00:00"]
  }
}

The attributes contain the time until which the block applies (lock_time).

Trusted signing mode (TRUSTED)

The confirm_channel can take the value TRUSTED provided that the Platform installation supports the so-called trusted signing, where Platform services can themselves contact an external system to verify that a signature made by a third-party service exists.

For this method to work correctly, two additional attributes referencing external signatures must be passed in the object being signed:

  ...
  "attrs": {
    ...
    "signature.id": ["fefa793f-1014-4f73-99fb-6ad6092a5e1e"],
    "signature.file.id": ["3fc6fe1a-652a-4f4f-8c7d-eec0b4131e74"]
    ...
  }
  ...

where signature.id is the external signature identifier and signature.file.id is the identifier of the specific signed file in the external system.

This set of attributes must be passed to the signing initialization function (functions of the /{id}/sign kind), which verifies that the signature exists in the external system.

After that the paired confirmation function /confirm/xxx/{id}/xxx can be called, which finally confirms the operation.

If batch signing is used, signature.file.id must contain the list of file identifiers in the external system where the signatures are stored.

Customers API

Customer list

Returns the list of available customers. If the "q" parameter is present, the operation works in the customer search and filtering mode.

  • q — searches for the specified substring in the customer name, its application data, passport data, as well as in email addresses and phone numbers. An object identifier or an account number can also be specified.
  • types — the list of customer types to filter by: Individual (natural persons), Soleproprietorship (sole proprietors) and Organization (organizations).
  • compliance_states — filtering by identification states (for example, Passed, Restricted).
  • states — filtering by states (for example, Active or Inactive).
  • external_id — if the q parameter is not specified, performs a strict search by the external identifier of a customer/account/user (if such a link to an external system exists).
  • external_type — the type of the external identifier used together with external_id; allowed values: Customer, User, Account.
  • contact — if neither q nor external_id is specified, performs a strict search by a contact — a phone number or an email.
  • tax_id — search by tax ID.
  • registration_number — search by the registration number of a legal entity (or the identity document number of a natural person).

Note that the search is more efficient when exactly one value is specified in the states, types or compliance_states parameters. For example,

/v1/customers?external_id=XYZ&states=Active&types=Organization&compliance_states=Passed
Authorizations:
core_Authorization
query Parameters
q
string

Search query

types
string

List of customer types

compliance_states
string

List of identification states

states
string

List of states

external_id
string

Customer/account/user identifier in an external system

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Current customer

Returns the customer established in the security context. The current customer can be changed if several customers are available.

Authorizations:
core_Authorization

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "type": "Individual",
  • "kind": "Bank",
  • "compliance_state": "Restricted",
  • "business_code": "string",
  • "externals": [
    ],
  • "id": 12345,
  • "state": "string",
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_changed": "2022-12-07T14:03:32.659+00:00",
  • "state_info": "string"
}

Customer information by ID

Returns the customer information by the given identifier.

Authorizations:
core_Authorization
path Parameters
id
required
string

Customer identifier

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "type": "Individual",
  • "kind": "Bank",
  • "compliance_state": "Restricted",
  • "business_code": "string",
  • "externals": [
    ],
  • "id": 12345,
  • "state": "string",
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_changed": "2022-12-07T14:03:32.659+00:00",
  • "state_info": "string"
}

Change current customer

Sets the specified customer as the current one in the security context. Subsequent API calls will operate on behalf of this customer.

Authorizations:
core_Authorization
path Parameters
id
required
string

Customer identifier

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "type": "Individual",
  • "kind": "Bank",
  • "compliance_state": "Restricted",
  • "business_code": "string",
  • "externals": [
    ],
  • "id": 12345,
  • "state": "string",
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_changed": "2022-12-07T14:03:32.659+00:00",
  • "state_info": "string"
}

List of groups

Retrieves the list of groups associated with the given customer.

id - the customer identifier.

Authorizations:
core_Authorization
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Contacts API

Main phone confirmation

Confirms the operation of setting the specified contact as the main one (kind = 'Main').

Authorizations:
core_Authorization
path Parameters
id
required
string

Contact ID

Request Body schema: application/json
required
kind
string
Enum: "Main" "Other"

Contact kind: Main (primary) and Other.

type
string
Enum: "Phone" "Email"

Contact type: Phone (mobile number) and Email (email address).

value
string

Contact value, i.e. a phone number or an email address.

Responses

Request samples

Content type
application/json
{
  • "kind": "Main",
  • "type": "Phone",
  • "value": "79122437136 or alex@mail.com"
}

Response samples

Content type
application/json
{
  • "kind": "Main",
  • "type": "Phone",
  • "value": "79122437136 or alex@mail.com",
  • "id": 12345,
  • "state": "string",
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Main phone confirmation

Confirms the operation of setting the specified contact as the main one (kind = 'Main').

Authorizations:
core_Authorization
path Parameters
id
required
string

Contact ID

Request Body schema: application/json
required
kind
string
Enum: "Main" "Other"

Contact kind: Main (primary) and Other.

type
string
Enum: "Phone" "Email"

Contact type: Phone (mobile number) and Email (email address).

value
string

Contact value, i.e. a phone number or an email address.

Responses

Request samples

Content type
application/json
{
  • "kind": "Main",
  • "type": "Phone",
  • "value": "79122437136 or alex@mail.com"
}

Response samples

Content type
application/json
{
  • "kind": "Main",
  • "type": "Phone",
  • "value": "79122437136 or alex@mail.com",
  • "id": 12345,
  • "state": "string",
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Phone confirmation

Confirms the phone number by entering the one-time code that was sent to it.

Authorizations:
core_Authorization
path Parameters
id
required
string
Request Body schema: application/json
required
kind
string
Enum: "Main" "Other"

Contact kind: Main (primary) and Other.

type
string
Enum: "Phone" "Email"

Contact type: Phone (mobile number) and Email (email address).

value
string

Contact value, i.e. a phone number or an email address.

Responses

Request samples

Content type
application/json
{
  • "kind": "Main",
  • "type": "Phone",
  • "value": "79122437136 or alex@mail.com"
}

Response samples

Content type
application/json
{
  • "kind": "Main",
  • "type": "Phone",
  • "value": "79122437136 or alex@mail.com",
  • "id": 12345,
  • "state": "string",
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Deleting a contact

Deletes the specified contact. Use this function with caution, since it allows deleting even the only phone number used for login/confirmation.

Authorizations:
core_Authorization
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{
  • "kind": "Main",
  • "type": "Phone",
  • "value": "79122437136 or alex@mail.com",
  • "id": 12345,
  • "state": "string",
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

List of contacts

Returns the list of contacts of the current customer.

Authorizations:
core_Authorization

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Creating a contact

Creates a new contact of the specified type. When a contact is created, a confirmation code is automatically sent to it.

In the case of Phone, an SMS message with the code is received, which must be specified in the endpoint for confirmation (see /confirm/contact/{id}).

In the case of Email, a link is sent to the email address; after following it, the email will be confirmed.

Authorizations:
core_Authorization
Request Body schema: application/json
required
kind
string
Enum: "Main" "Other"

Contact kind: Main (primary) and Other.

type
string
Enum: "Phone" "Email"

Contact type: Phone (mobile number) and Email (email address).

value
string

Contact value, i.e. a phone number or an email address.

Responses

Request samples

Content type
application/json
{
  • "kind": "Main",
  • "type": "Phone",
  • "value": "79122437136 or alex@mail.com"
}

Response samples

Content type
application/json
{
  • "kind": "Main",
  • "type": "Phone",
  • "value": "79122437136 or alex@mail.com",
  • "id": 12345,
  • "state": "string",
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Main contact

Sets this contact as the main one (kind = 'Main').

The main contact is used as the main communication channel:

  • main phone - used for sending one-time passwords (OTP)
  • main email - used as the main channel for delivering notifications.

Setting the main phone/email must be accompanied by a confirmation, which is performed by sending a one-time code to the current main phone number. The one-time code is used in the confirmation endpoint (see /confirm/contact/main/{id}).

If for some reason there is no main phone number, the contact immediately becomes Main.

Authorizations:
core_Authorization
path Parameters
id
required
string
Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "kind": "Main",
  • "type": "Phone",
  • "value": "79122437136 or alex@mail.com",
  • "id": 12345,
  • "state": "string",
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Customer Data API

Confirming an affiliate

Signs the affiliate's data model, after which it is activated.

Authorizations:
core_Authorization
path Parameters
id
required
string

Corporate entity identifier

Request Body schema: application/json
required
otp
string = 4 characters d{4}

One-time code value. Stored as a string to allow codes with leading zeros.

confirm_channel
string
Enum: "SMS" "TRUSTED" "EMAIL"

Channel used for confirmation:

  • SMS - the code is delivered via SMS
  • TRUSTED - a trusted channel is used when the platform itself verifies that a signature exists in the external signing system.
  • EMAIL - the code is delivered by email

Responses

Request samples

Content type
application/json
{
  • "otp": "0323",
  • "confirm_channel": "SMS"
}

Response samples

Content type
application/json
{
  • "is_organization_management": true,
  • "signature_type": 0,
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "phone_number": "string",
  • "relation_state": "string",
  • "customer": {
    },
  • "full_name": "string",
  • "nationality": {
    },
  • "document_type": {
    },
  • "document_number": "string",
  • "document_issue_date": "2004-12-17T00:00:00.000+00:00",
  • "document_expire_date": "2019-08-24T14:15:22Z",
  • "current_address": {
    },
  • "birth_date": "2019-08-24T14:15:22Z",
  • "gender": {
    },
  • "tax_id": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

List of affiliates

Returns the list of natural persons who are affiliates of the given corporate entity.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Corporate entity identifier

query Parameters
page
integer <int32>

Page number

per_page
string

Number of items per page

sort
string

Sorting

states
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Affiliate by ID

Returns the affiliate by the affiliate identifier (affiliate_id) — the id identifier in the affiliates list.

Authorizations:
core_Authorization
path Parameters
id
required
string

ID of the corporate customer

affId
required
string

Affiliate identifier

Responses

Response samples

Content type
application/json
{
  • "is_organization_management": true,
  • "signature_type": 0,
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "phone_number": "string",
  • "relation_state": "string",
  • "customer": {
    },
  • "full_name": "string",
  • "nationality": {
    },
  • "document_type": {
    },
  • "document_number": "string",
  • "document_issue_date": "2004-12-17T00:00:00.000+00:00",
  • "document_expire_date": "2019-08-24T14:15:22Z",
  • "current_address": {
    },
  • "birth_date": "2019-08-24T14:15:22Z",
  • "gender": {
    },
  • "tax_id": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Affiliate by customer ID

Returns the affiliate by the natural person's customer identifier (customer_id).

Authorizations:
core_Authorization
path Parameters
id
required
string

ID of the corporate customer

custId
required
string

Customer identifier of the affiliate (natural person)

Responses

Response samples

Content type
application/json
{
  • "is_organization_management": true,
  • "signature_type": 0,
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "phone_number": "string",
  • "relation_state": "string",
  • "customer": {
    },
  • "full_name": "string",
  • "nationality": {
    },
  • "document_type": {
    },
  • "document_number": "string",
  • "document_issue_date": "2004-12-17T00:00:00.000+00:00",
  • "document_expire_date": "2019-08-24T14:15:22Z",
  • "current_address": {
    },
  • "birth_date": "2019-08-24T14:15:22Z",
  • "gender": {
    },
  • "tax_id": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Corporate data by ID Deprecated

Returns the profile data of the corporate customer.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Customer ID

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "registration_number": "string",
  • "registration_date": "2019-08-24",
  • "registration_address": {
    },
  • "corporate_type": {
    },
  • "affiliates": [
    ],
  • "is_authorized": true,
  • "customer": {
    },
  • "tax_id": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Editing an affiliate

Modification of the affiliate's data (by phone number).

Authorizations:
core_Authorization
path Parameters
id
required
string

Corporate entity identifier

Request Body schema: application/json
required
is_organization_management
boolean

Flag of a fully authorized representative. true - the representative can sign documents, false - the representative cannot sign documents.

signature_type
integer

Integer signature type, e.g. 1 or 2

start_date
string <date>

Relationship start date

end_date
string <date>

Relationship end date

phone_number
string

Phone number, if the relationship was added via the role model bound to a phone number.

relation_state
string

Relationship type (affects the visibility and availability of the legal entity in the list of available customers):

  • Active - active relationship, the related customer is available;
  • New - "weak" relationship, used to access the Operator without the need to manage funds, and the related customer is not available in the customer list;
  • Inactive - inactive (revoked) relationship
object (Customer)

Related customer

full_name
string

Full name

object (core_Country)

Nationality

object

Identity document

document_number
string

Full number of the identity document

document_issue_date
string <date-time>

Identity document issue date

document_expire_date
string <date-time>

Identity document expiry date

object (core_Address)

Registration (residence) address

birth_date
string <date-time>

Date of birth

object
tax_id
string

Tax identifier (INN)

Responses

Request samples

Content type
application/json
{
  • "is_organization_management": true,
  • "signature_type": 0,
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "phone_number": "string",
  • "relation_state": "string",
  • "customer": {
    },
  • "full_name": "string",
  • "nationality": {
    },
  • "document_type": {
    },
  • "document_number": "string",
  • "document_issue_date": "2004-12-17T00:00:00.000+00:00",
  • "document_expire_date": "2019-08-24T14:15:22Z",
  • "current_address": {
    },
  • "birth_date": "2019-08-24T14:15:22Z",
  • "gender": {
    },
  • "tax_id": "string"
}

Response samples

Content type
application/json
{
  • "is_organization_management": true,
  • "signature_type": 0,
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "phone_number": "string",
  • "relation_state": "string",
  • "customer": {
    },
  • "full_name": "string",
  • "nationality": {
    },
  • "document_type": {
    },
  • "document_number": "string",
  • "document_issue_date": "2004-12-17T00:00:00.000+00:00",
  • "document_expire_date": "2019-08-24T14:15:22Z",
  • "current_address": {
    },
  • "birth_date": "2019-08-24T14:15:22Z",
  • "gender": {
    },
  • "tax_id": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Editing an affiliate

Modification of the affiliate's data (by phone number).

Authorizations:
core_Authorization
path Parameters
id
required
string

Corporate entity identifier

Request Body schema: application/json
required
is_organization_management
boolean

Flag of a fully authorized representative. true - the representative can sign documents, false - the representative cannot sign documents.

signature_type
integer

Integer signature type, e.g. 1 or 2

start_date
string <date>

Relationship start date

end_date
string <date>

Relationship end date

phone_number
string

Phone number, if the relationship was added via the role model bound to a phone number.

relation_state
string

Relationship type (affects the visibility and availability of the legal entity in the list of available customers):

  • Active - active relationship, the related customer is available;
  • New - "weak" relationship, used to access the Operator without the need to manage funds, and the related customer is not available in the customer list;
  • Inactive - inactive (revoked) relationship
object (Customer)

Related customer

full_name
string

Full name

object (core_Country)

Nationality

object

Identity document

document_number
string

Full number of the identity document

document_issue_date
string <date-time>

Identity document issue date

document_expire_date
string <date-time>

Identity document expiry date

object (core_Address)

Registration (residence) address

birth_date
string <date-time>

Date of birth

object
tax_id
string

Tax identifier (INN)

Responses

Request samples

Content type
application/json
{
  • "is_organization_management": true,
  • "signature_type": 0,
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "phone_number": "string",
  • "relation_state": "string",
  • "customer": {
    },
  • "full_name": "string",
  • "nationality": {
    },
  • "document_type": {
    },
  • "document_number": "string",
  • "document_issue_date": "2004-12-17T00:00:00.000+00:00",
  • "document_expire_date": "2019-08-24T14:15:22Z",
  • "current_address": {
    },
  • "birth_date": "2019-08-24T14:15:22Z",
  • "gender": {
    },
  • "tax_id": "string"
}

Response samples

Content type
application/json
{
  • "is_organization_management": true,
  • "signature_type": 0,
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "phone_number": "string",
  • "relation_state": "string",
  • "customer": {
    },
  • "full_name": "string",
  • "nationality": {
    },
  • "document_type": {
    },
  • "document_number": "string",
  • "document_issue_date": "2004-12-17T00:00:00.000+00:00",
  • "document_expire_date": "2019-08-24T14:15:22Z",
  • "current_address": {
    },
  • "birth_date": "2019-08-24T14:15:22Z",
  • "gender": {
    },
  • "tax_id": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Removing an affiliate

Removes the affiliate by phone number. Access is revoked immediately upon deletion.

Authorizations:
core_Authorization
path Parameters
id
required
string

Corporate entity identifier

phone
required
string

Affiliate's phone number

Responses

Response samples

Content type
application/json
{
  • "is_organization_management": true,
  • "signature_type": 0,
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "phone_number": "string",
  • "relation_state": "string",
  • "customer": {
    },
  • "full_name": "string",
  • "nationality": {
    },
  • "document_type": {
    },
  • "document_number": "string",
  • "document_issue_date": "2004-12-17T00:00:00.000+00:00",
  • "document_expire_date": "2019-08-24T14:15:22Z",
  • "current_address": {
    },
  • "birth_date": "2019-08-24T14:15:22Z",
  • "gender": {
    },
  • "tax_id": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Adding an affiliate

Adds a new affiliate to the corporate entity with or without the signing right. The affiliate is linked by the phone number specified in the phone_number field of the request body.

If the affiliate needs the right to sign documents and payments, the is_organization_management attribute must be set in the request model:

  • true - the signing right is required
  • false - the signing right is not required
Authorizations:
core_Authorization
path Parameters
id
required
string

Corporate entity identifier

Request Body schema: application/json
required
is_organization_management
boolean

Flag of a fully authorized representative. true - the representative can sign documents, false - the representative cannot sign documents.

signature_type
integer

Integer signature type, e.g. 1 or 2

start_date
string <date>

Relationship start date

end_date
string <date>

Relationship end date

phone_number
string

Phone number, if the relationship was added via the role model bound to a phone number.

relation_state
string

Relationship type (affects the visibility and availability of the legal entity in the list of available customers):

  • Active - active relationship, the related customer is available;
  • New - "weak" relationship, used to access the Operator without the need to manage funds, and the related customer is not available in the customer list;
  • Inactive - inactive (revoked) relationship
object (Customer)

Related customer

full_name
string

Full name

object (core_Country)

Nationality

object

Identity document

document_number
string

Full number of the identity document

document_issue_date
string <date-time>

Identity document issue date

document_expire_date
string <date-time>

Identity document expiry date

object (core_Address)

Registration (residence) address

birth_date
string <date-time>

Date of birth

object
tax_id
string

Tax identifier (INN)

Responses

Request samples

Content type
application/json
{
  • "is_organization_management": true,
  • "signature_type": 0,
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "phone_number": "string",
  • "relation_state": "string",
  • "customer": {
    },
  • "full_name": "string",
  • "nationality": {
    },
  • "document_type": {
    },
  • "document_number": "string",
  • "document_issue_date": "2004-12-17T00:00:00.000+00:00",
  • "document_expire_date": "2019-08-24T14:15:22Z",
  • "current_address": {
    },
  • "birth_date": "2019-08-24T14:15:22Z",
  • "gender": {
    },
  • "tax_id": "string"
}

Response samples

Content type
application/json
{
  • "is_organization_management": true,
  • "signature_type": 0,
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "phone_number": "string",
  • "relation_state": "string",
  • "customer": {
    },
  • "full_name": "string",
  • "nationality": {
    },
  • "document_type": {
    },
  • "document_number": "string",
  • "document_issue_date": "2004-12-17T00:00:00.000+00:00",
  • "document_expire_date": "2019-08-24T14:15:22Z",
  • "current_address": {
    },
  • "birth_date": "2019-08-24T14:15:22Z",
  • "gender": {
    },
  • "tax_id": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Initiating the addition of an affiliate

Initiating signing

Authorizations:
core_Authorization
path Parameters
id
required
string

Corporate entity identifier

Request Body schema: application/json
required
otp
string = 4 characters d{4}

One-time code value. Stored as a string to allow codes with leading zeros.

confirm_channel
string
Enum: "SMS" "TRUSTED" "EMAIL"

Channel used for confirmation:

  • SMS - the code is delivered via SMS
  • TRUSTED - a trusted channel is used when the platform itself verifies that a signature exists in the external signing system.
  • EMAIL - the code is delivered by email

Responses

Request samples

Content type
application/json
{
  • "otp": "0323",
  • "confirm_channel": "SMS"
}

Response samples

Content type
application/json
{
  • "is_organization_management": true,
  • "signature_type": 0,
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "phone_number": "string",
  • "relation_state": "string",
  • "customer": {
    },
  • "full_name": "string",
  • "nationality": {
    },
  • "document_type": {
    },
  • "document_number": "string",
  • "document_issue_date": "2004-12-17T00:00:00.000+00:00",
  • "document_expire_date": "2019-08-24T14:15:22Z",
  • "current_address": {
    },
  • "birth_date": "2019-08-24T14:15:22Z",
  • "gender": {
    },
  • "tax_id": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

List of corporate customers

Returns the list of corporate entities for the given natural person, where this natural person is an affiliate.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Natural person identifier

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Corporate data by ID Deprecated

Returns the profile data of the corporate customer.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Customer ID

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "registration_number": "string",
  • "registration_date": "2019-08-24",
  • "registration_address": {
    },
  • "corporate_type": {
    },
  • "affiliates": [
    ],
  • "is_authorized": true,
  • "customer": {
    },
  • "tax_id": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Corporate data by ID

Returns the profile data of the corporate customer, but with a limited number of affiliates — no more than 5.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Customer ID

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "registration_number": "string",
  • "registration_date": "2019-08-24",
  • "registration_address": {
    },
  • "corporate_type": {
    },
  • "affiliates": [
    ],
  • "is_authorized": true,
  • "customer": {
    },
  • "tax_id": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Corporate data by ID

Returns the profile data of the corporate customer, but with a limited number of affiliates — no more than 5.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Customer ID

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "registration_number": "string",
  • "registration_date": "2019-08-24",
  • "registration_address": {
    },
  • "corporate_type": {
    },
  • "affiliates": [
    ],
  • "is_authorized": true,
  • "customer": {
    },
  • "tax_id": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Accounts API

Accounts of the current customer Deprecated

Returns all accounts that are available for the current customer.

The legacy operation answers with the account envelope: the list is returned under the "account" name together with the response code.

Authorizations:
core_Authorization

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "description": "string",
  • "page": 5,
  • "per_page": 100,
  • "total": 0,
  • "account": [
    ]
}

Get an account by ID

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Account identifier

Responses

Response samples

Content type
application/json
{
  • "currency": {
    },
  • "balance": 1234.56,
  • "estimated": 1235.55,
  • "ledger": 120.03,
  • "last_business_day": 0,
  • "business_day": "2019-08-24",
  • "limit": 0,
  • "minimum_amount": 0,
  • "type": "Common",
  • "coa": "Client",
  • "product_id": "string",
  • "customer": {
    },
  • "externals": [
    ],
  • "last_operation": "2019-08-24T14:15:22Z",
  • "modes": [
    ],
  • "id": 12345,
  • "state": "string",
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_changed": "2022-12-07T14:03:32.659+00:00",
  • "description": "string",
  • "state_info": "string"
}

Modify an account

Allows modifying the description attribute of the given account.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Account identifier

Request Body schema: application/json
required
object (core_Asset)

Account currency

last_business_day
number

Balance as of the last closed business day.

business_day
string <date>

Date of the last closed business day.

limit
number

Minimum balance that must be kept on the account

minimum_amount
number

Minimum top-up amount

type
string
Enum: "Common" "Loan" "Deposit" "Escrow"

Account type

object (core_Customer)

Account owner

Array of objects

Account details in the accounting system of an external provider.

modes
Array of strings
Items Enum: "inward" "outward"

Account modes:

  • inward - inbound transactions are allowed
  • outward - outbound transactions are allowed
description
string

Custom textual name of the account, e.g. "Checking account"

Responses

Request samples

Content type
application/json
{
  • "currency": {
    },
  • "last_business_day": 0,
  • "business_day": "2019-08-24",
  • "limit": 0,
  • "minimum_amount": 0,
  • "type": "Common",
  • "customer": {
    },
  • "externals": [
    ],
  • "modes": [
    ],
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "currency": {
    },
  • "balance": 1234.56,
  • "estimated": 1235.55,
  • "ledger": 120.03,
  • "last_business_day": 0,
  • "business_day": "2019-08-24",
  • "limit": 0,
  • "minimum_amount": 0,
  • "type": "Common",
  • "coa": "Client",
  • "product_id": "string",
  • "customer": {
    },
  • "externals": [
    ],
  • "last_operation": "2019-08-24T14:15:22Z",
  • "modes": [
    ],
  • "id": 12345,
  • "state": "string",
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_changed": "2022-12-07T14:03:32.659+00:00",
  • "description": "string",
  • "state_info": "string"
}

Initiate closure

Initiates the signing of the account closure application.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Account identifier

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Initiate closure

Initiates the signing of the account closure application.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Account identifier

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Confirm closure

Confirms the account closure application.

Authorizations:
core_Authorization
path Parameters
id
required
string

Account identifier

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Accounts of the given customer

This function allows retrieving the list of accounts of any available customer, not necessarily the current one.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Customer identifier

query Parameters
states
string

Account states

page
integer <int32>

Page number

per_page
integer <int32>

Items per page

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Accounts of the current customer

Returns the list of open (active) accounts of the current customer.

Authorizations:
core_Authorization

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Account statement

Generates the account statement for the given date range. If the start and end dates are not specified, only the statement for the current day is returned.

The operation date is the date of debit/credit in the provider's balance.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Account identifier

query Parameters
start
string

Start date

end
string

End date

group
boolean

Whether grouping by days is required (true) or not (false)

Responses

Response samples

Content type
application/json
[
  • { }
]

Accounts of the given customer

This function allows retrieving the list of accounts of any available customer, not necessarily the current one.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Customer identifier

query Parameters
states
string

Account states

page
integer <int32>

Page number

per_page
integer <int32>

Items per page

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Blockades of the current customer

Returns the list of all active blockades set for the current customer.

Authorizations:
bank_Authorization

Responses

Response samples

Content type
application/json
{
  • "amount": 12453.23,
  • "account": {
    },
  • "description": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Blockades of the given customer

Returns the list of blockades for the specified customer.

Authorizations:
bank_Authorization
path Parameters
id
required
integer <int32>

Customer identifier

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Limits API

Customer limits

Retrieves the list of limits applied to the given customer.

Authorizations:
core_Authorization
path Parameters
id
required
number

Customer ID

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Limits of the current customer

Returns the list of limits of the current customer.

Authorizations:
core_Authorization

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Russia-Specific Transaction Attributes and Settings

In this section we look at transaction attributes and settings suitable for the banking operation scenarios adopted in Russia.

Transaction parameter settings

Typical scenarios of building payment transactions are considered below.

Payment to a counterparty by arbitrary details

Example of filling in the fields when building a payment to a counterparty in Russia:

{
  "amount": "1500.00", // Payment amount
  "related_currency" : {
    "asset_id" : "RUB" // Currency code for the recipient amount
  },
  "account": {  // Pass the AccountModel account model, at least 'id'
    "id" : ....
  },
  "transaction_type" : "External", // Outside our bank
  "external_channel" : "BankAccount", // Payment by bank account number
  "channel_id" : "ACH", // Send to the interbank system
  "details" : "Payment for goods and services under invoice No. 12. VAT excluded", // Payment purpose
  "attrs" : {
    "bank.code" : ["044525593"], // Bank code - BIC in this case
    "bank.code_type" : ["LOCAL"], // Bank code type
    "bank.account_number" : ["40802810000000000001"], // Recipient account number
    "bank.account_owner_name" : ["Sole proprietor Alexey Petrovich Romanchuk"], // Recipient name
    "bank.tax_id" : ["666202467724"], // Recipient TIN
    "bank.seq_no" : ["1"], // Payment order sequence number
    "bank.ru.priority" : ["5"], // Payment priority (21)
    "bank.ru.tax_kpp" : ["0"], // Recipient KPP, or 0 or empty if none
    "bank.ru.purpose" : ["1"] // Payment purpose code (20)
  }
}

For the account field, the account model must be set; at minimum it must contain the account object's id.

Payments to another bank by details formally mean an external (External) payment for us, while we use the ACH (Automated Clearing House) channel, which means the payment goes to the interbank settlement system adopted in the country — in Russia this is the Bank of Russia settlement centre.

Fields specific to an interbank transfer are placed as transaction attributes (attrs). They include both general interbank payment parameters and fields specific to the Russian banking system (bank.ru.*).

Budget payment

Payments to the budget require additional fields to be filled in the additional attributes section (attrs).

Example of filling in the fields when building a payment to a counterparty in Russia:

{
  "amount": "1500.00", // Payment amount
  "related_currency" : {
    "asset_id" : "RUB" // Currency code for the recipient amount
  },
  "account": {  // Pass the AccountModel account model, at least 'id'
    "id" : ....
  },
  "transaction_type" : "External", // Outside our bank
  "external_channel" : "BankAccount", // Payment by bank account number
  "channel_id" : "ACH", // Send to the interbank system
  "details" : "Compulsory pension insurance contributions", // Payment purpose
  "attrs" : {
    "bank.code" : ["016577551"], // Bank code - BIC in this case
    "bank.code_type" : ["LOCAL"], // Bank code type
    "bank.account_number" : ["03100643000000016200"], // Recipient account number
    "bank.account_owner_name" : ["UFK for the Sverdlovsk Region (IFNS No. 31)"],
    "bank.tax_id" : ["6685000017"], // Recipient TIN
    "bank.seq_no" : ["2"], // Payment order sequence number
    "bank.ru.priority" : ["5"], // Payment priority (21)
    "bank.ru.tax_kpp" : ["668501001"], // Recipient KPP, or 0 or empty if none
    // Budget payment specific fields
    "bank.ru.gvt_status" : ["13"], // Payer status (101)
    "bank.ru.gvt_kbk" : ["18210202140061110160"], // KBK (104)
    "bank.ru.gvt_okato" : ["65701000"], // OKTMO (105)
    "bank.ru.gvt_reason" : ["ТП"], // Payment basis (106)
    "bank.ru.gvt_period" : ["КВ.04.2022"], // Tax period (107)
    "bank.ru.gvt_reason_doc_num" : ["0"], // Document number (108)
    "bank.ru.gvt_reason_doc_date" : ["0"], // Document date (109)
    "bank.ru.gvt_uin" : ["0"], // UIN/UIP (22)
  }
}

Transfer between own accounts

If a transaction has to be built for a transfer between one's own accounts, the model is fairly simple:

{
  "amount": "1500.00", // Payment amount
  "account": {  // Pass the AccountModel account model, at least 'id'
    "id" : ....
  },
  "related_account": {  // Pass the AccountModel account model, at least 'id'
    "id" : ....
  },
  "transaction_type" : "Transfer", // Between own accounts
  "details" : "Transfer between own accounts. VAT excluded", // Payment purpose
}

By default, transfers between own accounts do not require signing, so the operation is in fact submitted for execution at the signing stage:

{
  "method": "PUT",
  "url": "/api/v1/transactions/{id}/sign"
}

Payment to a customer of the same bank by account number

Payment to a customer of the same bank by phone number

SBP payment to the specified phone number

Russia-specific payment order attributes

Let us list the payment order fields used in the Russian banking sector. In the comment column, the numbers in brackets indicate the field numbers in the printed form of the payment order.

For more detailed filling rules, see, for example, here

Field name Comment Allowed values
bank.ru.priority Priority (21) Values 1-5, default 5
bank.ru.tax_kpp Recipient KPP (103) May be omitted, or set to 0
bank.ru.purpose Payment purpose code (20) If filled in, values 1-5
bank.code Recipient bank BIC (14) Value taken from the bank reference
bank.account_number Recipient account number (15) 20 characters
bank.account_owner_name Recipient name (16) 160 characters
bank.tax_id Recipient TIN (61) 10 or 12 characters, 0 allowed
bank.seq_no Document number (3) Payment order sequence number
details Payment purpose (24) 250 characters, including tax information
amount Amount (7) Rubles and kopecks are specified
bank.ru.doc_date Document date format: YYYY-MM-DD
bank.ru.reg_date Date received by the payer's bank format: YYYY-MM-DD
bank.ru.debit_date Date debited at the payer's bank format: YYYY-MM-DD
Budget fields
bank.ru.gvt_status Payer status (101) 2 characters, for example '01' or '13'. '00' may be set if the payment is not to the budget
bank.ru.gvt_kbk KBK (budget classification code) (104) 20 characters
bank.ru.gvt_okato OKTMO (105) 8 or 11 characters, '0' allowed
bank.ru.gvt_reason Payment basis (106) 2 characters or '0'
bank.ru.gvt_period Payment basis (107) 10 characters or '0'
bank.ru.gvt_reason_doc_num Document number (108) '0' allowed
bank.ru.gvt_reason_doc_date Document date (109) '0' allowed
bank.ru.gvt_uin UIN/UIP code (22) '0' allowed

Transaction Life Cycle

In this article we look in more detail at the possible base states of financial transactions, as well as at the transitions between them.

Financial transactions have several base states:

State Description
New just created
Draft draft
Validated fully validated
Unconfirmed signing started but not completed
Confirmed fully confirmed, submitted for execution
Completed completed successfully
Cancelled completed unsuccessfully or cancelled

Finer distinctions, where needed, are governed by the value of the sub_state field, which may take different project-specific values.

  1. When a transaction is created
{
  "method": "POST",
  "url": "/api/v1/transactions"
}

a transaction is always created in the New state; if the customer already had a transaction in that state, it is overwritten.

  1. Next, if the user needs to save changes to the transaction, the following method is called
{
  "method": "PUT",
  "url": "/api/v1/transactions/{id}"
}

and once the transaction data is saved, the transaction moves to the Draft state (i.e. a full-fledged draft).

  1. Once the transaction data is fully prepared, it can be submitted for validation:
{
  "method": "PUT",
  "url": "/api/v1/transactions/{id}/validate"
}

if validation succeeds, the transaction moves to the Validated state. Validation checks all the rules the transaction must satisfy.

  1. A validated transaction can be signed using the following endpoint:
{
  "method": "PUT",
  "url": "/api/v1/transactions/{id}/sign"
}

See the signing article for details. As a result of starting the signing, the transaction moves to the Unconfirmed state and waits for the signature to be confirmed.

  1. Confirming the signature via SMS is done by submitting the transaction model with a one-time code inside, using the following function:
{
  "method": "PUT",
  "url": "/api/v1/confirm/transaction/{id}"
}

If signing succeeds and no signatures from other people are required, the transaction moves to the Confirmed state and is submitted for execution.

If the transaction is signed through some third-party channel (for example, USSD or dedicated cloud-signature facilities), nothing needs to be passed through the API: the transaction moves to the Confirmed state once confirmation from the respective channel is received.

  1. Once execution completes, the transaction moves to the Completed state. If an error occurs during execution or the transaction is cancelled, the state becomes Cancelled. In that case the state_info field contains the reason for the error or rejection, if it can be communicated to the customer.

Fast Payments

Many countries currently have their own local so-called fast payment systems, as a rule by the recipient's phone number or by a company's business details. Such payment systems speed up payments primarily for individuals and remove the monopoly of any single large bank in the area of retail remittances.

Fast payment support in the DWD Platform

From the DWD platform's point of view, a fast payment, for example by phone number, is just one of the transaction varieties, but it has some specifics:

An SBP transaction requires preliminary online validation (see below) in order to obtain the missing details, for example the recipient's name, as well as the transaction identifier in SBP for its subsequent execution.

Filling in the transaction model

Below is an example of filling in the transaction fields.

{
  "details" : "Fast payouts",
  "amount" : 100,
  "account" : {...},
  "related_currency" : {...},
  "destination" : "79122437136",
  "destination_type" : "Phone",
  "direction" : 0,
  "transaction_type" : "External",
  "external_channel" : "PSP",
  "channel_id" : "FASTPAY",
  "attrs" : {
    "bank.ru.purpose" : [ "1" ],
    "bank.code" : [ "100000000090" ],
    "bank.type" : [ "FASTPAY" ],
    "bank.account_owner_name" : [ "Alexey Petrovich R." ],
    "bank.fastpay.operation_id" : [ "A4138195651810010000020011250501" ],
    "bank.fastpay.code" : [ "046551854" ],
    "bank.fastpay.type" : [ "LOCAL" ],
    "bank.fastpay.account_number" : [ "40817217434697816591" ],
    "bank.fastpay.tax_id": ["859194748488"]
  }
}

As can be seen in the example, a fast payment transaction is identified as a PSP transaction with the FASTPAY code. In the additional attributes we also specify the recipient bank's code and the code type (in this case also FASTPAY, to identify it specifically as a fast payment code).

The recipient's phone number is specified in the destination field, and the recipient type destination_type must in this case be set to Phone, to indicate that the payment is by phone number.

If required, the payment purpose code can be specified (bank.ru.purpose). Also, when executing the transaction, some additional fields must be set (see the bank.fastpay. attributes), in particular bank.fastpay.operation_id, which is the identifier of the operation in SBP. All these parameters can be obtained after performing online validation.

Online validation

Online validation is needed to be able to obtain information about the recipient of the funds, as well as to obtain the missing transaction details, for example the bank's BIC. Online validation also returns the operation identifier in SBP, which must then be supplied when sending the transaction for execution.

The convenience of such preliminary validation is that it can be performed without the need to create the transaction itself beforehand.

For this purpose the preliminary validation function can be used

{
  "method": "POST",
  "url": "/api/v1/transactions/validate"
}

by passing the transaction model to it:

{
  "details" : "Fast payouts",
  "amount" : 100,
  "account" : {...},
  "related_currency" : {...},
  "destination" : "79122437136",
  "destination_type" : "Phone",
  "direction" : 0,
  "transaction_type" : "External",
  "external_channel" : "PSP",
  "channel_id" : "FASTPAY",
  "attrs" : {
    "bank.ru.purpose" : [ "1" ],
    "bank.code" : [ "100000000090" ],
    "bank.type" : [ "FASTPAY" ],
  }
}

If the transaction is a fast payment system transaction, then in addition to the usual validation an online validation is performed with a request to the SBP system, and on success the function returns the validated transaction model with the missing fields filled in as well. The original data set returned by SBP during validation is placed inside the raw structure. Example response:

{
  "code" : 0,
  "details" : "Fast payouts",
  "amount" : 100,
  "account" : {...},
  "related_currency" : {...},
  "destination" : "79122437136",
  "destination_type" : "Phone",
  "direction" : 0,
  "transaction_type" : "External",
  "external_channel" : "PSP",
  "channel_id" : "FASTPAY",
  "attrs" : {
    "bank.ru.purpose" : [ "1" ],
    "bank.code" : [ "100000000090" ],
    "bank.type" : [ "FASTPAY" ],
    "bank.account_owner_name" : [ "Alexey Petrovich R." ],
    "bank.fastpay.operation_id" : [ "A4138195651810010000020011250501" ],
    "bank.fastpay.code" : [ "046551854" ],
    "bank.fastpay.type" : [ "LOCAL" ],
    "bank.fastpay.account_number" : [ "40817217434697816591" ],
    "bank.fastpay.tax_id": ["859194748488"]
  },
  "raw" : {
    "operationStatus" : "RCVD",
    "payeeAccountNumber" : "40817217434697816591",
    "payeeFirstName" : "Ivan",
    "payeeLastName" : "A",
    "responseCodeDescription" : "OK",
    "payeePam" : "Ivan A.",
    "responseCode" : "I00000",
    "payeeAddress" : "12 Patrice Lumumba St",
    "payeeMidName" : "Ivanovich",
    "payeeBankBic" : "046551854",
    "operationId" : "A4138195651810010000020011250501",
    "payeeInn" : "859194748488",
    "fraudStatus" : "G"
  }
}

Here, for convenience, part of the data is already substituted into the transaction model (in the bank.fastpay. attributes), so that the transaction can be sent for execution straight away. The SBP transaction code is placed in the bank.fastpay.operation_id field.

Transactions API

Confirm signing of a transaction batch

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Batch identifier

Request Body schema: application/json
required
Array of objects (AbstractObject)
otp
string = 4 characters d{4}

One-time code value. Stored as a string to allow codes with leading zeros.

confirm_channel
string
Enum: "SMS" "TRUSTED" "EMAIL"

Channel used for confirmation:

  • SMS - the code is delivered via SMS
  • TRUSTED - a trusted channel is used when the platform itself verifies that a signature exists in the external signing system.
  • EMAIL - the code is delivered by email

Responses

Request samples

Content type
application/json
{
  • "entities": [
    ],
  • "otp": "0323",
  • "confirm_channel": "SMS"
}

Response samples

Content type
application/json
{
  • "entities": [
    ],
  • "otp": "0323",
  • "otp_num": 0,
  • "otp_time": "2019-08-24T14:15:22Z",
  • "confirm_channel": "SMS"
}

Confirm signing

If a transaction is signed with a one-time code, this function allows specifying the code in the transaction body and sending the signature for validation.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Transaction identifier

Request Body schema: application/json
required
details
string

Transaction description (purpose)

amount
number >= 0

Transaction amount on the main account

related_amount
number >= 0

Amount on the other side of the transaction

object (core_Account)

Main account of the transaction

object (core_Account)

Account on the other side of the transaction

object (core_Asset)

Currency (asset) on the other side of the transaction

related_name
string

Counterparty name

destination
string

Recipient address value (if destination_type is set)

destination_type
string
Enum: "External" "Phone" "Email"

Recipient address type (for instant transactions)

direction
string <int32>
Default: 0
Enum: "0" "1"

Transaction direction: 0 - outgoing, 1 - incoming

transaction_type
string
Enum: "External" "Default" "Transfer" "Unregistered"

Transaction type. External - a transaction outside the current financial institution; Default - a transaction within the financial institution, Transfer - an operation between own accounts; Unregistered - a payment to a non-customer with an invitation to join.

external_channel
string
Enum: "BankAccount" "Card" "PSP"

Type of external channel used to send the transaction: BankAccount - payment to a bank account, Card - payment to a card or top-up from a card; PSP - an operation through an external payment system.

id_parent
integer <int64> >= 0

Parent transaction identifier

Array of objects

List of fees charged when the transaction is executed.

channel_id
string

External channel identifier, e.g. Stripe, SBP, etc.

executed
string <date-time>

Date/time the transaction was accepted for execution.

sub_type
string

Custom transaction subtype

sub_state
string

Custom additional transaction state

category
string

Special custom transaction category

origin
string

Transaction origin - a conventional attribute indicating the source of the transaction (e.g. when the transaction was imported from somewhere).

parent_object_id
integer <int64>

Identifier of the parent object on which the transaction was based.

parent_object_type
string

Type of the parent object that produced the transaction. E.g. "Transaction".

object (core_Attributable)

An attribute set is an object whose fields are arrays of values.

Multiple attributes can hold several values sorted in order. If an attribute has only one value, it is still represented as an array with a single element.

Responses

Request samples

Content type
application/json
{
  • "details": "string",
  • "amount": 12345.93,
  • "related_amount": 0,
  • "account": {
    },
  • "related_account": {
    },
  • "related_currency": {
    },
  • "related_name": "string",
  • "destination": "string",
  • "destination_type": "External",
  • "direction": "0",
  • "transaction_type": "External",
  • "external_channel": "BankAccount",
  • "id_parent": 0,
  • "fees": [
    ],
  • "channel_id": "string",
  • "executed": "2019-08-24T14:15:22Z",
  • "sub_type": "string",
  • "sub_state": "string",
  • "category": "string",
  • "origin": "string",
  • "parent_object_id": 0,
  • "parent_object_type": "string",
  • "attrs": {
    }
}

Response samples

Content type
application/json
{
  • "details": "string",
  • "amount": 12345.93,
  • "related_amount": 0,
  • "account": {
    },
  • "related_account": {
    },
  • "related_currency": {
    },
  • "related_name": "string",
  • "destination": "string",
  • "destination_type": "External",
  • "direction": "0",
  • "transaction_type": "External",
  • "exchange_rate": 72.1078,
  • "external_channel": "BankAccount",
  • "id_parent": 0,
  • "fees": [
    ],
  • "channel_id": "string",
  • "executed": "2019-08-24T14:15:22Z",
  • "sub_type": "string",
  • "sub_state": "string",
  • "category": "string",
  • "origin": "string",
  • "registry_type": 1,
  • "registry_remainder": 0,
  • "parent_object_id": 0,
  • "parent_object_type": "string",
  • "attrs": {
    },
  • "state": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Number of drafts

Returns the number of transaction drafts for the given customer. For the current customer there is a simplified form of the function: '/v1/transactions/drafts/count'.

Authorizations:
core_Authorization
path Parameters
id
required
string

Customer identifier

query Parameters
origin
string

Code of the system that originated the transaction

Responses

Response samples

Content type
application/json
{
  • "details": "string",
  • "amount": 12345.93,
  • "related_amount": 0,
  • "account": {
    },
  • "related_account": {
    },
  • "related_currency": {
    },
  • "related_name": "string",
  • "destination": "string",
  • "destination_type": "External",
  • "direction": "0",
  • "transaction_type": "External",
  • "exchange_rate": 72.1078,
  • "external_channel": "BankAccount",
  • "id_parent": 0,
  • "fees": [
    ],
  • "channel_id": "string",
  • "executed": "2019-08-24T14:15:22Z",
  • "sub_type": "string",
  • "sub_state": "string",
  • "category": "string",
  • "origin": "string",
  • "registry_type": 1,
  • "registry_remainder": 0,
  • "parent_object_id": 0,
  • "parent_object_type": "string",
  • "attrs": {
    },
  • "state": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

List of transactions

Returns the list of transactions of the customer specified by the id identifier. If the from parameter is not specified, transactions for the last 6 months are taken. If to is not specified, transactions up to the current day inclusive are taken. Both parameters support both an ISO date (for example, 2020-03-20) and an ISO date/time with or without a time zone. If no time zone is specified, the time is interpreted in the time zone of the financial organization.

If the transactions of the current customer are required, the shortened form /v1/transactions can be used.

Besides the search by all indexed attributes via the ?q= parameter, a search by additional parameters is available: amount, details, direction, related_name.

A search by additional attributes is also supported, the parameter format is: attrs.XXXXX, for example, ?attrs.bank.seq_no=5 (search by the document number).

Authorizations:
core_Authorization
path Parameters
id
required
string

Customer identifier

query Parameters
page
integer <int32>

Page number

per_page
integer <int32>

Number of items per page

sort
string

Sort order by the executed field ("-" for descending, "+" for ascending)

from
string

Date from which transactions should be shown (default: 6 months, starting from 00:00:00 in the time zone of the financial organization)

to
string

Date up to which transactions should be shown (default: the current date inclusive until 23:59:59 in the time zone of the financial organization)

direction
integer <int32>

Filtering of transactions into incoming and outgoing

q
string

Search inside the counterparty name, payment purpose and details

amount
number

Search by amount

related_name
string

Search by the counterparty name

details
string

Search by the operation purpose

attrs.*
string

Search by arbitrary additional attributes

account
integer <int32>

Account identifier

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get the list of drafts

Returns the list of drafts of the current customer. If the drafts of the current customer are required, the simplified function /v1/transactions/drafts can be used.

Authorizations:
core_Authorization
path Parameters
id
required
string

Customer identifier

query Parameters
page
integer <int32>

Page number

per_page
integer <int32>

Number of items per page

sort
string

Sort direction by the created field

origin
string

Draft source

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Delete drafts

Deletes ALL drafts of the given customer.

Authorizations:
core_Authorization
path Parameters
id
required
string

Customer identifier

Responses

Response samples

Content type
application/json
{ }

Number of drafts

Returns the number of transaction drafts for the given customer. For the current customer there is a simplified form of the function: '/v1/transactions/drafts/count'.

Authorizations:
core_Authorization
path Parameters
id
required
string

Customer identifier

query Parameters
origin
string

Code of the system that originated the transaction

Responses

Response samples

Content type
application/json
{
  • "details": "string",
  • "amount": 12345.93,
  • "related_amount": 0,
  • "account": {
    },
  • "related_account": {
    },
  • "related_currency": {
    },
  • "related_name": "string",
  • "destination": "string",
  • "destination_type": "External",
  • "direction": "0",
  • "transaction_type": "External",
  • "exchange_rate": 72.1078,
  • "external_channel": "BankAccount",
  • "id_parent": 0,
  • "fees": [
    ],
  • "channel_id": "string",
  • "executed": "2019-08-24T14:15:22Z",
  • "sub_type": "string",
  • "sub_state": "string",
  • "category": "string",
  • "origin": "string",
  • "registry_type": 1,
  • "registry_remainder": 0,
  • "parent_object_id": 0,
  • "parent_object_type": "string",
  • "attrs": {
    },
  • "state": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Registry

Returns the list of transactions that are in the registry (1 or 2) and belong to the customer specified by the id identifier.

If the list of transactions of the current customer is required, the shortened endpoint /v1/transactions/registry can be used.

Authorizations:
core_Authorization
path Parameters
id
required
string
query Parameters
sort
string

Sorting by creation date

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Reserves

Returns the list of reserves (for example, card holds) that belong to the customer specified by the id identifier.

Authorizations:
core_Authorization
path Parameters
id
required
string

Customer identifier

query Parameters
sort
string

Sorting by execution date

page
string

Page number

per_page
string

Number of items per page

Responses

Response samples

Content type
application/json
[
  • { }
]

Entry identifiers

Returns the list of entry identifiers linked to the given object. For example, type can be Transaction and the identifier can be the identifier of a transaction in the Platform.

Authorizations:
core_Authorization
path Parameters
id
required
string

Object identifier

type
required
string

Object type

Responses

Response samples

Content type
application/json
{
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Event history

Returns the list of events that happened to the transaction with the specified id identifier.

Authorizations:
core_Authorization
path Parameters
id
required
string
type
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Reverse entries

This operation allows cancelling the specified entries. Cancelling all entries leads to the automatic cancellation of the whole transaction.

Authorizations:
core_Authorization
Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Create a transaction

Authorizations:
core_Authorization
Request Body schema: application/json
required
details
string

Transaction description (purpose)

amount
number >= 0

Transaction amount on the main account

related_amount
number >= 0

Amount on the other side of the transaction

object (core_Account)

Main account of the transaction

object (core_Account)

Account on the other side of the transaction

object (core_Asset)

Currency (asset) on the other side of the transaction

related_name
string

Counterparty name

destination
string

Recipient address value (if destination_type is set)

destination_type
string
Enum: "External" "Phone" "Email"

Recipient address type (for instant transactions)

direction
string <int32>
Default: 0
Enum: "0" "1"

Transaction direction: 0 - outgoing, 1 - incoming

transaction_type
string
Enum: "External" "Default" "Transfer" "Unregistered"

Transaction type. External - a transaction outside the current financial institution; Default - a transaction within the financial institution, Transfer - an operation between own accounts; Unregistered - a payment to a non-customer with an invitation to join.

external_channel
string
Enum: "BankAccount" "Card" "PSP"

Type of external channel used to send the transaction: BankAccount - payment to a bank account, Card - payment to a card or top-up from a card; PSP - an operation through an external payment system.

id_parent
integer <int64> >= 0

Parent transaction identifier

Array of objects

List of fees charged when the transaction is executed.

channel_id
string

External channel identifier, e.g. Stripe, SBP, etc.

executed
string <date-time>

Date/time the transaction was accepted for execution.

sub_type
string

Custom transaction subtype

sub_state
string

Custom additional transaction state

category
string

Special custom transaction category

origin
string

Transaction origin - a conventional attribute indicating the source of the transaction (e.g. when the transaction was imported from somewhere).

parent_object_id
integer <int64>

Identifier of the parent object on which the transaction was based.

parent_object_type
string

Type of the parent object that produced the transaction. E.g. "Transaction".

object (core_Attributable)

An attribute set is an object whose fields are arrays of values.

Multiple attributes can hold several values sorted in order. If an attribute has only one value, it is still represented as an array with a single element.

Responses

Request samples

Content type
application/json
{
  • "details": "string",
  • "amount": 12345.93,
  • "related_amount": 0,
  • "account": {
    },
  • "related_account": {
    },
  • "related_currency": {
    },
  • "related_name": "string",
  • "destination": "string",
  • "destination_type": "External",
  • "direction": "0",
  • "transaction_type": "External",
  • "external_channel": "BankAccount",
  • "id_parent": 0,
  • "fees": [
    ],
  • "channel_id": "string",
  • "executed": "2019-08-24T14:15:22Z",
  • "sub_type": "string",
  • "sub_state": "string",
  • "category": "string",
  • "origin": "string",
  • "parent_object_id": 0,
  • "parent_object_type": "string",
  • "attrs": {
    }
}

Response samples

Content type
application/json
{
  • "details": "string",
  • "amount": 12345.93,
  • "related_amount": 0,
  • "account": {
    },
  • "related_account": {
    },
  • "related_currency": {
    },
  • "related_name": "string",
  • "destination": "string",
  • "destination_type": "External",
  • "direction": "0",
  • "transaction_type": "External",
  • "exchange_rate": 72.1078,
  • "external_channel": "BankAccount",
  • "id_parent": 0,
  • "fees": [
    ],
  • "channel_id": "string",
  • "executed": "2019-08-24T14:15:22Z",
  • "sub_type": "string",
  • "sub_state": "string",
  • "category": "string",
  • "origin": "string",
  • "registry_type": 1,
  • "registry_remainder": 0,
  • "parent_object_id": 0,
  • "parent_object_type": "string",
  • "attrs": {
    },
  • "state": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

List of transactions by account

Returns the list of transactions for a specific account.

Authorizations:
core_Authorization
path Parameters
id
required
string
query Parameters
page
integer <int32>

Page number

per_page
integer <int32>

Number of items per page

sort
string

Sort order by the executed field

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a batch of drafts

Creates a batch of drafts based on a list of transaction models.

Authorizations:
core_Authorization
Request Body schema: application/json
required
Array of objects (AbstractObject)
otp
string = 4 characters d{4}

One-time code value. Stored as a string to allow codes with leading zeros.

confirm_channel
string
Enum: "SMS" "TRUSTED" "EMAIL"

Channel used for confirmation:

  • SMS - the code is delivered via SMS
  • TRUSTED - a trusted channel is used when the platform itself verifies that a signature exists in the external signing system.
  • EMAIL - the code is delivered by email

Responses

Request samples

Content type
application/json
{
  • "entities": [
    ],
  • "otp": "0323",
  • "confirm_channel": "SMS"
}

Response samples

Content type
application/json
{
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Initialize batch signing

The function accepts a list of transactions (see Batch) and the resulting model returns the batch identifier which is used later for confirming the batch. In fact, the batch identifier is the identifier of the first transaction in the list.

The attributes of the Batch model will contain attributes showing the total amount of transactions grouped by currency, for example:

    "id" : 1234567,
...
    "attrs": {
        "total.amount" : [200.00, 15.02],
        "total.currency" : ["RUB", "USD"],
        "total.asset" : ["4031931d353f4f0aa1c50bcd679b7496", "2124e68736bc4cd1be359372fed5f101"]
    }
....

The total.asset attribute contains the identifiers of currencies/assets.

Authorizations:
core_Authorization
Request Body schema: application/json
required
Array of objects (AbstractObject)
otp
string = 4 characters d{4}

One-time code value. Stored as a string to allow codes with leading zeros.

confirm_channel
string
Enum: "SMS" "TRUSTED" "EMAIL"

Channel used for confirmation:

  • SMS - the code is delivered via SMS
  • TRUSTED - a trusted channel is used when the platform itself verifies that a signature exists in the external signing system.
  • EMAIL - the code is delivered by email

Responses

Request samples

Content type
application/json
{
  • "entities": [
    ],
  • "otp": "0323",
  • "confirm_channel": "SMS"
}

Response samples

Content type
application/json
{
  • "entities": [
    ],
  • "otp": "0323",
  • "otp_num": 0,
  • "otp_time": "2019-08-24T14:15:22Z",
  • "confirm_channel": "SMS"
}

Get transaction by ID

Returns the transaction data by the given identifier.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Transaction identifier

Responses

Response samples

Content type
application/json
{
  • "details": "string",
  • "amount": 12345.93,
  • "related_amount": 0,
  • "account": {
    },
  • "related_account": {
    },
  • "related_currency": {
    },
  • "related_name": "string",
  • "destination": "string",
  • "destination_type": "External",
  • "direction": "0",
  • "transaction_type": "External",
  • "exchange_rate": 72.1078,
  • "external_channel": "BankAccount",
  • "id_parent": 0,
  • "fees": [
    ],
  • "channel_id": "string",
  • "executed": "2019-08-24T14:15:22Z",
  • "sub_type": "string",
  • "sub_state": "string",
  • "category": "string",
  • "origin": "string",
  • "registry_type": 1,
  • "registry_remainder": 0,
  • "parent_object_id": 0,
  • "parent_object_type": "string",
  • "attrs": {
    },
  • "state": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Modify a draft

Modifies a transaction (only for drafts in the New, Draft and Validated states) without changing the transaction status. This allows creating a payment in the New state, modifying it and sending it for validation without generating drafts (Draft).

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Transaction identifier

Request Body schema: application/json
required
details
string

Transaction description (purpose)

amount
number >= 0

Transaction amount on the main account

related_amount
number >= 0

Amount on the other side of the transaction

object (core_Account)

Main account of the transaction

object (core_Account)

Account on the other side of the transaction

object (core_Asset)

Currency (asset) on the other side of the transaction

related_name
string

Counterparty name

destination
string

Recipient address value (if destination_type is set)

destination_type
string
Enum: "External" "Phone" "Email"

Recipient address type (for instant transactions)

direction
string <int32>
Default: 0
Enum: "0" "1"

Transaction direction: 0 - outgoing, 1 - incoming

transaction_type
string
Enum: "External" "Default" "Transfer" "Unregistered"

Transaction type. External - a transaction outside the current financial institution; Default - a transaction within the financial institution, Transfer - an operation between own accounts; Unregistered - a payment to a non-customer with an invitation to join.

external_channel
string
Enum: "BankAccount" "Card" "PSP"

Type of external channel used to send the transaction: BankAccount - payment to a bank account, Card - payment to a card or top-up from a card; PSP - an operation through an external payment system.

id_parent
integer <int64> >= 0

Parent transaction identifier

Array of objects

List of fees charged when the transaction is executed.

channel_id
string

External channel identifier, e.g. Stripe, SBP, etc.

executed
string <date-time>

Date/time the transaction was accepted for execution.

sub_type
string

Custom transaction subtype

sub_state
string

Custom additional transaction state

category
string

Special custom transaction category

origin
string

Transaction origin - a conventional attribute indicating the source of the transaction (e.g. when the transaction was imported from somewhere).

parent_object_id
integer <int64>

Identifier of the parent object on which the transaction was based.

parent_object_type
string

Type of the parent object that produced the transaction. E.g. "Transaction".

object (core_Attributable)

An attribute set is an object whose fields are arrays of values.

Multiple attributes can hold several values sorted in order. If an attribute has only one value, it is still represented as an array with a single element.

Responses

Request samples

Content type
application/json
{
  • "details": "string",
  • "amount": 12345.93,
  • "related_amount": 0,
  • "account": {
    },
  • "related_account": {
    },
  • "related_currency": {
    },
  • "related_name": "string",
  • "destination": "string",
  • "destination_type": "External",
  • "direction": "0",
  • "transaction_type": "External",
  • "external_channel": "BankAccount",
  • "id_parent": 0,
  • "fees": [
    ],
  • "channel_id": "string",
  • "executed": "2019-08-24T14:15:22Z",
  • "sub_type": "string",
  • "sub_state": "string",
  • "category": "string",
  • "origin": "string",
  • "parent_object_id": 0,
  • "parent_object_type": "string",
  • "attrs": {
    }
}

Response samples

Content type
application/json
{
  • "details": "string",
  • "amount": 12345.93,
  • "related_amount": 0,
  • "account": {
    },
  • "related_account": {
    },
  • "related_currency": {
    },
  • "related_name": "string",
  • "destination": "string",
  • "destination_type": "External",
  • "direction": "0",
  • "transaction_type": "External",
  • "exchange_rate": 72.1078,
  • "external_channel": "BankAccount",
  • "id_parent": 0,
  • "fees": [
    ],
  • "channel_id": "string",
  • "executed": "2019-08-24T14:15:22Z",
  • "sub_type": "string",
  • "sub_state": "string",
  • "category": "string",
  • "origin": "string",
  • "registry_type": 1,
  • "registry_remainder": 0,
  • "parent_object_id": 0,
  • "parent_object_type": "string",
  • "attrs": {
    },
  • "state": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Delete a draft

Deletes a transaction draft.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Transaction identifier

Responses

Response samples

Content type
application/json
{
  • "details": "string",
  • "amount": 12345.93,
  • "related_amount": 0,
  • "account": {
    },
  • "related_account": {
    },
  • "related_currency": {
    },
  • "related_name": "string",
  • "destination": "string",
  • "destination_type": "External",
  • "direction": "0",
  • "transaction_type": "External",
  • "exchange_rate": 72.1078,
  • "external_channel": "BankAccount",
  • "id_parent": 0,
  • "fees": [
    ],
  • "channel_id": "string",
  • "executed": "2019-08-24T14:15:22Z",
  • "sub_type": "string",
  • "sub_state": "string",
  • "category": "string",
  • "origin": "string",
  • "registry_type": 1,
  • "registry_remainder": 0,
  • "parent_object_id": 0,
  • "parent_object_type": "string",
  • "attrs": {
    },
  • "state": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Create a draft

Modifies a transaction in the New state, moving it to the draft (Draft) state. This explicitly performs the "Save draft" function, moving the object to the Draft state so that it is not overwritten when a new transaction is created via POST.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Transaction identifier

Request Body schema: application/json
required
details
string

Transaction description (purpose)

amount
number >= 0

Transaction amount on the main account

related_amount
number >= 0

Amount on the other side of the transaction

object (core_Account)

Main account of the transaction

object (core_Account)

Account on the other side of the transaction

object (core_Asset)

Currency (asset) on the other side of the transaction

related_name
string

Counterparty name

destination
string

Recipient address value (if destination_type is set)

destination_type
string
Enum: "External" "Phone" "Email"

Recipient address type (for instant transactions)

direction
string <int32>
Default: 0
Enum: "0" "1"

Transaction direction: 0 - outgoing, 1 - incoming

transaction_type
string
Enum: "External" "Default" "Transfer" "Unregistered"

Transaction type. External - a transaction outside the current financial institution; Default - a transaction within the financial institution, Transfer - an operation between own accounts; Unregistered - a payment to a non-customer with an invitation to join.

external_channel
string
Enum: "BankAccount" "Card" "PSP"

Type of external channel used to send the transaction: BankAccount - payment to a bank account, Card - payment to a card or top-up from a card; PSP - an operation through an external payment system.

id_parent
integer <int64> >= 0

Parent transaction identifier

Array of objects

List of fees charged when the transaction is executed.

channel_id
string

External channel identifier, e.g. Stripe, SBP, etc.

executed
string <date-time>

Date/time the transaction was accepted for execution.

sub_type
string

Custom transaction subtype

sub_state
string

Custom additional transaction state

category
string

Special custom transaction category

origin
string

Transaction origin - a conventional attribute indicating the source of the transaction (e.g. when the transaction was imported from somewhere).

parent_object_id
integer <int64>

Identifier of the parent object on which the transaction was based.

parent_object_type
string

Type of the parent object that produced the transaction. E.g. "Transaction".

object (core_Attributable)

An attribute set is an object whose fields are arrays of values.

Multiple attributes can hold several values sorted in order. If an attribute has only one value, it is still represented as an array with a single element.

Responses

Request samples

Content type
application/json
{
  • "details": "string",
  • "amount": 12345.93,
  • "related_amount": 0,
  • "account": {
    },
  • "related_account": {
    },
  • "related_currency": {
    },
  • "related_name": "string",
  • "destination": "string",
  • "destination_type": "External",
  • "direction": "0",
  • "transaction_type": "External",
  • "external_channel": "BankAccount",
  • "id_parent": 0,
  • "fees": [
    ],
  • "channel_id": "string",
  • "executed": "2019-08-24T14:15:22Z",
  • "sub_type": "string",
  • "sub_state": "string",
  • "category": "string",
  • "origin": "string",
  • "parent_object_id": 0,
  • "parent_object_type": "string",
  • "attrs": {
    }
}

Response samples

Content type
application/json
{
  • "details": "string",
  • "amount": 12345.93,
  • "related_amount": 0,
  • "account": {
    },
  • "related_account": {
    },
  • "related_currency": {
    },
  • "related_name": "string",
  • "destination": "string",
  • "destination_type": "External",
  • "direction": "0",
  • "transaction_type": "External",
  • "exchange_rate": 72.1078,
  • "external_channel": "BankAccount",
  • "id_parent": 0,
  • "fees": [
    ],
  • "channel_id": "string",
  • "executed": "2019-08-24T14:15:22Z",
  • "sub_type": "string",
  • "sub_state": "string",
  • "category": "string",
  • "origin": "string",
  • "registry_type": 1,
  • "registry_remainder": 0,
  • "parent_object_id": 0,
  • "parent_object_type": "string",
  • "attrs": {
    },
  • "state": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Cancel a transaction

Cancels a transaction in the Validated or Unconfirmed state and moves it to the Draft state.

Authorizations:
core_Authorization
path Parameters
id
required
string

Transaction ID

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "details": "string",
  • "amount": 12345.93,
  • "related_amount": 0,
  • "account": {
    },
  • "related_account": {
    },
  • "related_currency": {
    },
  • "related_name": "string",
  • "destination": "string",
  • "destination_type": "External",
  • "direction": "0",
  • "transaction_type": "External",
  • "exchange_rate": 72.1078,
  • "external_channel": "BankAccount",
  • "id_parent": 0,
  • "fees": [
    ],
  • "channel_id": "string",
  • "executed": "2019-08-24T14:15:22Z",
  • "sub_type": "string",
  • "sub_state": "string",
  • "category": "string",
  • "origin": "string",
  • "registry_type": 1,
  • "registry_remainder": 0,
  • "parent_object_id": 0,
  • "parent_object_type": "string",
  • "attrs": {
    },
  • "state": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Child transactions

Returns the list of transactions that are children of the given one.

For example, if the original transaction (id) has the Registry status, i.e. "registry", this function returns the list of partial payments of the registry.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Parent transaction identifier

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Initialize signing

Signing is initialized via the selected channel (confirmation_channel).

For example, if confirmation_channel = 'SMS', a one-time code is sent via SMS.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Transaction identifier

Request Body schema: application/json
required
details
string

Transaction description (purpose)

amount
number >= 0

Transaction amount on the main account

related_amount
number >= 0

Amount on the other side of the transaction

object (core_Account)

Main account of the transaction

object (core_Account)

Account on the other side of the transaction

object (core_Asset)

Currency (asset) on the other side of the transaction

related_name
string

Counterparty name

destination
string

Recipient address value (if destination_type is set)

destination_type
string
Enum: "External" "Phone" "Email"

Recipient address type (for instant transactions)

direction
string <int32>
Default: 0
Enum: "0" "1"

Transaction direction: 0 - outgoing, 1 - incoming

transaction_type
string
Enum: "External" "Default" "Transfer" "Unregistered"

Transaction type. External - a transaction outside the current financial institution; Default - a transaction within the financial institution, Transfer - an operation between own accounts; Unregistered - a payment to a non-customer with an invitation to join.

external_channel
string
Enum: "BankAccount" "Card" "PSP"

Type of external channel used to send the transaction: BankAccount - payment to a bank account, Card - payment to a card or top-up from a card; PSP - an operation through an external payment system.

id_parent
integer <int64> >= 0

Parent transaction identifier

Array of objects

List of fees charged when the transaction is executed.

channel_id
string

External channel identifier, e.g. Stripe, SBP, etc.

executed
string <date-time>

Date/time the transaction was accepted for execution.

sub_type
string

Custom transaction subtype

sub_state
string

Custom additional transaction state

category
string

Special custom transaction category

origin
string

Transaction origin - a conventional attribute indicating the source of the transaction (e.g. when the transaction was imported from somewhere).

parent_object_id
integer <int64>

Identifier of the parent object on which the transaction was based.

parent_object_type
string

Type of the parent object that produced the transaction. E.g. "Transaction".

object (core_Attributable)

An attribute set is an object whose fields are arrays of values.

Multiple attributes can hold several values sorted in order. If an attribute has only one value, it is still represented as an array with a single element.

Responses

Request samples

Content type
application/json
{
  • "details": "string",
  • "amount": 12345.93,
  • "related_amount": 0,
  • "account": {
    },
  • "related_account": {
    },
  • "related_currency": {
    },
  • "related_name": "string",
  • "destination": "string",
  • "destination_type": "External",
  • "direction": "0",
  • "transaction_type": "External",
  • "external_channel": "BankAccount",
  • "id_parent": 0,
  • "fees": [
    ],
  • "channel_id": "string",
  • "executed": "2019-08-24T14:15:22Z",
  • "sub_type": "string",
  • "sub_state": "string",
  • "category": "string",
  • "origin": "string",
  • "parent_object_id": 0,
  • "parent_object_type": "string",
  • "attrs": {
    }
}

Response samples

Content type
application/json
{
  • "details": "string",
  • "amount": 12345.93,
  • "related_amount": 0,
  • "account": {
    },
  • "related_account": {
    },
  • "related_currency": {
    },
  • "related_name": "string",
  • "destination": "string",
  • "destination_type": "External",
  • "direction": "0",
  • "transaction_type": "External",
  • "exchange_rate": 72.1078,
  • "external_channel": "BankAccount",
  • "id_parent": 0,
  • "fees": [
    ],
  • "channel_id": "string",
  • "executed": "2019-08-24T14:15:22Z",
  • "sub_type": "string",
  • "sub_state": "string",
  • "category": "string",
  • "origin": "string",
  • "registry_type": 1,
  • "registry_remainder": 0,
  • "parent_object_id": 0,
  • "parent_object_type": "string",
  • "attrs": {
    },
  • "state": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Validate a transaction

Checks the transaction fields for correctness.

Authorizations:
core_Authorization
path Parameters
id
required
string

Transaction identifier

Request Body schema: application/json
required
details
string

Transaction description (purpose)

amount
number >= 0

Transaction amount on the main account

related_amount
number >= 0

Amount on the other side of the transaction

object (core_Account)

Main account of the transaction

object (core_Account)

Account on the other side of the transaction

object (core_Asset)

Currency (asset) on the other side of the transaction

related_name
string

Counterparty name

destination
string

Recipient address value (if destination_type is set)

destination_type
string
Enum: "External" "Phone" "Email"

Recipient address type (for instant transactions)

direction
string <int32>
Default: 0
Enum: "0" "1"

Transaction direction: 0 - outgoing, 1 - incoming

transaction_type
string
Enum: "External" "Default" "Transfer" "Unregistered"

Transaction type. External - a transaction outside the current financial institution; Default - a transaction within the financial institution, Transfer - an operation between own accounts; Unregistered - a payment to a non-customer with an invitation to join.

external_channel
string
Enum: "BankAccount" "Card" "PSP"

Type of external channel used to send the transaction: BankAccount - payment to a bank account, Card - payment to a card or top-up from a card; PSP - an operation through an external payment system.

id_parent
integer <int64> >= 0

Parent transaction identifier

Array of objects

List of fees charged when the transaction is executed.

channel_id
string

External channel identifier, e.g. Stripe, SBP, etc.

executed
string <date-time>

Date/time the transaction was accepted for execution.

sub_type
string

Custom transaction subtype

sub_state
string

Custom additional transaction state

category
string

Special custom transaction category

origin
string

Transaction origin - a conventional attribute indicating the source of the transaction (e.g. when the transaction was imported from somewhere).

parent_object_id
integer <int64>

Identifier of the parent object on which the transaction was based.

parent_object_type
string

Type of the parent object that produced the transaction. E.g. "Transaction".

object (core_Attributable)

An attribute set is an object whose fields are arrays of values.

Multiple attributes can hold several values sorted in order. If an attribute has only one value, it is still represented as an array with a single element.

Responses

Request samples

Content type
application/json
{
  • "details": "string",
  • "amount": 12345.93,
  • "related_amount": 0,
  • "account": {
    },
  • "related_account": {
    },
  • "related_currency": {
    },
  • "related_name": "string",
  • "destination": "string",
  • "destination_type": "External",
  • "direction": "0",
  • "transaction_type": "External",
  • "external_channel": "BankAccount",
  • "id_parent": 0,
  • "fees": [
    ],
  • "channel_id": "string",
  • "executed": "2019-08-24T14:15:22Z",
  • "sub_type": "string",
  • "sub_state": "string",
  • "category": "string",
  • "origin": "string",
  • "parent_object_id": 0,
  • "parent_object_type": "string",
  • "attrs": {
    }
}

Response samples

Content type
application/json
{
  • "details": "string",
  • "amount": 12345.93,
  • "related_amount": 0,
  • "account": {
    },
  • "related_account": {
    },
  • "related_currency": {
    },
  • "related_name": "string",
  • "destination": "string",
  • "destination_type": "External",
  • "direction": "0",
  • "transaction_type": "External",
  • "exchange_rate": 72.1078,
  • "external_channel": "BankAccount",
  • "id_parent": 0,
  • "fees": [
    ],
  • "channel_id": "string",
  • "executed": "2019-08-24T14:15:22Z",
  • "sub_type": "string",
  • "sub_state": "string",
  • "category": "string",
  • "origin": "string",
  • "registry_type": 1,
  • "registry_remainder": 0,
  • "parent_object_id": 0,
  • "parent_object_type": "string",
  • "attrs": {
    },
  • "state": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Preliminary transaction validation

This method allows validating any transaction model without creating it.

Authorizations:
bank_Authorization
Request Body schema: application/json
required
details
string

Transaction description (purpose)

amount
number >= 0

Transaction amount on the main account

related_amount
number >= 0

Amount on the other side of the transaction

object (bank_BankAccount)

Main account of the transaction

object (bank_BankAccount)

Account on the other side of the transaction

object (bank_Asset)

Currency (asset) on the other side of the transaction

related_name
string

Counterparty name

destination
string

Recipient address value (if destination_type is set)

destination_type
string
Enum: "External" "Phone" "Email"

Recipient address type (for instant transactions)

direction
string <int32>
Default: 0
Enum: "0" "1"

Transaction direction: 0 - outgoing, 1 - incoming

transaction_type
string
Enum: "External" "Default" "Transfer" "Unregistered"

Transaction type. External - a transaction outside the current financial institution; Default - a transaction within the financial institution, Transfer - an operation between own accounts; Unregistered - a payment to a non-customer with an invitation to join.

external_channel
string
Enum: "BankAccount" "Card" "PSP"

Type of external channel used to send the transaction: BankAccount - payment to a bank account, Card - payment to a card or top-up from a card; PSP - an operation through an external payment system.

id_parent
integer <int64> >= 0

Parent transaction identifier

Array of objects

List of fees charged when the transaction is executed.

channel_id
string

External channel identifier, e.g. Stripe, SBP, etc.

executed
string <date-time>

Date/time the transaction was accepted for execution.

sub_type
string

Custom transaction subtype

sub_state
string

Custom additional transaction state

category
string

Special custom transaction category

origin
string

Transaction origin - a conventional attribute indicating the source of the transaction (e.g. when the transaction was imported from somewhere).

parent_object_id
integer <int64>

Identifier of the parent object on which the transaction was based.

parent_object_type
string

Type of the parent object that produced the transaction. E.g. "Transaction".

object (bank_Attributable)

An attribute set is an object whose fields are arrays of values.

Multiple attributes can hold several values sorted in order. If an attribute has only one value, it is still represented as an array with a single element.

Responses

Request samples

Content type
application/json
{
  • "details": "string",
  • "amount": 12345.93,
  • "related_amount": 0,
  • "account": {
    },
  • "related_account": {
    },
  • "related_currency": {
    },
  • "related_name": "string",
  • "destination": "string",
  • "destination_type": "External",
  • "direction": "0",
  • "transaction_type": "External",
  • "external_channel": "BankAccount",
  • "id_parent": 0,
  • "fees": [
    ],
  • "channel_id": "string",
  • "executed": "2019-08-24T14:15:22Z",
  • "sub_type": "string",
  • "sub_state": "string",
  • "category": "string",
  • "origin": "string",
  • "parent_object_id": 0,
  • "parent_object_type": "string",
  • "attrs": {
    }
}

Response samples

Content type
application/json
{
  • "details": "string",
  • "amount": 12345.93,
  • "related_amount": 0,
  • "account": {
    },
  • "related_account": {
    },
  • "related_currency": {
    },
  • "related_name": "string",
  • "destination": "string",
  • "destination_type": "External",
  • "direction": "0",
  • "transaction_type": "External",
  • "exchange_rate": 72.1078,
  • "external_channel": "BankAccount",
  • "id_parent": 0,
  • "fees": [
    ],
  • "channel_id": "string",
  • "executed": "2019-08-24T14:15:22Z",
  • "sub_type": "string",
  • "sub_state": "string",
  • "category": "string",
  • "origin": "string",
  • "registry_type": 1,
  • "registry_remainder": 0,
  • "parent_object_id": 0,
  • "parent_object_type": "string",
  • "attrs": {
    },
  • "state": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Account Top-Up via Payment Terminals

This article describes the general interaction scheme between us and a payment aggregator that specializes in accepting payments, for example in cash through terminals.

The terminal payment acceptance scenario we are considering looks as follows:

  1. In the terminal, the customer selects the required service provider (one using our platform) and enters a payment detail (for example, a phone number).

  2. Through the aggregator's API, the terminal sends the service provider (us) a dedicated request to validate the details (in this case the phone number). In response it receives a confirmation that the detail is valid and the payment can be made, or a rejection.

  3. If the phone number is validated successfully, the customer inserts the required amount of cash into the bill acceptor and the terminal sends a request to execute the payment, as a result of which the amount is credited to the customer's account (wallet) associated with that phone number.

Authentication

To use the payment acceptance API, you must register and obtain a service account. A service account is a "user code" / "password" pair, as well as a "client_id"/"client_secret" pair that identifies the application.

Before using the API, access tokens must be obtained using the provided service account. This can be done through the Authentication API for service accounts

As a result, an access_token and a refresh_token pair is returned, for example like this:

{
  "access_token" : "nySz53xROxtzXjWgT0Sh-4kZAUk",
  "refresh_token" : "Vs7M_Bg2wQXMuJtBKFVUAqLtUHQ",
  "token_type" : "bearer",
  "expires_in" : ":1209600",
  "scope" : "full",
  "client_id" : "95a12f85d50e231ea1cf0f4528b19cc7"
}

Accordingly, the access_token value must be used in all the following API calls in the Authentication header, for example with the token value from the example above:

Authorization: Bearer nySz53xROxtzXjWgT0Sh-4kZAUk

Also, if the access_token expires, it can be refreshed using the refresh_token (see the same article)

Validating a payment detail

The Validation request is used.

During validation, the identifier in the system external to us is passed as a path parameter, and the payment detail to be checked, for example a phone number, is passed as well. For example:

  POST ${API_HOST}/api/v1/payments/accept/{externalId}/validate

and as the body:

{
  "destination" : "+996990141178",
  "timestamp" : "2023-10-30T14:03:26.999+00:00",
  "amount" : "100.00"
}

In validation, only externalId — the identifier of the future transaction — and destination — the phone number — are mandatory. If the amount can be specified at the validation stage, this makes the check of whether the payment can be made more accurate.

We assume that externalId is unique for each transaction and its uniqueness is checked.

The response returns the original data that was in the request, plus a state attribute, which can take the value "Valid" if the check succeeded or "Invalid" if the check failed.

For example:

{
  "state": "Valid",
  "timestamp": "2023-10-30T14:03:26.999+00:00",
  "currency": "KGS",
  "amount": 5,
  "destination": "+996990141178",
  "destination_type": "Phone"
}

or in case of failure:

{
  "message": "No recipient account found",
  "state": "Invalid",
  "currency": "KGS",
  "destination": "+996990141178",
  "destination_type": "Phone"
}

Executing the payment

The Payment execution request is used.

The format of this request is similar to validation; only the endpoint and the HTTP method change, and the amount field becomes mandatory.

  PUT ${API_HOST}/api/v1/payments/accept/{externalId}/pay

and as the body:

{
  "destination" : "+996990141178",
  "timestamp" : "2023-10-30T14:03:26.999+00:00",
  "amount" : "100.00"
}

If the payment is accepted for execution successfully, the following result is returned:

{
  "id": 12376455,
  "state": "Confirmed",
  "timestamp": "2023-10-30T14:03:26.999+00:00",
  "currency": "KGS",
  "amount": 5,
  "destination": "+996990141178",
  "destination_type": "Phone"
}

On successful execution, the response contains the Confirmed status and the transaction identifier in our system, which may be needed for future investigations.

If the payment execution fails, the status is Failed, and the message field specifies the reason for the error. For example:

{
  "code":0,
  "message":"The amount must be greater than 0.01 KGS",
  "state":"Failed",
  "timestamp":"2023-10-31T14:21:11.477+00:00",
  "currency":"KGS",
  "amount":0.001,
  "destination":"+996990141178",
  "destination_type":"Phone"
}

Checking the transaction status

It is possible to request the further status of the transaction, for example if you need to find out whether the transaction has reached its final state.

The Status check request is used.

  GET ${API_HOST}/api/v1/payments/accept/{externalId}/status

The externalId — the identifier in the system external to us — must be used as the parameter.

For a transaction, the final successful state is Completed:

{
  "id": 12376455,
  "state": "Completed",
  "timestamp": "2023-10-30T14:03:26.999+00:00",
  "currency": "KGS",
  "amount": 5,
  "destination": "+996990141178",
  "destination_type": "Phone"
}

in some cases, if the transaction is executed in a third-party ledger (for example, in a bank's core banking system), the transaction may be cancelled (Cancelled), if, for example, the core banking system rejected it for some reason.

{
  "id" : 10652,
  "state" : "Cancelled",
  "message" : "Account closed",
  "timestamp" : "2023-10-31T14:30:54.805+00:00",
  "currency" : "KGS",
  "amount" : 100,
  "destination" : "996990141178",
  "destination_type" : "Phone"
}

Accept Payments API

Payment execution

Executes the payment for the specified amount using the specified payment details. The payment identifier in the external payment system must be specified in the URL.

Authorizations:
rosca_Authorization
path Parameters
id
required
string

Payment identifier

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Payment status

Checks the current status of the payment, because a payment accepted by the system may be posted to accounts a bit later, or the execution may be refused if the actual execution of the transaction takes place in an external ledger (for example, in the bank's core banking system).

Authorizations:
rosca_Authorization
path Parameters
id
required
string

Payment identifier

Responses

Response samples

Content type
application/json
{
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Payment validation

Checks whether the account top-up operation can be performed. The payment identifier in the external payment system must be specified in the URL.

Authorizations:
rosca_Authorization
path Parameters
id
required
string

Payment identifier

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Counterparty API

Counterparty list

Retrieves the list of counterparties of the current customer.

Authorizations:
core_Authorization

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Counterparty details

Retrieves the counterparty by its identifier.

Authorizations:
core_Authorization
path Parameters
id
required
string

Counterparty ID

Responses

Response samples

Content type
application/json
{
  • "account_owner_name": "string",
  • "bank_code": "string",
  • "bank_code_type": "LOCAL",
  • "account_number": "string",
  • "tax_id": "string",
  • "country": {
    },
  • "details": "string",
  • "id": 12345,
  • "description": "string",
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Counterparty list

Retrieves the list of counterparties of the current customer.

Authorizations:
core_Authorization

Responses

Response samples

Content type
application/json
[
  • {
    }
]

New counterparty

Creates a new counterparty.

Counterparties are created automatically when transactions are created. The following additional transaction attributes are used for this:

  • bank.save_counterparty
  • bank.id

If the 'bank.save_counterparty' attribute is specified, the counterparty is saved automatically when the transaction is executed.

If, in addition, the 'bank.id' attribute equal to the identifier of the Counterparty object is specified, the data of the given counterparty is updated with the data from the transaction.

Authorizations:
core_Authorization
Request Body schema: application/json
required
account_owner_name
string

Account owner name

bank_code
string

Bank code, e.g. 046551854

bank_code_type
string
Enum: "LOCAL" "SWIFT"

Bank code type (LOCAL - a directory within the country, SWIFT - the global SWIFT code directory)

account_number
string

Account number

tax_id
string

Tax identifier (INN in Russia)

object (core_Country)

Country directory

details
string

Transaction details - payment purpose

description
string

Custom description of the counterparties

Responses

Request samples

Content type
application/json
{
  • "account_owner_name": "string",
  • "bank_code": "string",
  • "bank_code_type": "LOCAL",
  • "account_number": "string",
  • "tax_id": "string",
  • "country": {
    },
  • "details": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "account_owner_name": "string",
  • "bank_code": "string",
  • "bank_code_type": "LOCAL",
  • "account_number": "string",
  • "tax_id": "string",
  • "country": {
    },
  • "details": "string",
  • "id": 12345,
  • "description": "string",
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Counterparty details

Retrieves the counterparty by its identifier.

Authorizations:
core_Authorization
path Parameters
id
required
string

Counterparty ID

Responses

Response samples

Content type
application/json
{
  • "account_owner_name": "string",
  • "bank_code": "string",
  • "bank_code_type": "LOCAL",
  • "account_number": "string",
  • "tax_id": "string",
  • "country": {
    },
  • "details": "string",
  • "id": 12345,
  • "description": "string",
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Modify a counterparty

Modifies the counterparty.

Authorizations:
core_Authorization
path Parameters
id
required
string

Counterparty ID

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "account_owner_name": "string",
  • "bank_code": "string",
  • "bank_code_type": "LOCAL",
  • "account_number": "string",
  • "tax_id": "string",
  • "country": {
    },
  • "details": "string",
  • "id": 12345,
  • "description": "string",
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Delete a counterparty

Deletes the given counterparty.

Authorizations:
core_Authorization
path Parameters
id
required
string

Counterparty ID

Responses

Response samples

Content type
application/json
{
  • "account_owner_name": "string",
  • "bank_code": "string",
  • "bank_code_type": "LOCAL",
  • "account_number": "string",
  • "tax_id": "string",
  • "country": {
    },
  • "details": "string",
  • "id": 12345,
  • "description": "string",
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Customer counterparties

Retrieves the list of counterparties of the customer specified by the identifier.

Authorizations:
core_Authorization
path Parameters
id
required
number

Customer ID

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Customer counterparties

Retrieves the list of counterparties of the customer specified by the identifier.

Authorizations:
core_Authorization
path Parameters
id
required
number

Customer ID

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Deposit Operations

This article covers the main operations for working with deposit accounts, from opening a deposit agreement to closing the account.

The API itself can be found here: Deposit API

Description of the deposit agreement model: Deposit

Creating a deposit application

We build the deposit agreement model (see Deposit), for example:

{
  "product_type": "22031",
  "asset": {
    "asset_id": "RUBX",
    "asset_code": "RUB"
  },
  "amount": 50000,
  "description": "My deposit",
  "customer": {
    "id": 2353,
    "name": "Sample Company"
  },
  "interest_account": {
    "id": 3152
  },
  "target_account_external": {
    "bank_code": "046577904",
    "bank_code_type": "LOCAL",
    "account_number": "40817810000000000001"
  },
  "contract_date": "2024-09-01",
  "contract_number": "X2423409/23"
}

The deposit product type (product_type) is usually determined by the deposit reference book used by the bank. The deposit currency (asset.asset_id) and amount (amount) are also filled in.

Structures of the interest/target/source_account or interest/target/source_account_external kind define the cash-flow management rules for the deposit agreement:

  • interest - the account for managing the interest accrued on the deposit
  • target - the account to which the deposit principal is transferred after maturity
  • source - the account to be used as the source for topping up the deposit (at the application stage).

The interest/target/source_account structures have the Account type and are used to specify the customer's own account.

The interest/target/source_account_external structures have the Counterparty type and are used to specify an account with another bank, if such a mode is required.

We create the application using

  POST '/api/v1/deposits'

passing the deposit application model as the body. As a result, a new deposit agreement is created in the New state:

{
  "code": 0,
  "id": 3451,
  "state": "New",
  ...
}  

Updating the application

As long as the application has not been sent to the bank (it is in the New state), it can be updated, for example to change the amount or the interest management account. The following method is used for this:

  PUT '/api/v1/deposits/{id}'

Here id is the identifier of the Deposit object.

Sending to the bank

Signing a deposit application is performed in the same ways as signing other objects (see the article for details).

In particular, signing initialization:

  PUT '/api/v1/deposits/{id}/sign'

Signing confirmation:

  PUT '/api/v1/confirm/deposit/{id}'

After being sent to the bank, the deposit agreement gets the Pending state, and once the agreement is opened, the deposit moves to the Active state. If an error occurs while opening the deposit, it moves to the Failed state, and the reason for the error is specified in the state_info field.

Thus, the deposit life cycle looks as follows:

Draft Sent to the bank Opened successfully Error Account closure
New Pending Active Failed Inactive

Updating deposit accounts

If the deposit provides for separate accounts for transferring interest, or the ability to choose accounts for transferring the deposit after maturity, such accounts can be specified separately even if the deposit is already active.

For example, for the deposit from the example above, the interest management account can be updated using the model:

{
  "id": 3451,
  "state": "Active",
  ...
  "interest_account_external": {
    "bank_code": "046577904",
    "bank_code_type": "LOCAL",
    "account_number": "40817810000000000005"
  },
  ...
}  

and the function:

   PATCH '/api/v1/deposits/{id}/accounts'

For active agreements, only the interest management account (interest_account/interest_account_external) and the account for transferring the deposit after closure (target_account/target_account_external) can be updated.

Closing accounts

When closing an account, the following account closure application form is used:

{
  "confirm_channel": "SMS",
  "account": {
    "id": 123456789
  },
  "close_reason": "I no longer need it"
}

We initialize the closure using this model:

   PUT '/api/v1/accounts/{id}/close'

where id is the identifier of the account object. The standard model is returned in response:

{
  "code": 0,
  "id": 4155,
  "state": "Verified",
  ...
  "otp": "6880",
  "otp_num": 63,
  "otp_time": "2024-09-01T06:33:37.600+00:00",
  "confirm_channel": "SMS",
  "account": {
    "business_code": "2024-09-23/4403",
    "id": 123456789,
    ...
  },
  "close_reason": "I no longer need it"
  ...
}

Then we confirm the closure by passing the model with the code:

   PUT '/api/v1/confirm/account/{id}/close'

Details can be found in the Accounts API specification.

After the account closure is confirmed, the account itself moves to the Closed state, and the related deposit agreement moves to the Inactive state.

Deposits API

List of deposits

Returns the list of products available to the current customer, including deposit contracts.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Customer identifier

query Parameters
states
string

Product states

page
integer <int32>

Page number

per_page
integer <int32>

Number of items per page

sort
string

Sort order by the created field ("-" descending, "+" ascending)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Confirm signing

Confirms the signing of the deposit application.

Authorizations:
bank_Authorization
path Parameters
id
required
string

Deposit identifier

Request Body schema: application/json
required
product_type
required
string

Deposit type

object (bank_BankAccount)

Main deposit account

required
object (bank_Asset)

Deposit currency (or other asset)

title
string

Deposit product name

amount
required
number

Deposit amount

object (bank_BankAccount)

Own account for interest disposal

object (bank_Counterparty)

External account for interest disposal in another bank

object (bank_BankAccount)

Own source account for deposit top-ups

object (bank_Counterparty)

External source account for deposit top-ups in another bank

object (bank_BankAccount)

Own account for transferring the deposit after maturity

object (bank_Counterparty)

Account in another bank for transferring the deposit after maturity

contract_date
string <date>

Date of the deposit opening order

contract_number
string

Number of the deposit order (agreement)

term
integer <int32>

Contract term in units (months or days).

object (bank_Customer)

Customer - the owner of the deposit

Responses

Request samples

Content type
application/json
{
  • "product_type": "string",
  • "account": {
    },
  • "asset": {
    },
  • "title": "string",
  • "amount": 0,
  • "interest_account": {
    },
  • "interest_account_external": {
    },
  • "source_account": {
    },
  • "source_account_external": {
    },
  • "target_account": {
    },
  • "target_account_external": {
    },
  • "contract_date": "2019-08-24",
  • "contract_number": "string",
  • "term": 0,
  • "customer": {
    }
}

Response samples

Content type
application/json
{
  • "product_type": "string",
  • "account": {
    },
  • "asset": {
    },
  • "title": "string",
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "refill_start": "2019-08-24",
  • "refill_end": "2019-08-24",
  • "amount": 0,
  • "interest": "string",
  • "accumulated_interest": 0,
  • "interest_account": {
    },
  • "interest_account_external": {
    },
  • "source_account": {
    },
  • "source_account_external": {
    },
  • "target_account": {
    },
  • "target_account_external": {
    },
  • "contract_date": "2019-08-24",
  • "contract_number": "string",
  • "term": 0,
  • "customer": {
    },
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Open a deposit

Creates a new deposit application.

Authorizations:
bank_Authorization
Request Body schema: application/json
required
product_type
required
string

Deposit type

object (bank_BankAccount)

Main deposit account

required
object (bank_Asset)

Deposit currency (or other asset)

title
string

Deposit product name

amount
required
number

Deposit amount

object (bank_BankAccount)

Own account for interest disposal

object (bank_Counterparty)

External account for interest disposal in another bank

object (bank_BankAccount)

Own source account for deposit top-ups

object (bank_Counterparty)

External source account for deposit top-ups in another bank

object (bank_BankAccount)

Own account for transferring the deposit after maturity

object (bank_Counterparty)

Account in another bank for transferring the deposit after maturity

contract_date
string <date>

Date of the deposit opening order

contract_number
string

Number of the deposit order (agreement)

term
integer <int32>

Contract term in units (months or days).

object (bank_Customer)

Customer - the owner of the deposit

Responses

Request samples

Content type
application/json
{
  • "product_type": "string",
  • "account": {
    },
  • "asset": {
    },
  • "title": "string",
  • "amount": 0,
  • "interest_account": {
    },
  • "interest_account_external": {
    },
  • "source_account": {
    },
  • "source_account_external": {
    },
  • "target_account": {
    },
  • "target_account_external": {
    },
  • "contract_date": "2019-08-24",
  • "contract_number": "string",
  • "term": 0,
  • "customer": {
    }
}

Response samples

Content type
application/json
{
  • "product_type": "string",
  • "account": {
    },
  • "asset": {
    },
  • "title": "string",
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "refill_start": "2019-08-24",
  • "refill_end": "2019-08-24",
  • "amount": 0,
  • "interest": "string",
  • "accumulated_interest": 0,
  • "interest_account": {
    },
  • "interest_account_external": {
    },
  • "source_account": {
    },
  • "source_account_external": {
    },
  • "target_account": {
    },
  • "target_account_external": {
    },
  • "contract_date": "2019-08-24",
  • "contract_number": "string",
  • "term": 0,
  • "customer": {
    },
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Deposit details

Retrieves the details of the deposit contract.

Authorizations:
bank_Authorization
path Parameters
id
required
integer <int32>

Deposit identifier

Responses

Response samples

Content type
application/json
{
  • "product_type": "string",
  • "account": {
    },
  • "asset": {
    },
  • "title": "string",
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "refill_start": "2019-08-24",
  • "refill_end": "2019-08-24",
  • "amount": 0,
  • "interest": "string",
  • "accumulated_interest": 0,
  • "interest_account": {
    },
  • "interest_account_external": {
    },
  • "source_account": {
    },
  • "source_account_external": {
    },
  • "target_account": {
    },
  • "target_account_external": {
    },
  • "contract_date": "2019-08-24",
  • "contract_number": "string",
  • "term": 0,
  • "customer": {
    },
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Edit a deposit

Correction of the deposit application data. Such a correction is possible while the deposit contract is in the New state and has not been signed by the customer.

Authorizations:
bank_Authorization
path Parameters
id
required
integer <int32>

Deposit identifier

Request Body schema: application/json
required
product_type
required
string

Deposit type

object (bank_BankAccount)

Main deposit account

required
object (bank_Asset)

Deposit currency (or other asset)

title
string

Deposit product name

amount
required
number

Deposit amount

object (bank_BankAccount)

Own account for interest disposal

object (bank_Counterparty)

External account for interest disposal in another bank

object (bank_BankAccount)

Own source account for deposit top-ups

object (bank_Counterparty)

External source account for deposit top-ups in another bank

object (bank_BankAccount)

Own account for transferring the deposit after maturity

object (bank_Counterparty)

Account in another bank for transferring the deposit after maturity

contract_date
string <date>

Date of the deposit opening order

contract_number
string

Number of the deposit order (agreement)

term
integer <int32>

Contract term in units (months or days).

object (bank_Customer)

Customer - the owner of the deposit

Responses

Request samples

Content type
application/json
{
  • "product_type": "string",
  • "account": {
    },
  • "asset": {
    },
  • "title": "string",
  • "amount": 0,
  • "interest_account": {
    },
  • "interest_account_external": {
    },
  • "source_account": {
    },
  • "source_account_external": {
    },
  • "target_account": {
    },
  • "target_account_external": {
    },
  • "contract_date": "2019-08-24",
  • "contract_number": "string",
  • "term": 0,
  • "customer": {
    }
}

Response samples

Content type
application/json
{
  • "product_type": "string",
  • "account": {
    },
  • "asset": {
    },
  • "title": "string",
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "refill_start": "2019-08-24",
  • "refill_end": "2019-08-24",
  • "amount": 0,
  • "interest": "string",
  • "accumulated_interest": 0,
  • "interest_account": {
    },
  • "interest_account_external": {
    },
  • "source_account": {
    },
  • "source_account_external": {
    },
  • "target_account": {
    },
  • "target_account_external": {
    },
  • "contract_date": "2019-08-24",
  • "contract_number": "string",
  • "term": 0,
  • "customer": {
    },
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Delete a deposit

Deletes an unsent deposit application.

Authorizations:
bank_Authorization
path Parameters
id
required
integer <int32>

Deposit identifier

Responses

Response samples

Content type
application/json
{
  • "product_type": "string",
  • "account": {
    },
  • "asset": {
    },
  • "title": "string",
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "refill_start": "2019-08-24",
  • "refill_end": "2019-08-24",
  • "amount": 0,
  • "interest": "string",
  • "accumulated_interest": 0,
  • "interest_account": {
    },
  • "interest_account_external": {
    },
  • "source_account": {
    },
  • "source_account_external": {
    },
  • "target_account": {
    },
  • "target_account_external": {
    },
  • "contract_date": "2019-08-24",
  • "contract_number": "string",
  • "term": 0,
  • "customer": {
    },
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Edit accounts

Adjusts the accounts for interest disposal and the accounts for transferring the deposit after its closure.

The difference between this function and the regular deposit application edit is that the accounts can be changed for deposits that are already active.

Authorizations:
bank_Authorization
path Parameters
id
required
string

Deposit identifier

Request Body schema: application/json
required
product_type
required
string

Deposit type

object (bank_BankAccount)

Main deposit account

required
object (bank_Asset)

Deposit currency (or other asset)

title
string

Deposit product name

amount
required
number

Deposit amount

object (bank_BankAccount)

Own account for interest disposal

object (bank_Counterparty)

External account for interest disposal in another bank

object (bank_BankAccount)

Own source account for deposit top-ups

object (bank_Counterparty)

External source account for deposit top-ups in another bank

object (bank_BankAccount)

Own account for transferring the deposit after maturity

object (bank_Counterparty)

Account in another bank for transferring the deposit after maturity

contract_date
string <date>

Date of the deposit opening order

contract_number
string

Number of the deposit order (agreement)

term
integer <int32>

Contract term in units (months or days).

object (bank_Customer)

Customer - the owner of the deposit

Responses

Request samples

Content type
application/json
{
  • "product_type": "string",
  • "account": {
    },
  • "asset": {
    },
  • "title": "string",
  • "amount": 0,
  • "interest_account": {
    },
  • "interest_account_external": {
    },
  • "source_account": {
    },
  • "source_account_external": {
    },
  • "target_account": {
    },
  • "target_account_external": {
    },
  • "contract_date": "2019-08-24",
  • "contract_number": "string",
  • "term": 0,
  • "customer": {
    }
}

Response samples

Content type
application/json
{
  • "product_type": "string",
  • "account": {
    },
  • "asset": {
    },
  • "title": "string",
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "refill_start": "2019-08-24",
  • "refill_end": "2019-08-24",
  • "amount": 0,
  • "interest": "string",
  • "accumulated_interest": 0,
  • "interest_account": {
    },
  • "interest_account_external": {
    },
  • "source_account": {
    },
  • "source_account_external": {
    },
  • "target_account": {
    },
  • "target_account_external": {
    },
  • "contract_date": "2019-08-24",
  • "contract_number": "string",
  • "term": 0,
  • "customer": {
    },
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Initiate signing

Initiates the signing procedure of the deposit contract.

Authorizations:
bank_Authorization
path Parameters
id
required
integer <int32>

Deposit identifier

Request Body schema: application/json
required
product_type
required
string

Deposit type

object (bank_BankAccount)

Main deposit account

required
object (bank_Asset)

Deposit currency (or other asset)

title
string

Deposit product name

amount
required
number

Deposit amount

object (bank_BankAccount)

Own account for interest disposal

object (bank_Counterparty)

External account for interest disposal in another bank

object (bank_BankAccount)

Own source account for deposit top-ups

object (bank_Counterparty)

External source account for deposit top-ups in another bank

object (bank_BankAccount)

Own account for transferring the deposit after maturity

object (bank_Counterparty)

Account in another bank for transferring the deposit after maturity

contract_date
string <date>

Date of the deposit opening order

contract_number
string

Number of the deposit order (agreement)

term
integer <int32>

Contract term in units (months or days).

object (bank_Customer)

Customer - the owner of the deposit

Responses

Request samples

Content type
application/json
{
  • "product_type": "string",
  • "account": {
    },
  • "asset": {
    },
  • "title": "string",
  • "amount": 0,
  • "interest_account": {
    },
  • "interest_account_external": {
    },
  • "source_account": {
    },
  • "source_account_external": {
    },
  • "target_account": {
    },
  • "target_account_external": {
    },
  • "contract_date": "2019-08-24",
  • "contract_number": "string",
  • "term": 0,
  • "customer": {
    }
}

Response samples

Content type
application/json
{
  • "product_type": "string",
  • "account": {
    },
  • "asset": {
    },
  • "title": "string",
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "refill_start": "2019-08-24",
  • "refill_end": "2019-08-24",
  • "amount": 0,
  • "interest": "string",
  • "accumulated_interest": 0,
  • "interest_account": {
    },
  • "interest_account_external": {
    },
  • "source_account": {
    },
  • "source_account_external": {
    },
  • "target_account": {
    },
  • "target_account_external": {
    },
  • "contract_date": "2019-08-24",
  • "contract_number": "string",
  • "term": 0,
  • "customer": {
    },
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Authentication API

Аутентификация сервисной учетки

Сервисная учетка используется интеграторами для того, чтобы использовать более простой способ получения доступа у необходимым функциям.

Сервисная учетка предоставляется в виде пары userName, password, а также для работы с ней требуется зарегистрированное приложение в виде пары client_id/client_secret.

Authorizations:
Authentication_BasicAuth
Request Body schema: application/x-www-form-urlencoded
  1. Для получения пары access_token/refresh_token используется следующий формат тела запроса:
grant_type=password&username=${USER}&password=${PASSWORD}&scope=full

${USER} - имя пользователя сервисной учетки.

${PASSWORD} - пароль от учетки.

  1. Для выполнения операции refresh_token необходимо передать тело запроса:
grant_type=refresh_token&client_id=${client_id}&client_secret=${client_secret}&refresh_token=${refresh_token}
  1. Также следует обратить внимание, что в заголовке Authentication должна быть передана заколированная в Base64 строка в следующем виде:
  Authentication: Basic base64(client_id:client_secret)

, что является стандартным в OAuth2 протоколе.

string

Responses

Request samples

Content type
application/x-www-form-urlencoded
No sample

Response samples

Content type
{
  • "access_token": "string",
  • "refresh_token": "string",
  • "token_type": "bearer",
  • "expires_in": 0,
  • "scope": "string",
  • "client_id": "string"
}

Security API

Additional authentication

Confirms the additional authentication using OTP. On success, the current user receives the final ROLE_USER role.

Authorizations:
core_Authorization
Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "login": "string",
  • "name": "string",
  • "client_id": "string",
  • "locale_id": "ru_RU",
  • "roles": [
    ],
  • "customers": [
    ],
  • "customer": 0,
  • "user_customer": 0,
  • "auth_channel": "SMS",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Check PIN

Performs a check of the previously set short PIN code.

Authorizations:
core_Authorization
Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "login": "string",
  • "name": "string",
  • "client_id": "string",
  • "locale_id": "ru_RU",
  • "roles": [
    ],
  • "customers": [
    ],
  • "customer": 0,
  • "user_customer": 0,
  • "auth_channel": "SMS",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Set PIN

Sets a short 4-digit PIN code that can be used, for example, in mobile applications.

Authorizations:
core_Authorization
Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "login": "string",
  • "name": "string",
  • "client_id": "string",
  • "locale_id": "ru_RU",
  • "roles": [
    ],
  • "customers": [
    ],
  • "customer": 0,
  • "user_customer": 0,
  • "auth_channel": "SMS",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Repeated OTP request

Requests a new code (SMS) for authentication.

Authorizations:
core_Authorization
Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "login": "string",
  • "name": "string",
  • "client_id": "string",
  • "locale_id": "ru_RU",
  • "roles": [
    ],
  • "customers": [
    ],
  • "customer": 0,
  • "user_customer": 0,
  • "auth_channel": "SMS",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Merchants API

Merchant list

Returns the list of merchants for the given customer identifier.

Authorizations:
core_Authorization
path Parameters
id
required
string

Customer identifier

Responses

Response samples

Content type
application/json
[
  • {
    }
]

New merchant

Creates a new point of sale (merchant) with the specified parameters for the given customer. The customer must be a legal entity. By default, the merchant is created in the New state.

If there is no need for further registration of the merchant, it can be assigned the state = 'Active' state immediately upon creation to make it available.

Authorizations:
core_Authorization
path Parameters
id
required
string

Customer identifier

Request Body schema: application/json
required
name
string

Merchant name (brand)

object (core_Address)

Merchant address

latitude
string

Coordinates - latitude

longitude
string

Coordinates - longitude

object (core_Customer)

Reference to the associated customer

category
string

Merchant category

mcc
string

MCC code

default_merchant
boolean

Default merchant flag

phone
string

Merchant contact phone

zone_id
string

Time zone code, e.g. Asia/Singapore

Array of objects (ExternalEntity)

List of external identifiers associated with this merchant.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "shop_address": {
    },
  • "latitude": "string",
  • "longitude": "string",
  • "customer": {
    },
  • "category": "string",
  • "mcc": "string",
  • "default_merchant": true,
  • "phone": "string",
  • "zone_id": "string",
  • "externals": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "string",
  • "shop_address": {
    },
  • "latitude": "string",
  • "longitude": "string",
  • "customer": {
    },
  • "category": "string",
  • "mcc": "string",
  • "default_merchant": true,
  • "phone": "string",
  • "zone_id": "string",
  • "externals": [
    ],
  • "registration_mode": "Full",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Merchant details

Retrieves information about the merchant by its identifier.

Authorizations:
core_Authorization
path Parameters
id
required
string

Merchant identifier

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "shop_address": {
    },
  • "latitude": "string",
  • "longitude": "string",
  • "customer": {
    },
  • "category": "string",
  • "mcc": "string",
  • "default_merchant": true,
  • "phone": "string",
  • "zone_id": "string",
  • "externals": [
    ],
  • "registration_mode": "Full",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Modify a merchant

Updates the merchant data.

Authorizations:
core_Authorization
path Parameters
id
required
string

Merchant identifier

Request Body schema: application/json
required
name
string

Merchant name (brand)

object (core_Address)

Merchant address

latitude
string

Coordinates - latitude

longitude
string

Coordinates - longitude

object (core_Customer)

Reference to the associated customer

category
string

Merchant category

mcc
string

MCC code

default_merchant
boolean

Default merchant flag

phone
string

Merchant contact phone

zone_id
string

Time zone code, e.g. Asia/Singapore

Array of objects (ExternalEntity)

List of external identifiers associated with this merchant.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "shop_address": {
    },
  • "latitude": "string",
  • "longitude": "string",
  • "customer": {
    },
  • "category": "string",
  • "mcc": "string",
  • "default_merchant": true,
  • "phone": "string",
  • "zone_id": "string",
  • "externals": [
    ]
}

Response samples

Content type
application/json
{
  • "name": "string",
  • "shop_address": {
    },
  • "latitude": "string",
  • "longitude": "string",
  • "customer": {
    },
  • "category": "string",
  • "mcc": "string",
  • "default_merchant": true,
  • "phone": "string",
  • "zone_id": "string",
  • "externals": [
    ],
  • "registration_mode": "Full",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Default merchant

Sets the flag that the given merchant is the default merchant (point of sale).

The default point of sale is used when some operation needs to select a point of sale, no matter which one.

Authorizations:
core_Authorization
path Parameters
id
required
number

Merchant identifier

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "shop_address": {
    },
  • "latitude": "string",
  • "longitude": "string",
  • "customer": {
    },
  • "category": "string",
  • "mcc": "string",
  • "default_merchant": true,
  • "phone": "string",
  • "zone_id": "string",
  • "externals": [
    ],
  • "registration_mode": "Full",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Register a merchant

Performs the registration of the merchant in external payment systems if necessary. The registration process is usually asynchronous.

At the beginning of the registration the merchant state changes to Pending, and then, upon successful completion of the registration, becomes Active.

If the registration fails, the Failed state is assigned. The reason of the error is written to the state_info field.

Since a legal entity can have several points of sale, the last registered one is assigned as the default point of sale. The default can be changed using the set default merchant function

The mode parameter allows specifying an additional registration mode; for example, with mode=simple only the legal entity is registered, without a point of sale. In the mode=full mode both the legal entity and the point of sale are registered. If the parameter is not specified, we assume full (full) registration by default.

Authorizations:
core_Authorization
path Parameters
id
required
string

Merchant identifier

query Parameters
mode
string

Registration mode

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "shop_address": {
    },
  • "latitude": "string",
  • "longitude": "string",
  • "customer": {
    },
  • "category": "string",
  • "mcc": "string",
  • "default_merchant": true,
  • "phone": "string",
  • "zone_id": "string",
  • "externals": [
    ],
  • "registration_mode": "Full",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Common API

Bank directory

Requests the bank directory by the bank code type:

  • LOCAL - requests the banks of the current provider's country
  • SWIFT - requests the banks connected to SWIFT
  • PROVIDER - requests the partner banks, if any are defined for the current provider.
  • FASTPAY - requests the banks that are registered in the local fast payment system.
Authorizations:
core_Authorization
query Parameters
type
required
string

Bank code type

page
integer <int32>

Page number

per_page
number

Number of items per page

acct_types
string

Account types (comma-separated)

code
string

Part of the bank code or name

Responses

Response samples

Content type
application/json
[
  • { }
]

Bank directory

Requests the bank directory by the bank code type:

  • LOCAL - requests the banks of the current provider's country
  • SWIFT - requests the banks connected to SWIFT
  • PROVIDER - requests the partner banks, if any are defined for the current provider.
  • FASTPAY - requests the banks that are registered in the local fast payment system.
Authorizations:
core_Authorization
query Parameters
type
required
string

Bank code type

page
integer <int32>

Page number

per_page
number

Number of items per page

acct_types
string

Account types (comma-separated)

code
string

Part of the bank code or name

Responses

Response samples

Content type
application/json
[
  • { }
]

Available currencies

Returns the list of currencies that are defined or available for the current application (provider). When creating a transaction or opening accounts, the currency identifier (asset_id) returned by this directory must be used.

Authorizations:
core_Authorization

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Customer groups by category

This API allows retrieving customer groups by a certain category, for example, tariff groups (tariff plans).

Authorizations:
core_Authorization
query Parameters
category
required
string

Group category

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Directory of the given type

Directories are used to fill in data, for example, a corporate customer profile, which uses the directory of legal forms (CORPORATE_TYPES) or the directory of activity types (INDUSTRY_CODES).

Authorizations:
core_Authorization
path Parameters
type
required
string

Directory type (for example, CORPORATE_TYPES or INDUSTRY_CODES)

query Parameters
per_page
integer <int32>

Number of records per page

page
string

Current requested page

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Event feed

Returns the list of events that occurred in the platform and are available to the current provider.

This API requires administrative access (an application of the "provider" type and presence in the list of managers of the current provider's application).

Events are available for the following objects:

  • User (for example, "Success" - successful authorization, "LoginError" - unsuccessful)
  • Customer (for example, "AddRelated" - a manager was added, "BlockedByBank" - blocked by the bank)
  • Contact (for example, "AddContact" or "RemoveContact")
  • Transaction (for example, state change events "Completed", "Confirmed", "Cancelled", "Registry" or errors "ValidationError", "ConfirmationError")
  • Account (for example, "CreateAccount", "CloseAccount" or "AddBlockade")
  • Limit (for example, "SetLimit" or "DeleteLimit")

The set of events and objects may vary depending on the project settings. The events in the selection can be filtered using two parameters: objects and events, which define the list of objects and event types respectively.

The event selection must always be limited in time, for which two parameters are used:

  • start, which sets the date from which events are cut off, for example, start=2023-12-02 - selection of events starting from this date.
  • timestamp, which sets the cut-off of the event selection starting from this time mark. For example, time=1720637323.568797000

Using timestamp is convenient when the appearance of new events is tracked. Each object in the events always has this attribute filled in, and it can be specified to continue the selection from the given event.

Using the start parameter is convenient when the list of events should be periodically monitored starting from a given day. Important! The start date is specified taking into account the time zone of the current provider under which the platform installation operates. For example, if the provider (for example, a bank) operates in the GMT+5 time zone, then events with a generation time later than 19:00 UTC will belong to the next day.

When timestamp is used, the sorting of events in the selection is always ascending regardless of the sort parameter value.

Authorizations:
core_Authorization
query Parameters
start
string

Date from which the event feed is cut off

per_page
integer <int32>

Page size in the selection

page
integer <int32>

Current page number

sort
string

Sorting by creation date (created)

timestamp
string

Time mark (seconds + nanoseconds)

objects
string

List of required objects (comma-separated)

events
string

List of required events (comma-separated)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

PING

Checks the health of the API service.

Authorizations:
core_Authorization

Responses

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "description": "string",
  • "page": 5,
  • "per_page": 100,
  • "total": 0
}

Current user

Returns the data of the current authorized user — the user identifier, current roles, the list of authorized customers and other information.

The auth_channel field indicates the authentication method that was used:

  • SMS - additional authentication was performed via an SMS code.
  • APP - additional authentication was performed via an external authenticator application
  • CERTIFICATE - login was performed by certificate (additional authentication is usually not required)
  • PWD - login was performed only by login/password (functionality may be limited)
Authorizations:
core_Authorization

Responses

Response samples

Content type
application/json
{
  • "login": "string",
  • "name": "string",
  • "client_id": "string",
  • "locale_id": "ru_RU",
  • "roles": [
    ],
  • "customers": [
    ],
  • "customer": 0,
  • "user_customer": 0,
  • "auth_channel": "SMS",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

External Entities API

Deleting external IDs

Removes all links between the external identifier (from another external system) and the specified object type (for example, User).

Authorizations:
core_Authorization
path Parameters
ext
required
string

External identifier

type
required
string

Object type

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Deleting an external ID

Removes the link between the external identifier (from another external system) and the object's own identifier in the Platform.

Authorizations:
core_Authorization
path Parameters
ext
required
string

External identifier

type
required
string

Object type

id
required
string

Object identifier

Responses

Response samples

Content type
application/json
[
  • {
    }
]

External ID history

Returns the list of all external identifiers ever associated with the given object. Including unlinked ones (status = Inactive).

Authorizations:
core_Authorization
path Parameters
id
required
string

Object identifier

type
required
string

Object type

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Restoring an external ID

Restores an unlinked external identifier if it has not been reused anywhere.

Authorizations:
core_Authorization
path Parameters
id
required
string

The identifier of the ExternalEntity object

Responses

Response samples

Content type
application/json
{
  • "provider": {
    },
  • "external_id": "string",
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Terraform API

Convert to demo

Converts the specified customer into a demo customer. For natural persons, the login procedure changes after conversion to a demo customer — all PIN codes and OTP codes can only take the value "1234".

In general, after conversion to demo, all customer transactions are effectively marked as executed, but in reality they create no account entries.

Using demo customers can be convenient in automated integration tests, to eliminate the need to send codes through external channels. Demo users are also suitable for safely handing an account over to external counterparties, for example when moderating in the AppStore/Google Play.

Authorizations:
core_Authorization
path Parameters
id
required
string

Customer identifier

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "type": "Individual",
  • "kind": "Bank",
  • "compliance_state": "Restricted",
  • "business_code": "string",
  • "externals": [
    ],
  • "id": 12345,
  • "state": "string",
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state_changed": "2022-12-07T14:03:32.659+00:00",
  • "state_info": "string"
}

List of loaders

Returns the list of all data loading claims.

Authorizations:
core_Authorization
query Parameters
page
integer <int32>

Page number

per_page
integer <int32>

Number of items per page

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Creating a loader

Creates a draft of a new loading claim.

Authorizations:
core_Authorization
Request Body schema: application/json
required
title
required
string

Name of the request used to identify it.

algorithm
required
string

Request processing algorithm. Selected from those supported by the specific project.

Array of objects (DataLoaderItem)

Set of requests

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "algorithm": "string",
  • "contents": [
    ]
}

Response samples

Content type
application/json
{
  • "title": "string",
  • "algorithm": "string",
  • "contents": [
    ],
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Loader details

Returns the details of a particular data loading claim.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Object identifier

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "algorithm": "string",
  • "contents": [
    ],
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Editing a loader

Corrects the loading claim based on the new data. Correction is possible if the claim is in the state: New, Draft or Verified.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Object identifier

Request Body schema: application/json
required
title
required
string

Name of the request used to identify it.

algorithm
required
string

Request processing algorithm. Selected from those supported by the specific project.

Array of objects (DataLoaderItem)

Set of requests

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "algorithm": "string",
  • "contents": [
    ]
}

Response samples

Content type
application/json
{
  • "title": "string",
  • "algorithm": "string",
  • "contents": [
    ],
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Deleting a loader

Deletes the draft of the loading claim. Deletion is possible for the states: New, Draft or Verified.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Object identifier

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "algorithm": "string",
  • "contents": [
    ],
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Executing the claim

Sends the claim for execution after validating it.

Authorizations:
core_Authorization
path Parameters
id
required
integer <int32>

Loading claim identifier

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "algorithm": "string",
  • "contents": [
    ],
  • "id": 12345,
  • "created": "2022-12-07T14:01:59.515+00:00",
  • "modified": "2022-12-11T07:00:55.567+00:00",
  • "state": "string",
  • "state_info": "string",
  • "state_changed": "2022-12-07T14:03:32.659+00:00"
}

Reports API

Report data

Authorizations:
core_Authorization
path Parameters
report
required
string

Report identifier

query Parameters
page
integer <int32>

Current page

per_page
integer <int32>

Number of records per page

Responses

Response samples

Content type
application/json
[
  • { }
]

Report data in CSV

Returns the report, but in the CSV format.

Authorizations:
core_Authorization
path Parameters
report
required
string

Report identifier

query Parameters
page
integer <int32>

Current page

per_page
integer <int32>

Number of records per page

Responses

Response samples

Content type
application/json
{ }

Connecting to an MCP Server

Two MCP servers are available for the sandbox: a Russian-language one and an English-language one.

The Russian-language server uses the following address: https://mcp.test.dw-dynamics.com/mcp. The English-language server uses the following address: https://mcp.test.dw-dynamics.com/mcp/en.

For example, for Claude Code you can use the following configuration (locally in the project or globally):

{
  "mcpServers": {
    "dwd-api": {
      "type": "http",
      "url": "https://mcp.test.dw-dynamics.com/mcp/en",
      "headersHelper": "${CLAUDE_PROJECT_DIR:-.}/scripts/get-dwd-token.sh"
    }
  }
}

Since all API functions require an access or JWT token, it must be obtained before using the MCP server. To authorize each MCP request, you can use the scripts/get-dwd-token.sh script specified in the configuration above, which will be called automatically on every request to the MCP server (the script can be placed in the current directory of the Claude Code project).

An example of such a script:

#!/usr/bin/env bash
# Emits the Authorization header for the dwd-api MCP server.
# The token lives outside the project, in a 600 file.
set -euo pipefail

TOKEN_FILE="${DWD_TOKEN_FILE:-$HOME/.config/dwd/token}"

if [[ ! -r "$TOKEN_FILE" ]]; then
  echo "get-dwd-token: cannot read $TOKEN_FILE" >&2
  exit 1
fi

token=$(tr -d '[:space:]' < "$TOKEN_FILE")

if [[ -z "$token" ]]; then
  echo "get-dwd-token: $TOKEN_FILE is empty" >&2
  exit 1
fi

printf '{"Authorization": "Bearer %s"}\n' "$token"

In this example, the token is stored in the $HOME/.config/dwd/token file, which must be readable and must not be empty.

How to work with the MCP server?

In the chat, ask the agent a question:

The question:

What are my account balances?

The response:

The balances are zero across all three accounts (client Gordon Freeman, demo):

Account Currency Balance
477709101 — Som Account KGS 0.00
477709102 — US $ USD 0.00
477709103 — Pooled Gold XAU 0.00000

Additionally, the estimated and ledger balances are also zero — there are no holds or reserves.