Informacija Atsiprašome, šis skyrius galimas tik anglų kalba.

Get wallet information

This method returns information about the wallet.

Requesting wallet by ID

GET https://wallet.paysera.com/rest/v1/wallet/:id

Parameters

id
id of the wallet. Can be integer or me (if access token is used)

Requesting wallet by other information

GET https://wallet.paysera.com/rest/v1/wallet?phone=:phone&email=:email&account_number=:account_number&person_code[:nationality]=:person_code&company_code[:country_code]=:company_code&barcode=:barcode&licence_plate=:licence_plate&card[:card_issuer]=:card_number&user_id=:user_id

Parameters

phone
phone of the user; must start with country code and without 00 or + sign
email
email address of the user
account_number
account number of the user
person_code
person's identification code
nationality
person's nationality (country to which person code belongs) in ISO 3166-1 alpha-2 format
company_code
code of the company
country_code
country in which company is registered; in ISO 3166-1 alpha-2 format
barcode
special barcode, generated for identifying wallet
licence_plate
text on a licence plate of a car without any special symbols
card_number
card's number
card_issuer
card's issuer, for example "vilniecio"
user_id
unique user's ID
Informacija Only one of parameters can be passed to search only by that criteria
Įspėjimas Be sure to validate phone number for country code before passing to API - 86 is country code for China
Įspėjimas API client must have special permissions configured to be able to search by person's code

Response data structure

Parametras
Tipas
Pastabos
Aprašymas
id
integer
always
ID of the wallet
owner
integer
always
User ID, to which this wallet belongs
account
object
always
Information about account, related to this wallet

Account data structure

Parametras
Tipas
Pastabos
Aprašymas
number
string
always
Number of this account
owner_display_name
string
only if current access token has scope wallet_list or scope wallet_list_offline was confirmed
Display name of the owner of this account, usually the user herself
owner_title
string
only if current access token has scope wallet_list or scope wallet_list_offline was confirmed and only if user has confirmed identity
Confirmed title of the owner of this account, usually the user herself. Name and surname is provided, if owner has confirmed identity. Company title is provided in case owner is a company. If user is of another type or it's title is not confirmed, null is provided. This is usually the same as owner_display_name
description
string
only if current access token has scope wallet_list or scope wallet_list_offline was confirmed and only if one exists for this account and user
Custom description of this account, set by the user in the system
user_id
integer
only if current access token has scope wallet_list or scope wallet_list_offline was confirmed
Account owner user id
type
string
only if current access token has scope wallet_list or scope wallet_list_offline was confirmed
One of these: local, technical, card.
ibans
array of strings
only if the user has passed the requirements for an IBAN account
Related IBANs to the account

Example request

GET /rest/v1/wallet/14471 HTTP/1.1
Host: wallet.paysera.com
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="I0URYjGzh9YHvI8KCidOt8uY/PH5puC2ZFKPcBb6L+U="
Informacija In this example we are requesting information about wallet which ID is 14471

Example request by phone number

GET /rest/v1/wallet?phone=37066612345 HTTP/1.1
Host: wallet.paysera.com
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="miBUIRAV3U/ModO8I5W6tm8PgSygPMkqr+01SnCImak="
Informacija In this example we are requesting information about wallet which phone number is +370 666 12345

Example request by company code

GET /rest/v1/wallet?company_code%5Blt%5D=300060819 HTTP/1.1
Host: wallet.paysera.com
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="TRRL6hNc9lK1ynjK/p3fNwnjSJ0GWiQz4Bv3QmGSGvY="
Informacija In this example we are requesting information about wallet which belongs to company, registered in Lithuania with code 300060819

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "id": 14471,
    "owner": 221,
    "account": {
        "number": "EVP0010001000101"
    }
}
Informacija You can use this method to bind Paysera wallet to the user in your system. For example, if you want to make payments between users, you'll need parameter beneficiary, which is ID of some wallet in Paysera system. You can get access token and get wallet information using it or get wallet ID by user-provided phone number.

