User Resource
Access and manage user information including registration, identification, profile data, and services.
Overview
The User Resource provides comprehensive methods for managing user data.
Quick Reference
| Feature | Endpoints | Required Scope | Description |
|---|---|---|---|
| Get User Info | GET /user/:id | email, phone, etc. | Retrieve user details |
| Register User | POST /user | Special permission | Create new user |
| Phone/Email | POST/PUT /user/:id/phone | - | Assign and confirm |
| Password | POST/PUT /user/password | - | Reset and change |
| Services | GET/PUT /user/:id/services | services | Manage services |
| Position | PUT/GET /user/:id/position | user_position | Geo location |
| Avatar | PUT/DELETE /user/:id/avatar | avatar | Manage avatar |
| Documents | POST /user/:id/document | Special permission | Upload docs |
| Contact Book | POST /user/:id/contact-book | - | Manage contacts |
→ Full scope list: Available Scopes
Get User Information
Retrieve user information by ID or other identifiers.
By User ID
GET /rest/v1/user/:id
Parameters:
id- User ID (integer) orme(with access token)
By Other Information
GET /rest/v1/user?person_code[:nationality]=:code&email=:email&phone=:phone
Query Parameters:
person_code- Person's identification code (with nationality)nationality- ISO 3166-1 alpha-2 country codeemail- Confirmed email addressphone- Confirmed phone (country code, no00or+)
Searching by person code requires special API client permissions.
📋 Response Structure & Example
Response Fields
| Field | Type | When Available | Description |
|---|---|---|---|
id | integer | Always | User ID |
email | string | With email scope | Verified email |
phone | string | With phone scope | Verified phone |
address | object | With address scope | User address |
dob | string | With dob scope | Date of birth (yyyy-mm-dd) |
gender | string | With gender scope | male or female |
identity | object | With identity/full_name scope | Verified identity |
identification_level | string | With identification_level scope | Identification level |
calculated_level | string | With identification_level scope | Calculated identification level of the user |
type | string | Not returned by default; enabled only for some clients | Type of client: legal or natural |
wallets | array | With wallet_list scope | Wallet IDs |
options | object | If available | User options |
pep | array | With pep scope | Politically exposed persons |
Example Response
{
"id": 221,
"email": "something@example.com",
"phone": "37066612345",
"address": {
"country": "lt",
"city": "Vilnius",
"street": "Lauko g. 1",
"post_index": "LT-11111"
},
"dob": "1910-01-23",
"gender": "male",
"identity": {
"name": "John",
"surname": "Smith",
"nationality": "lt",
"code": "31001230000"
},
"identification_level": "fully_identified",
"wallets": [14471],
"options": {
"default_currency": "EUR"
}
}
Identification Levels
| Level | Description |
|---|---|
unidentified | Level 1 - Starter |
semi_identified | Level 2 - Basic |
basic_identified | Level 2.5 - Intermediate |
identified | Level 3 - Standard |
fully_identified | Level 4 - Unlimited |
Getting Specific User Information
Request specific fields individually:
GET /rest/v1/user/:id/email - Get email only
GET /rest/v1/user/:id/phone - Get phone only
GET /rest/v1/user/:id/address - Get address only
GET /rest/v1/user/:id/identity - Get identity only
GET /rest/v1/user/:id/wallets - Get wallets array
Returns 403 if no permissions, 404 if information not available.
Register New User
User registration requires special client permissions.
➕ Register New User - Full Documentation
Register User
POST /rest/v1/user
Request Body
{
"email": "email@example.com",
"phone": "37066612345",
"locale": "lt",
"identity": {
"name": "John",
"surname": "Smith",
"nationality": "lt",
"code": "31001010000"
},
"credentials": {
"type": "main-password",
"password": "secretPassword22"
},
"parameters": {
"phone_link": "myapp://phone_confirmation/{code}"
}
}
Request Fields
| Field | Required | Description |
|---|---|---|
email | Conditional | Email address |
phone | Conditional | Phone number (country code, no 00/+) |
locale | Optional | User locale (en, lt, ru) |
identity | Optional | Name, surname, nationality, code |
credentials | Conditional | Login credentials |
card | Optional | Card information |
parameters | Optional | Additional parameters |
Credential Types
main-password - Permanent password (for new registrations)
{
"type": "main-password",
"password": "plainTextPassword"
}
pre-salt-sha1-base64 - Custom credentials (for migrations)
{
"type": "pre-salt-sha1-base64",
"password": "hashedPassword",
"password_salt": "base64Salt",
"username": "johnsm"
}
Response
Returns user object with created user information.
Errors
card_already_assignedperson_code_already_assignedemail_already_assignedphone_already_assigned
Advanced Features
📱 Phone & Email Management
Assign Phone
POST /rest/v1/user/:userId/phone
{
"phone": "37066612345",
"parameters": {
"phone_link": "myapp://confirm/{code}"
}
}
User receives SMS with confirmation code.
Confirm Phone
PUT /rest/v1/user/:userId/phone/confirm
{
"code": "ABCDEF"
}
Errors: phone_already_assigned, invalid_code, rate_limit_exceeded
Assign Email
POST /rest/v1/user/:userId/email
{
"email": "test@example.com",
"parameters": {
"email_link": "myapp://confirm/{code}"
}
}
Confirm Email
PUT /rest/v1/user/:userId/email/confirm
{
"code": "ABCDEF"
}
🔒 Password Management
Request Password Reset
POST /rest/v1/user/password/reset
{
"email": "email@example.com",
"identity": {
"code": "31001010000"
}
}
User receives confirmation code via email/SMS.
Change Password
PUT /rest/v1/user/:userId/password
With reset code:
{
"code": "ABCDEF",
"password": "newPassword123"
}
With old password:
{
"old_password": "oldPassword",
"password": "newPassword123"
}
Errors: identity_required, invalid_identity, invalid_code, invalid_password, rate_limit_exceeded
⚙️ User Services
Manage user-enabled services (requires services scope).
Get User Services
GET /rest/v1/user/:userId/services
Enable Service
PUT /rest/v1/user/:userId/service/:service
Available Services
| Service | Description |
|---|---|
affiliate | Affiliate program participant |
macro | Macro payments collection |
micro | Micro payments collection |
offline | Offline service |
payment_instruments | Payment instruments usage |
paysera_app | Paysera app usage |
sms_bank | SMS bank service |
📍 Position Management
Manage user's geographic position (requires user_position scope).
Provide Position
PUT /rest/v1/user/:userId/position
{
"lat": 54.698686,
"lng": 25.216615,
"type": "merchant"
}
Types: Default (public), hidden (not in search), merchant (mobile retailers)
Get Position: GET /rest/v1/user/:userId/position
Remove Position: DELETE /rest/v1/user/:userId/position
Get Users' Positions: GET /rest/v1/positions?lat=:lat&lng=:lng&distance=:distance
🖼️ Avatar Management
Manage user avatars (requires avatar scope).
Display Avatar
GET https://www.paysera.com/avatar/:userId.jpg?size=:size
No authentication required for viewing.
Upload Avatar
PUT /rest/v1/user/:userId/avatar
Body: Binary image content (not JSON)
Delete Avatar
DELETE /rest/v1/user/:userId/avatar
📄 Document Management
Upload identification documents (requires special permissions).
Upload Document
POST /rest/v1/user/:userId/document
Body: Binary file content
Provide Document Metadata
PUT /rest/v1/user/document/:documentId/metadata
{
"title": "Passport scan",
"extension": "pdf",
"type": "passport",
"number": "AB1234567",
"date": "2020-01-15"
}
Document Types: card, passport, driver_licence
🆔 Identification Process
Provide user identity information (requires special permissions).
Provide Identity
PUT /rest/v1/user/:userId
{
"email": "user@example.com",
"identity": {
"name": "John",
"surname": "Smith",
"nationality": "lt",
"code": "31001010000"
}
}
For offline or gateway clients. Receipt must be printed after this operation.
Get Identification Receipt
GET /rest/v1/user/:userId/receipt/identification?locale=:locale&width=:width
Get Registration Receipt
GET /rest/v1/user/:userId/receipt/registration?locale=:locale&width=:width
📖 Contact Book
Manage contact book for wallet search and notifications.
Create Contact Book
POST /rest/v1/user/:userId/contact-book
{
"emails": ["a@example.com", "b@example.com"],
"phones": ["37012345678"],
"email_hashes": ["hash1", "hash2"],
"phone_hashes": ["hash3"]
}
Delete Contact Book: DELETE /rest/v1/contact-book/:contactBookId
Remove Contacts: DELETE /rest/v1/contact-book/:id/contacts?email=:emails&phone=:phones
Append Contacts: PUT /rest/v1/contact-book/:id/append
Common Use Cases
Get Current User Profile
GET /rest/v1/user/me
Authorization: MAC id="access_token", ...
Register User with Email
POST /rest/v1/user
Content-Type: application/json
{
"email": "user@example.com",
"credentials": {
"type": "main-password",
"password": "SecurePass123"
}
}
Update User Avatar
PUT /rest/v1/user/me/avatar
Content-Type: image/jpeg
[binary image data]
What's Next?
- Wallet Resource - Work with wallets and balances
- Available Scopes - Review required scopes
- API Reference - Full endpoint documentation
Need Help?
- API Support: tech_support@paysera.com
- Scope Issues: Review Available Scopes
- OAuth Help: Check OAuth Guide