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

User Identification API is used to provide identity documents and face photos of clients to verify their identity, increase their transfer limits, grant access to some features provided by Paysera etc.

Data structures

Identification request data structure

Параметр
Тип
Примечания
Oписание
id
integer
always
ID of a identification request
user_id
integer
if present
User id
phone
string
if present
Phone
locale
string
if present
Locale of identification request
created
integer
always
Identification request create date
status
string
always
One of these: waiting, processing, pending, reviewed. See below for explanation for each status.
realation_status
string
always
One of these: related, relating, unrelated.
provider
string
always
One of these: wallet_user, wallet_partner, imported, web.
face_photos
array of face photos
if present
Attached face photos to identification request
identity_documents
array of identity documents
if present
Attached identity documents to identification request
comment
string
if present
Comment is provided after identification request is reviewed. It will contain information what actions were taken. For example, user was identified and/or limits were increased.

Identification request status field definition list

Информация Statuses are provided in sequence they change based on an action.
Parameter
Explanation
waiting
Waiting for identity documents and/or face photos to be attached
processing
Identification request is being processed and prepared for Customer support to review
pending
Identification request is queued for review
reviewed
Identification request was reviewed

Face photo data structure

Параметр
Тип
Примечания
Oписание
link
integer
always
Link to face photo
order
integer
always
Order of image in identification request

Identity document data structure

Параметр
Тип
Примечания
Oписание
id
integer
always
ID of a identity document
type
string
if present
One of these: identity_card, passport, residence_permit
Deprecated parameter: driver_license
personal_number
string
if present
Personal number
country
string
if present
Country code provided in ISO-639-1 standard
date_of_birth
string
if present
Date of birth provided in YYYY-MM-DD format (e.g. 1991-04-17)
first_name
string
if present
First name
last_name
string
if present
Last name
images
array of identity document images
if present
Attached identity document images to identity document

Identity document image structure

Параметр
Тип
Примечания
Oписание
link
integer
always
Link to identity document image
order
integer
always
Order of image in identity document

Requests

Create user identification request

POST https://wallet.paysera.com/rest/v1/user/:user_id/identification-request

Parameters

user_id
ID of the user

Response

Response is an identification request data structure.

Example request

POST /rest/v1/user/1/identification-request HTTP/1.1
Host: wallet.paysera.com
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="VP7OZx/ItbyEHGNicOYD115jhOnysZqbDU88SPIaK18="

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "id": 1,
    "user_id": 1,
    "created": 1587381873,
    "status": "waiting",
    "relation_status": "related",
    "provider": "wallet_user"
}

Create identification request

POST https://wallet.paysera.com/rest/v1/identification-request

Request body structure

Параметр
Тип
Примечания
Oписание
phone
string
optional
Phone

Response

Response is an identification request data structure.

Example request

POST /rest/v1/identification-request/identification-request HTTP/1.1
Host: wallet.paysera.com
Content-Type: application/json;charset=utf-8
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="Y1T68JX6VNUhENeaW2mWLGhk2AY8jgskrw1vY63l5qk=", ext="body_hash=li5ts4pbIawV7aw2zqqqmYtKqWmpmnsyKP5smnRBtrA%3D"
{
    "phone": "+37060000001"
}

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "id": 1,
    "phone": "+37060000001",
    "locale": "en",
    "created": 1587378826,
    "status": "waiting",
    "relation_status": "unrelated",
    "provider": "wallet_user"
}

Relate identification request

PUT https://wallet.paysera.com/rest/v1/identification-request/:request_id/relate

Parameters

request_id
ID of the identification request

Response

Response is an identification request data structure.

Example request

PUT /rest/v1/identification-request/1/relate HTTP/1.1
Host: wallet.paysera.com
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="XKmwdlAfvZbxsJUy+ViF+BDQMwYZ7yalxHxZr92SPuk="

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "id": 1,
    "phone": "+37060000001",
    "locale": "en",
    "created": 1587378826,
    "status": "waiting",
    "relation_status": "relating",
    "provider": "wallet_user"
}

Get identification request

GET https://wallet.paysera.com/rest/v1/identification-request/:request_id

Parameters

request_id
ID of the identification request

Response

Response is an identification request data structure.

Example request

GET /rest/v1/identification-request/1 HTTP/1.1
Host: wallet.paysera.com
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="1iJpy3h7/r8QdRsDGicqwVuEB08WY/pp94F3dyIEmFU="

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "id": 1,
    "user_id": 1,
    "created": 1587381873,
    "status": "waiting",
    "relation_status": "related",
    "provider": "wallet_user"
}

Get user identification requests

GET https://wallet.paysera.com/rest/v1/user/:user_id/identification-requests

Parameters

user_id
ID of the user

Response

Response is an identification requests data structure.

Example request

GET /rest/v1/user/1/identification-requests HTTP/1.1
Host: wallet.paysera.com
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="zkvsgj/+oSe/ZUNuNtriwfzD4abVHrFmBeZcG3vnkB8="

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "identification_requests": [
        {
            "id": 1,
            "user_id": 1,
            "created": 1587381873,
            "status": "waiting",
            "relation_status": "related",
            "provider": "wallet_user"
        }
    ],
    "_metadata": {
        "total": 1,
        "limit": 20,
        "offset": 0,
        "has_next": false,
        "has_previous": false
    }
}