Get balance of a wallet

This method returns information about the balance in the wallet.

Requesting wallet balance by ID

GET https://wallet.paysera.com/rest/v1/wallet/:walletId/balance?convert_to=:convertToCurrency&show_historical_currencies=:showHistoricalCurrencies

Parameters

walletId
id of the wallet. Can be integer or me (if access token is used)
convertToCurrency
optional; currency code to convert all currencies to (result is extended with additional info if this parameter is provided)
showHistoricalCurrencies
optional; boolean. Whether to show or not currencies with 0 balance
Informacija You must have an access token with balance_offline scope confirmed to use this method. Request can be authenticated either by project credentials or by current access token.
Įspėjimas User can revoke the privileges, so you should expect for an error if this would be the case.

Response data structure

Response is an object with keys as currency codes. Each item in the array is of the following structure:
Parametras
Tipas
Pastabos
Aprašymas
at_disposal
integer
always
Amount in cents of the balance at disposal in the specified wallet
at_disposal_decimal
string
always
Decimal amount of the balance at disposal in the specified wallet
reserved
integer
always
Amount in cents of the reserved funds in the specified wallet
reserved_decimal
string
always
Decimal amount of the reserved funds in the specified wallet
converted
object
only if parameter convert_to was provided
Object has keys at_disposal and reserved with amouts for currency, provided in parameter convert_to

Example request

GET /rest/v1/wallet/14471/balance HTTP/1.1
Host: wallet.paysera.com
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="Qj0PSwlPicgVGbJ54uvVd6nX3t6bTl8mz1S0x5tLsKY="
Informacija In this example we are requesting balance of wallet which ID is 14471

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "EUR": {
        "at_disposal": 2299,
        "at_disposal_decimal": "22.99",
        "reserved": 0,
        "reserced_decimal": "0"
    },
    "USD": {
        "at_disposal": 100,
        "at_disposal_decimal": "1.00",
        "reserved": 9800,
        "reserced_decimal": "98.00"
    }
}
Informacija In this example wallet has 22.99 EUR and 1.00 USD balance at disposal. Also 98.00 USD are reserved.

Example request with currency conversion

GET /rest/v1/wallet/14471/balance?convert_to=EUR HTTP/1.1
Host: wallet.paysera.com
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="aorVIfC2tL6XoiX4dQbqt99w4TNX8qdSs68bCZPGpxk="

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "EUR": {
        "at_disposal": 2299,
        "at_disposal_decimal": "22.99",
        "reserved": 0,
        "reserced_decimal": "0",
        "converted": {
            "at_disposal": 2299,
            "at_disposal_decimal": "22.99",
            "reserved": 0,
            "reserced_decimal": "0"
        }
    },
    "USD": {
        "at_disposal": 100,
        "at_disposal_decimal": "1.00",
        "reserved": 9800,
        "reserced_decimal": "98.00",
        "converted": {
            "at_disposal": 75,
            "at_disposal_decimal": "0.75",
            "reserved": 7339,
            "reserced_decimal": "73.39"
        }
    }
}

Getting balance receipt for a wallet

Informacija This feature is not available by default and is enabled only for some clients

In case user is identified at some location (for offline or gateway clients), receipt with balance can be printed for the user. It is not allowed for the client to save receipt's text or display it for anyone else except the user herself. Same permissions are needed as when accessing balance itself.

Request

GET https://wallet.paysera.com/rest/v1/wallet/:walletId/receipt/balance?locale=:locale&width=:width

Parameters

userId
id of the wallet. Can be integer or me (if access token is used)
locale
optional parameter; locale for the text translation. Currently available locales: en, lt, ru
width
optional parameter; maximum symbol count in one line. Longer lines will be broken into separate ones

Response data structure

Parametras
Tipas
Pastabos
Aprašymas
text
string
always
Text for the customer. New lines are separated by \r\n characters (CR + LF)

Example request

