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.
Endpoint
How to set this out
<server address> + /api/v1.1/ + <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
Name | Mandatory | Type | Description |
---|---|---|---|
X-PARTNER-PROJECT | + | string | Project identifier. Given to you by your Bank 131 manager |
Request example with authentication
curl -X GET \
https://kyc-stage.bank131.ru/api/v1.1/check/7 \
-H 'Content-Type: application/json' \
-H 'X-PARTNER-PROJECT: your_project_name' \
-d '{
// request body
}'
Request signature
Since personal data are transmitted in verification requests, requests must be signed with CryptoPro.
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.
Example of creating a signature with cryptcp
cryptcp -encr -thumbprint a2963503c955a34c8a5f7d4abf5e08874827a3aa -thumbprint 5567d04803d51080cec4aa030ff0ef6e26fe7740 -uMy -der bank131_20200903.txt.sig bank131_20200903.txt.sig.enc
Step 3. Add the signature to the request
Specify the signature in the signature
field.