Create identity document

POST https://wallet.paysera.com/rest/v1/identification-request/:request_id/identity-document

Parameters

request_id
ID of the identification request

Request body structure

Параметр
Тип
Примечания
Oписание
type
string
optional
One of these: identity_card, passport, residence_permit
Deprecated parameter: driver_license
personal_number
string
optional
Personal number
country
string
optional
Country code provided in ISO-639-1 standard
date_of_birth
string
optional
Date of birth provided in YYYY-MM-DD format (e.g. 1991-04-17)
first_name
string
optional
First name
last_name
string
optional
Last name

Response

Response is an identity document data structure.

Possible errors

HTTP status code
Code
Description
204
invalid_state
Identification request is not in waiting state.

Example request

POST /rest/v1/identification-request/1/identity-document HTTP/1.1
Host: wallet.paysera.com
Content-Type: application/json;charset=utf-8
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="eQ6x9vU+Sxs9/Tnrj3W9Y5ACOeXNuOCtJaFg/fm6/EA=", ext="body_hash=aYy6BMD4pS5iovwINcY4CnX7difMxYpz8p6w4WCotQw%3D"
{
    "type": "identity_card",
    "personal_number": "12345"
}

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "id": 1,
    "identification_request_id": 1,
    "type": "identity_card",
    "personal_number": "12345",
    "files": [],
    "created_at": 1587383330,
    "user_id": 1,
    "reliability": null
}

Attach image to identity document

PUT https://wallet.paysera.com/rest/v1/identity-document/:document_id/image/:order

Parameters

document_id
ID of the identity document
order
Order of identity document image. Must be unique per identity document.

Response

An empty response with HTTP status code of 200.

Possible errors

HTTP status code
Code
Description
204
invalid_state
Identification request is not in waiting state.

Example request

PUT /rest/v1/identity-document/1/image/0 HTTP/1.1
Host: wallet.paysera.com
Content-Type: application/x-www-form-urlencoded;charset=utf-8
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="dW1a3DKm1UKBrNB+CGCQ8fSRKDF2gv3xtEJ2Iyo3WNY=", ext="body_hash=%2FJUKG6Zur99zq1gzxwtIQOwwTGWaGTkNvG6x%2FG8AlW8%3D"
<image binary data>

Example response

HTTP/1.1 200 OK

Attach face photo to identification request

PUT https://wallet.paysera.com/rest/v1/identification-request/:request_id/face-photo/image/:order

Parameters

request_id
ID of the identification request
order
Order of identification request face photo image. Must be unique per identification request.

Response

An empty response with HTTP status code of 200.

Possible errors

HTTP status code
Code
Description
204
invalid_state
Identification request is not in waiting state.

Example request

PUT /rest/v1/identification-request/1/face-photo/image/0 HTTP/1.1
Host: wallet.paysera.com
Content-Type: application/x-www-form-urlencoded;charset=utf-8
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="PqXSVLzwfpgRILSoHGQQnuNWB+jlhOLktk/ksDP8Fyg=", ext="body_hash=%2FJUKG6Zur99zq1gzxwtIQOwwTGWaGTkNvG6x%2FG8AlW8%3D"
<image binary data>

Example response

HTTP/1.1 200 OK

Attach file to identity document

POST https://wallet.paysera.com/rest/v1/identity-document/:document_id/file

Parameters

document_id
ID of the identity document

Response

Response is a file data structure.

Possible errors

HTTP status code
Code
Description
204
invalid_state
Identification request is not in waiting state.

Example request

POST /rest/v1/identity-document/1/file HTTP/1.1
Host: wallet.paysera.com
Content-Type: application/json;charset=utf-8
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="v+qUO7rg3IRLX9JLXX8tASrCHECbTrA3DuG0JS0bTF0=", ext="body_hash=T1PNoYwrqgwDVLtfmj7L5e0Sq02OEbqHPC8RFhICuUU%3D"
[]

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "file_id": 1,
    "mime_type": "application/json"
}

Get identity document file

GET https://wallet.paysera.com/rest/v1/identification-document/:document_id/file/:file_id

Parameters

document_id
ID of the identification document
file_id
ID of the file

Response

Response is a file data structure.

Example request

GET /rest/v1/identity-document/1/file/1 HTTP/1.1
Host: wallet.paysera.com
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="rH6m9GjQwMF9G8A8ucXUOeloZYkxajmkL0iYmugTI7E="

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "file_id": 1,
    "mime_type": "application/json"
}

Submit identification request for a review

PUT https://wallet.paysera.com/rest/v1/identification-request/:request_id/submit

Parameters

request_id
ID of the identification request

Response

An empty response with HTTP status code of 200.

Possible errors

HTTP status code
Code
Description
204
invalid_state
Identification request is not in waiting state.

Example request

PUT /rest/v1/identification-request/1/submit HTTP/1.1
Host: wallet.paysera.com
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="3MWEGuOcDOBURqpp2oWCmFH06Jd6kW45M+XSRicBDiQ="

Example response

HTTP/1.1 200 OK