GET /rest/v1/wallet/14471/receipt/balance?locale=en HTTP/1.1
Host: wallet.paysera.com
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="u7Km4ut2BgQ5UEtK3nngD6PP/FZCG4pnsBS5hiPE1g4="

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "text": "Your balance: 22.99 EUR, 1.00 USD"
}

Specification

To obtain information about user account in Paysera system you need to use oAuth, read more info about this: Getting User's Information.

In order to obtain information if the user has enough funds, you should send a request to our system.

Request

GET https://wallet.paysera.com/rest/v1/wallet/:walletId/sufficient-amount?amount=:amountInCents&currency=:currency

URI parameters:

  • walletId - id of the wallet. me must be used, as access token is used.

Query parameters:

  • amount - amount in cents to be paid.
  • currency - currency to be used.

Response body

{
    "is_sufficient": true
}

Check if enough balance

This method returns information if wallet has sufficient money in balance.

Requesting by ID

GET https://wallet.paysera.com/rest/v1/wallet/:walletId/sufficient-amount?amount=:amountInCents&currency=:currency

URI parameters:

  • walletId - id of the wallet. Can be integer or me (if access token is used).

Query parameters:

  • amount - amount in cents to be paid.
  • currency - currency to be used.
Informacija You must have an access token with check_has_sufficient_balance scope confirmed to use this method. Request can be authenticated either by project credentials or by current access token.
Įspėjimas User can revoke the privileges, so you should expect for an error if this would be the case.

Response data structure

Response is an object with boolean answer:
{
    "is_sufficient": true
}

Example request

GET /rest/v1/wallet/me/sufficient-amount?amount=100000&currency=EUR HTTP/1.1
Host: wallet.paysera.com
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="9SCOHfL8j/OSLMjQAMQL9F2sp6uru+eRQr6UH8RUgLo="
Informacija In this example we are requesting check if in balance there are 1000,00 EUR

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "is_sufficient": false
}
Informacija In this example wallet has not enough funds.

Get wallet statements

This method returns account statements related to the wallet. Client must have special permission and an access token with scope statements or statements_offline to access this method.

Requesting statements for a wallet

GET https://wallet.paysera.com/rest/v1/wallet/:id/statements?currency=:currency&from=:from&to=:to&limit=:limit&offset=:offset

Parameters

id
id of the wallet. Can be integer or me (if access token is used)
currency
optional; currency list, separated by commas. For example: USD,EUR
direction
optional; one ofin or out
text
optional; text to be found in statement details or other information
from
optional; date from which statements should be provided in UNIX timestamp. Defaults to week before to
to
optional; date from which statements should be provided in UNIX timestamp. Defaults to current time
limit
optional; maximum number of statements to be returned in one response. Defaults to 20, maximum available is 200
offset
optional; number of statements to skip. Defaults to 0
Informacija Statements are ordered from newest to oldest
Informacija You must have an access token with statements or statements_offline scope confirmed to use this method.
Įspėjimas User can revoke the privileges, so you should expect for an error if this would be the case.

Response data structure

Parametras
Tipas
Pastabos
Aprašymas
statements
array of objects
always
Each item in array is statement object, which is detalized bellow
_metadata
object
always
Additional information about result

Statement data structure

