Skip to main content

Interaction

Request format

All the data in requests to Bank 131 and notifications from the Bank are transmitted with the use of the GET/POST method over HTTP. Message parameters are packed into a JSON object.

Currently, two versions of the same method exist. However, version 1.1 is no longer updated, so we recommend using version 2.0.

Endpoint

How to set this out

<server address> + /api/v2.0/ + <address for sending requests of the appropriate method>

Server addresses

  • For testing: https://kyc-stage.bank131.ru/
  • For live testing: https://kyc.bank131.ru/

Authentication

Specify your project ID in the headers of requests to Bank 131.

Headers

NameMandatoryTypeDescription
X-PARTNER-PROJECT+stringProject identifier. Given to you by your Bank 131 manager

Request example with authentication

curl -X GET \
https://kyc.bank131.ru/api/v2.0/check/7 \
-H 'content-type: application/json' \
-H 'X-PARTNER-PROJECT: your_project_name' \
-d '{
// request body
}'

Request signature

Since personal data is transmitted in identification requests, requests must be signed with CryptoPro.
Non-resident individuals can sign their requests using RSA Keys. To enable this functionality, contact your manager in Bank 131.

Getting started with CryptoPro

  1. Get the enhanced encrypted and certified digital signature (EECDS) if you don't have one. You can get it from any verification center.

To test, create an electronic signature verification key certificate in the CryptoPro Test Verification Center. Remember that you cannot use it in real transactions.

  1. Install CryptoPro CSP on your computer.

  2. Add your electronic signature certificate to CryptoPro (for example, check this guide for Windows).

  3. Submit to the Bank a list of IP addresses you will use to send requests.

  4. Send the public part of the electronic signature verification key to your Bank 131 manager so we can identify your requests.

Ready! You can now sign the requests with CryptoPro.

How to sign requests

Step 1. Create a signature file

Take the request body (payload content), sort by key, and write to the file. Use the UTF-8 encoding system.

Example
import json

payload = {...}

payload_bytes = bytes(json.dumps(payload, sort_keys=True) + '\r\n', encoding='utf-8')

with open('payload_bytes.jsonb', 'wb') as f:
f.write(payload_bytes)

Step 2. Sign the file

Sign the file with CryptoPro. You can use the cryptcp application (part of CryptoPro).

Example of creating a signature with cryptcp
cryptcp -sign -display -thumbprint <signature key fingerprint> -detached payload_json.json payload_json.sig

Step 3. Add the signature to the request

Get the signature from payload_json.sig and pass it in the signature field of the request.