Atsiprašome, kol kas šios programinės sąsajos specifikacija galima tik anglų kalba.

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

Parameter Type Remarks Description
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

Info 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

Parameter Type Remarks Description
link integer always Link to face photo
order integer always Order of image in identification request

Identity document data structure

Parameter Type Remarks Description
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

Parameter Type Remarks Description
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="1343822400", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="ADkSGUK4FKAyFHWwvumLvkbSFIt1T8erzHx8h72y+9U="

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

Parameter Type Remarks Description
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="1343822400", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="LeWKRHvodZ5d3wRfe9qOEa8e2rq0TdDQYBgV+lZ7Rck=", 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="1343822400", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="3sh9tCISZBi4kos8cSIcy2gA6pI4DIJD7o7wWUdlzWw="

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="1343822400", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="s5WI/hEK3Zy+juzn6er+wowHsxjrNXIz6hWt+fG+g8E="

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="1343822400", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="3pUXnZ1c3yEmiE61g75bme/PHu6Qjvc8r0eMq7buFb4="

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

Parameter Type Remarks Description
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="1343822400", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="XR5kUCJDeHJUs0XOMKbMBYLkqudC1nlpWyQ7ixrvcfE=", 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="1343822400", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="6rvGTv4N+NGudvJc37XPk1TyqJzPr9koTe78J/GAEC0=", 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="1343822400", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="kGRHDywhGr1KDZcep6P9Kp2ElneLllieP+arXHNp9c0=", 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="1343822400", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="s0n+13B1AxuTwVYyf4B97j/wDlirMdPfukyWwyUpNMU=", ext="body_hash=d1xpE3fYMvFYJZ6834FBfNjyjA0I8KoOdQ%2Fprn5%2BG7Y%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="1343822400", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="t9pnRWih1PTRvfSxUfoQBTzSqq2PUsKQW/wOuwgV+xE="

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 or pending 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="1343822400", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="vhWb05CjGOAIYxE4FjLA0FaU262NS/oDRlIUch0zbZ4="

Example response

HTTP/1.1 200 OK