Parametras
Tipas
Pastabos
Aprašymas
id
integer
always
ID of this statement
amount
integer
always
Amount in cents for this statement
currency
string
always
Currency of the provided amount
amount_decimal
string
always
Amount for this statement
details
string
optional
Details for this statement
reference_number
string
optional
Reference number for this statement
direction
string
always
in for incoming payments, out for outgoing
date
integer
always
Date of the statement in unix timestamp
other_party
object
optional
Other party that is related to this statement. This is payer for incoming transfers or beneficiary for outgoing transfers. See other party structure bellow
type
string
optional
Type of this statement. Available types are provided bellow. If type is unknown or other than available ones, this item is not given
transfer_id
integer
optional
ID of the transfer, related to this statement. If no transfer is related to the statement, this item is not given
Other party data structure
Parametras
Tipas
Pastabos
Aprašymas
display_name
string
optional
Full name or title of the party
wallet_id
integer
optional
Wallet ID identifying this party
user_id
integer
optional
User ID identifying this party
code
string
optional
Code of the party
account_number
string
optional
Account number of the party, can be in different formats, usually this is IBAN or internal account number
phone
string
optional
Phone number if party was identified by one
email
string
optional
Email address if party was identified by one
bic
string
optional
BIC code of the bank of party's account
Available statement types
Įspėjimas New types could be added later, code should not make assumptions based on type.
transfer
Indicates money transfer to or from some party
commission
Indicates commission for transfer or of other kind
cash
Indicates operation with cash
currency
Indicates currency convert
tax
Indicates transfer for taxes
return
Indicates returned amount, which was added or subtracted earlier. Could be revoked transfer, partially returned transfer etc.
automatic_payment
Indicates transfer made with Paysera wallet
card_transaction
Indicates transfer made with payment card

Metadata information structure

Parametras
Tipas
Pastabos
Aprašymas
total
integer
always
Total count of results, ignoring limit and offset parameters
offset
integer
always
Used offset - how many results from the beginning were skipped
limit
integer
always
Used limit - maximum count of available results in single response

Example request

GET /rest/v1/wallet/14471/statements?currency=EUR,USD&from=1357052400&limit=50 HTTP/1.1
Host: wallet.paysera.com
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="jElAhqr+zF3MlJCYd6zQV03lWlg7SSzHNweBQ5CvKK4="
Informacija In this example we are requesting statements for wallet which ID is 14471. Maximum of 50 statements will be returned for USD and EUR currency from 2013-01-01 15:00:00 GMT.

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "statements": [
        {
            "id": 59418,
            "amount": 100,
            "currency": "EUR",
            "amount_decimal": "1.00",
            "direction": "in",
            "date": 1363340355,
            "details": "Currency exchange 1.23 USD -> 1.00 EUR (Exchange rate 10 USD : 8.81142 EUR; 1.23 USD : 1 EUR)",
            "type": "currency",
            "transfer_id": 45375
        },
        {
            "id": 59392,
            "amount": 3000,
            "currency": "USD",
            "amount_decimal": "30.00",
            "direction": "in",
            "date": 1361370936,
            "details": "Partial transfer return",
            "other_party": {
                "name": "EVP",
                "code": "300060819",
                "account_number": "EVP6910001000362"
            },
            "type": "return",
            "transfer_id": 45353
        },
        {
            "id": 59390,
            "amount": 12000,
            "currency": "USD",
            "amount_decimal": "120.00",
            "direction": "in",
            "date": 1361370929,
            "details": "Transfer for some items",
            "other_party": {
                "name": "EVP",
                "code": "300060819",
                "account_number": "EVP6910001000362",
                "user_id": 2,
                "wallet_id": 211
            },
            "type": "transfer",
            "transfer_id": 45353
        },
        {
            "id": 59327,
            "amount": 20,
            "currency": "EUR",
            "amount_decimal": "0.20",
            "direction": "out",
            "date": 1358523243,
            "details": "Transfer commission",
            "type": "commission",
            "transfer_id": 45122
        },
        {
            "id": 59326,
            "amount": 5000,
            "currency": "EUR",
            "amount_decimal": "50.00",
            "direction": "out",
            "date": 1358523243,
            "details": "50 EUR transfer to bank account",
            "other_party": {
                "name": "John Smith",
                "code": "38001010000",
                "account_number": "LT007300010022221111",
                "bic": "HABALT22XXX"
            },
            "type": "transfer",
            "transfer_id": 45122
        }
    ],
    "_metadata": {
        "total": 5,
        "offset": 0,
        "limit": 50
    }
}

Get wallet reservation statements

This method returns account reservation statements related to the wallet. Client must have special permission and an access token with scope statements or statements_offline to access this method.

Requesting reservation statements for a wallet

GET https://wallet.paysera.com/rest/v1/wallet/:id/reservation-statements

Parameters

id
id of the wallet. Can be integer or me (if access token is used)
Informacija Statements are ordered from newest to oldest
Informacija You must have an access token with statements or statements_offline scope confirmed to use this method.
Įspėjimas User can revoke the privileges, so you should expect for an error if this would be the case.

Response data structure

Parametras
Tipas
Pastabos
Aprašymas
reservation_statements
array of objects
always
Each item in array is reservation statement object, which is detalized bellow
_metadata
object
always
Additional information about result

Reservation statement data structure

Parametras
Tipas
Pastabos
Aprašymas
type
string
always
Type of this statement. Available types are provided bellow
amount
integer
always
Amount in cents for this statement
currency
string
always
Currency of the provided amount
details
string
optional
Details for this statement
reference_number
string
optional
Reference number for this statement
date
integer
always
Date of the statement in unix timestamp
other_party
object
optional
Other party that is related to this statement. This is payer for incoming transfers or beneficiary for outgoing transfers. See other party structure bellow
transfer_id
int
optional
Available only for reservation statements with following types: transfer_out, transfer_in
Other party data structure
API returns other party object. See other party structure for more info.
Available reservation statement types
transfer_out
Indicates money transfer reservation to some party
transfer_in
Indicates money transfer reservation from some party
hold
Indicates held money transfer
credit_card_pending_transaction
Indicates credit card reservation

Metadata information structure

Parametras
Tipas
Pastabos
Aprašymas
total
integer
always
Total count of results, ignoring limit and offset parameters
offset
integer
always
Used offset - how many results from the beginning were skipped
limit
integer
always
Used limit - maximum count of available results in single response

Example request

GET /rest/v1/wallet/14471/reservation-statements HTTP/1.1
Host: wallet.paysera.com
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="YX2q6J/Kl/xTc1EAftiv7sgFMQG7VCnD+FbuRoFkpnw="
Informacija In this example we are requesting reservation statements for wallet which ID is 14471.

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "reservation_statements": [
        {
            "type": "transfer_out",
            "amount": "1.00",
            "currency": "EUR",
            "details": "Name Surname. Transfer out",
            "date": 1373449733,
            "other_party": {
                "display_name": "Name Surname",
                "account_number": "LT000000000000000000"
            }
        },
        {
            "type": "transfer_in",
            "amount": "1.00",
            "currency": "EUR",
            "details": "cash out",
            "date": 1453973739,
            "other_party": {
                "display_name": "Name Surname",
                "account_number": "EVP0000000000000",
                "wallet_id": 12345,
                "user_id": 123456
            }
        }
    ],
    "_metadata": {
        "total": 2,
        "offset": 0,
        "limit": 50
    }
}

Get pending payments

This method returns incoming and/or outgoing payments to or from the wallet. Client must have special permission and an access token with scope incoming_payments and/or outgoing_payments to access this method.

Requesting pending payments for a wallet

GET https://wallet.paysera.com/rest/v1/wallet/:walletId/pending-payments?type=:type&direction=:direction&limit=:limit&offset=:offset

Parameters

walletId
ID of the wallet. Can be integer or me (if access token is used)
type
optional; currently only password is available
direction
optional; one of in or out
limit
optional; maximum number of pending payments to be returned in one response. Defaults to 20, maximum available is 200
offset
optional; number of pending payments to skip. Defaults to 0
Informacija You must have an access token with incoming_payments scope to get pending payments with in direction, and with outgoing_payments scope to get pending payments with out direction.

Response data structure

Parametras
Tipas
Pastabos
Aprašymas
pending_payments
array of objects
always
Each item in array is pending payment object, which is detalized bellow
_metadata
object
always
Additional information about result

Pending payment data structure

Parametras
Tipas
Pastabos
Aprašymas
id
integer
always
ID of this pending payment
amount
integer
always
Price in cents for this pending payment. This is always positive
currency
string
always
Currency of the provided price
amount_decimal
string
always
Decimal price for this pending payment
details
string
always
Details for this pending payment
type
string
always
Type of this pending transfer. password (payment, pending for password), beneficiary, transaction_request
direction
string
always
One of in or out
cancelable
boolean
always
Whether user of this wallet can currently cancel this payment
other_party
object
optional
Information about another party, provided only if available. See Other party data structure
date
integer
optional
Payment's creation date in UNIX timestamp
valid_until
integer
optional
Date until password must be provided in UNIX timestamp
password
string
optional
Only if type is password and direction is out
transfer_id
integer
optional
Available only for pending payments with type of password, beneficiary
transaction_key
string
optional
Available only for pending payments with type of transaction_request

Metadata information structure

Parametras
Tipas
Pastabos
Aprašymas
total
integer
always
Total count of results, ignoring limit and offset parameters
offset
integer
always
Used offset - how many results from the beginning were skipped
limit
integer
always
Used limit - maximum count of available results in single response

Example request

GET /rest/v1/wallet/14471/pending-payments?type=password&direction=in&limit=50 HTTP/1.1
Host: wallet.paysera.com
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="kEsBCn6TViaKISptT5PPLo6pFqlXwOqGhIl1fx1ThNo="
Informacija In this example we are requesting incoming payments, pending for password, and limiting result to 50 objects.

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "pending_payments": [
        {
            "id": 59418,
            "amount": 100,
            "currency": "EUR",
            "amount_decimal": "1.00",
            "details": "Payment with password from John",
            "type": "password",
            "direction": "in",
            "cancelable": true,
            "date": 1363340355,
            "other_party": {
                "wallet_id": 78441,
                "user_id": 44587,
                "display_name": "John Smith"
            }
        }
    ],
    "_metadata": {
        "total": 1,
        "offset": 0,
        "limit": 50
    }
}

Cancel pending payment

This method allows to cancel pending payment. Both incoming and outgoing pending payments can be canceled if cancelable for that payment is true.

Cancel pending payment

DELETE https://wallet.paysera.com/rest/v1/wallet/:walletId/pending-payment/:pendingPaymentId

Parameters

walletId
id of the wallet. Can be integer or me (if access token is used)
pendingPaymentId
id of the pending payment

Response data structure

On success API returns corresponding pending payment object. See get pending payments for more info.

Provide password for pending incoming payment

This method allows to provide password for incoming payment. Client must have special permission and an access token with scope incoming_payments to access this method.

Providing the password

PUT https://wallet.paysera.com/rest/v1/wallet/:walletId/pending-payment/:pendingPaymentId

Parameters

walletId
id of the wallet. Can be integer or me (if access token is used)
pendingPaymentId
id of the pending payment

Request body structure

Parametras
Tipas
Pastabos
Aprašymas
password
string
required
Password for this pending payment

Response data structure

On success API returns corresponding pending payment object. See get pending payments for more info.

Example request

PUT /rest/v1/wallet/14471/pending-payment/59418 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="Y90qXv/AX0NghCY9n0Yc25t1hJN3fAwghExh8GNRjwU=", ext="body_hash=AGR2TJUZ%2BQBepUliLhilu7TBof4cYOrF7mFQdqwZO4o%3D"
{
    "password": "some secret"
}
Informacija In this example we are providing password for pending payment, which ID is 59418

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "id": 59418,
    "amount": 100,
    "currency": "EUR",
    "amount_decimal": "1.00",
    "details": "Currency exchange 1.23 USD -> 1.00 EUR (Exchange rate 10 USD : 8.81142 EUR; 1.23 USD : 1 EUR)",
    "type": "password",
    "direction": "in",
    "cancelable": false,
    "date": 1363340355,
    "other_party": {
        "wallet_id": 78441,
        "user_id": 44587,
        "display_name": "John Smith"
    }
}

Get favourite beneficiaries

This method returns information about Paysera users for which user makes most of the payments.

Requesting favourites for a wallet

GET https://wallet.paysera.com/rest/v1/wallet/:walletId/favourites?limit=:limit&offset=:offset

Parameters

walletId
id of the wallet. Can be integer or me (if access token is used)
limit
optional; maximum number of statements to be returned in one response. Defaults to 20, maximum available is 200
offset
optional; number of statements to skip. Defaults to 0
Informacija Favourites are ordered from most used to least used

Response data structure

Parametras
Tipas
Pastabos
Aprašymas
favourites
array of objects
always
Each item in array is favourite object, which is detalized bellow
_metadata
object
always
Additional information about result

Favourite data structure

Parametras
Tipas
Pastabos
Aprašymas
payment_count
integer
always
Count of payments made for this beneficiary in defined period of time
user_info
object
always
Information about the beneficiary. See structure below
User info data structure
Parametras
Tipas
Pastabos
Aprašymas
wallet_id
integer
always
ID of user's main wallet
account_number
string
always
User's main account number, related to the main wallet
user_id
integer
always
ID of this user
display_name
string
optional
Full name (possibly only with the first letter of surname) or title of the user
phone
string
optional
Phone number of the user
email
string
optional
Email address of the user
Informacija Usually phone or email is only provided when display_name is unavailable.

Metadata information structure

Parametras
Tipas
Pastabos
Aprašymas
total
integer
always
Total count of results, ignoring limit and offset parameters
offset
integer
always
Used offset - how many results from the beginning were skipped
limit
integer
always
Used limit - maximum count of available results in single response

Example request

GET /rest/v1/wallet/14471/favourites HTTP/1.1
Host: wallet.paysera.com
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="W8jg3Glch8itZ11zENWa59Z01k31EYO4GZ86HEZHHwc="

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "favourites": [
        {
            "payment_count": 5,
            "user_info": {
                "display_name": "John Smith",
                "user_id": 54,
                "wallet_id": 4558,
                "account_number": "EVP7010001000101"
            }
        },
        {
            "payment_count": 2,
            "user_info": {
                "display_name": "Some Company",
                "user_id": 4457,
                "wallet_id": 25487,
                "account_number": "EVP6310001000103"
            }
        }
    ],
    "_metadata": {
        "total": 2,
        "offset": 0,
        "limit": 50
    }
}

Relating card to a wallet

Informacija This feature is not available by default and is enabled only for some clients
These methods allow to relate card with a wallet. To relate a card, these steps must be taken:
  1. Client makes request to API providing card information
  2. Paysera system sends user SMS or email with confirmation code and card information
  3. User inputs the code into the client
  4. Client confirms the card by making API request with the confirmation code

It's also possible to confirm related card in the Paysera system, instructions are included in the email. Client should include a way to skip card confirmation for this use-case.

Card relation request

PUT https://wallet.paysera.com/rest/v1/wallet/:walletId/card

Parameters

walletId
id of the wallet. Can be integer or me (if access token is used)

Request body structure

Parametras
Tipas
Pastabos
Aprašymas
issuer
string
required
Identifier of the card issuer. Available values: vilniecio, paysera
number
string
required
Number of the card as is seen on the top of the card. Provided as text, even if contains only digits

Response data structure

On success API returns wallet object. See get wallet information for more info.

Informacija Wallet ID in request is for determining user and account, related to the new wallet. In the response, wallet ID is not the same - new wallet is created, related to this card. It still points to the same user and account, but may have different limits and other configuration.

Errors

card_already_assigned

Example request

PUT /rest/v1/wallet/14471/card 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="fv+osiplm+JL6klKGTlRdLRxb1QeCrLvuLqlWaqbkyY=", ext="body_hash=AmsFMTy%2FcahppWNuBi4AosyH8S%2B%2B4Wm54DiCwTniHZA%3D"
{
    "issuer": "paysera",
    "number": "5487963154"
}

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "id": 254789,
    "owner": 221
}

Confirm card request

PUT https://wallet.paysera.com/rest/v1/wallet/:walletId/confirm

Parameters

walletId
id of the wallet
Įspėjimas Wallet ID must be the one provided in the response when relating card

Request body structure

Parametras
Tipas
Pastabos
Aprašymas
code
string
required
Confirmation code, sent to user's phone or email

Response data structure

On success API returns user object. See get user information for more info.

Errors

invalid_code (if code is incorrect), rate_limit_exceeded (if current client made too many invalid code attempts in some period of time)

Example request

PUT /rest/v1/wallet/254789/confirm 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="0EvGMwVZ+PQ2UBJkIrEUeBp/41vl1k4rElhHg86gu/Y=", ext="body_hash=sc%2BZyvNgEganUAKIuipczDh2Bd7WT3KE78M3tnuFdoU%3D"
{
    "code": "ABCDEF"
}

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "id": 254789,
    "owner": 221
}

Changing description of an account

This method allows to change description of an account for specific user. Changing description requires manage_account OAuth scope.

Request

PUT https://wallet.paysera.com/rest/v1/wallet/:walletId

Parameters

walletId
id of the wallet. Can be integer or me (if access token is used)

Request body structure

Parametras
Tipas
Pastabos
Aprašymas
description
string
required
Description for the account

Response data structure

On success API returns wallet structure.

Errors

invalid_parameters if description is too long

Example request

PUT /rest/v1/wallet/14471 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="nasr/gsN3kKUYKuewK7xPYVxa9Rmc5+xUHxZi5KDRGY=", ext="body_hash=JLdNooXtAqBdU9VUQxtnkx%2BLkGPXaThfOj%2FR2CO3QEo%3D"
{
    "description": "My personal account"
}

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "id": 14471,
    "owner": 221,
    "account": {
        "number": "EVP0010001000101",
        "description": "My personal account"
    }
}

Deleting description

DELETE https://wallet.paysera.com/rest/v1/wallet/:walletId/description

Parameters

walletId
id of the wallet. Can be integer or me (if access token is used)

Example request

DELETE /rest/v1/wallet/14471/description HTTP/1.1
Host: wallet.paysera.com
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="wkV5RddQ0uTLSRxuJTHu5EhF7gotqmzRwiTRljzwrQU="

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "id": 14471,
    "owner": 221,
    "account": {
        "number": "EVP0010001000101"
    }
}

Search wallets

This method returns wallet list by provided filters.

Request

GET https://wallet.paysera.com/rest/v1/wallets?email=:email_list&phone=:phone_list&email_hash=:email_hash_list&phone_hash=:phone_hash_list

Parameters

email_list
optional; comma separated list of emails to search for
phone_list
optional; comma separated list of phones to search for; each phone must start with country code without 00 or + sign and contain only digits
email_hash_list
optional; comma separated list of SHA1 email hashes to search for; each email address must be lower-cased before hashing
phone_hash_list
optional; comma separated list of SHA1 phone hashes to search for; each phone must start with country code without 00 or + sign and contain only digits before hashing
At least one of parameters must be specified.
Informacija Hashes can be used if user does not want private information (contacts) to be exposed to some other party.

Response data structure

Response is an object. Keys of this object are search criteria, by which result was found. Values are Wallet objects. See Wallet data structure for more information.

Example request

GET /rest/v1/wallets?email=john@example.com,smith@example.com&phone=37066612345&email_hash=9395988394d4568df3c54c2645ddb1d0753a0c20 HTTP/1.1
Host: wallet.paysera.com
User-Agent: Paysera WalletApi PHP library
Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="dReJK0HvKhJbcs2P4hujkpG9KMpJ2zAAilFRMOY2+Us="
Informacija We are searching for wallets, related to emails john@example.com, smith@example.com, email@example.com or to a phone +370 666 12345. 9395988394d4568df3c54c2645ddb1d0753a0c20 is SHA1 hash for email@example.com.

Example response

HTTP/1.1 200 OK
Content-type: application/json;charset=utf-8
{
    "smith@example.com": {
        "id": 887,
        "owner": 5547
    },
    "9395988394d4568df3c54c2645ddb1d0753a0c20": {
        "id": 45,
        "owner": 8879
    }
}
Informacija If no results are found, empty object is returned, 404 error is not returned.