Sunteți pe pagina 1din 25

ePayments

91 Wimpole Street, London W1G 0EF, United Kingdom


Company No. 07637944, VAT Number: GB 168 0010 38

ePayments Merchant
Web Service
Version 0.3

July 25, 2015

1
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38

TABLE OF CONTENTS

1. GENERAL INFORMATION ...................................................................................................... 3

1.1 Glossary ..................................................................................................................................................... 3

1.2 Document Purpose .................................................................................................................................... 3

2. TERMS AND CONDITIONS FOR SETTING UP EPAYMENTS MERCHANT


ACCOUNT ................................................................................................................................................ 4

3. INTERACTION PROCESS ......................................................................................................... 5

1.3 "MWS_PaymentOrder" Operation .......................................................................................................... 6


1.3.1 Request Procedure...................................................................................................................................... 6
1.3.2 Request Signature Calculation Algorithm ................................................................................................ 10
1.3.3 Operation Result ...................................................................................................................................... 11

1.4 Functions Allowing Merchant to Receive Information About Orders ................................................... 13


1.4.1 Authorisation Method for Partners ........................................................................................................... 13
1.4.2 API Requests ............................................................................................................................................ 15
1.4.3 "MWS_ordersOrderId" Function ............................................................................................................. 16
1.4.4 "MWS_ordersLastTake" Function ........................................................................................................... 17
1.4.5 "MWS_ordersFromTill" Function ........................................................................................................... 19

4. APPENDIX .................................................................................................................................... 22

1.5 Error codes .............................................................................................................................................. 22

1.6 FAQs and Business Restrictions.............................................................................................................. 23

5. CHANGES HISTORY ............................................................................................................... 25

2
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38

1. GENERAL INFORMATION
1.1 Glossary
Term Definition
Merchant Web Services is an interface that allows accepting payments to a merchant’s
MWS
e-Wallet at ePayments
IS Information System
A company or an individual who has verified account at ePayments and uses MWS for
Merchant
its activities
Operator ePayments Information System
A unique number assigned to a merchant by the support team via tickets system when
Partner’s ID (partner_id)
connecting to API
Partner’s secret key A partner’s secret key (partner_secret) assigned to a merchant when connecting to API.
(partner_secret) The key is assigned by the support team together with the partner’s ID via tickets system
A one-time access key to API methods that is valid for one authentication only. The
Token (token) token has 20 minutes timeframe. Upon its expiry it is required to receive a new token
or to refresh the existing one

1.2 Document Purpose


The present document describes the Merchant Web Service (MWS) functioning. MWS is an
interface of secure interaction between Merchant Information System (IS) and ePayments (Operator)
via Internet in a real-time mode.
MWS allows the Merchant to perform the following functions:
 Accept funds to its own ePayments e-Wallet (MWS_PaymentOrder).
 Receive information about payment status of orders (MWS_ordersOrderId,
MWS_ordersLastTake, MWS_ordersFromTill).
To make the integration more convenient ePayments MWS business restrictions and FAQs can
be found in the Appendixes.

3
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38

2. TERMS AND CONDITIONS FOR SETTING UP EPAYMENTS


MERCHANT ACCOUNT
An ePayments account is mandatory for gaining access to ePayments MWS. The access to
ePayments MWS can be obtained when addressing the ePayments support team via tickets or an
account manager.

NOTE
A Merchant’s account must be verified. In order to verify the account you should submit the list of documents, which
can be accessed in the ePayments account or received from the support team.

The request to access ePayments MWS will be reviewed within 2 business days. The decision to
provide a user with the access will be sent as a reply to the ticket.
The partner’s identifier (partner_id) as well as the partner’s secret key (partner_secret) will be
sent provided that the request has been approved.

4
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38

3. INTERACTION PROCESS
This section describes the general interaction process of the following participants:
 User – a Merchant IS user who has an account at the Operator IS.
 Payment page – a webpage of the Operator IS used to authorise a user, confirm operations
and receive information about the results of the operation.
 Merchant server – a web server of the Merchant IS.
 Operator server – a web server of the Operator IS.
The interaction process of all the MWS participants is shown on Picture 1.
User Payment Page Merchant’s Server Operator’s Server

0. Redirect link

1. Redirect to authorisation form

3. Display authorisation page 2. Merchant verification

4. Authorisation request

5. User’s authorisation verification

6. Invoice

7. Confirm payment

8. Payment process

9. Payment notification

10. Redirect to Merchant’s page

11. Provide details about one operation

12. Provide details about recent operations

13. Provide details about operations for a certain period

Picture 1. Interaction Process


The detailed description of all the MWS interaction phases can be found in Table 1.
Table 1. MWS Interaction Phases

№ Phase Description MWS Operation


A Merchant posts a link on a page with order
0. Redirect link payment details in order to redirect a user to the
Operator’s “Payment Form”. MWS_PaymentOrder
A payer’s browser transfers the completed from to
1. Redirect to authorisation form
the Operator IS

5
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38

The Operator verifies the Merchant on the basis of


2. Merchant verification
the details received
Operator IS displays an authorisation page to the
3. Display authorisation page
payer
The payer enters the login/password to his account at
4. Authorisation request
Operator IS on the authorisation page
User’s authorisation
5. Operator IS verifies the user’s authorisation
verification
Operator IS displays the payment and payment
6. Invoice
confirmation page to the payer
The user confirms that the order is correct to make a
7. Confirm payment
payment
Operator IS debits funds from the payer and displays
8. Payment process
the payment results for him
Operator IS displays notification page with payment
9. Payment notification
results to the user
“Back to Merchant” link is displayed on the page
10. Redirect to Merchant’s page with the results. The Merchant determines the URL
to redirect the payer
Provide details about one MWS_ordersLastTake
11. Merchant requests the payments details on one order
operation
Provide details about recent
12. Merchant requests the list of recent payments MWS_ordersFromTill
operations
Provide details about MWS_ordersOrderId
Merchant requests the payments details for the
13. operations for a certain period
period “from – to”
of time

1.3 "MWS_PaymentOrder" Operation


This operation request allows a Merchant IS User to make payments in favour of the Merchant.
The Merchant will receive funds to his e-Wallet at Operator system.
The following addresses are used in order to request the operation:
 Staging environment: https://api.sandbox.epayments.com/merchant/prepare
 Production environment: https://api.epayments.com/merchant/prepare
1.3.1 Request Procedure
In order to initiate the payment procedure via ePayments payment gateway a Merchant should
send POST-request to MWS using the staging or production environment addresses and indicating
the parameters contained in Table 2. (the parameters order in the request is not important). Hereinafter
M means mandatory parameters and O means optional parameters.

6
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38

Table 2. Request Parameters for MWS_PaymentOrder Operation

Parameter M/O Field Description Type Example


Partner_id M Merchant’s identifier at Operator system Int 16
OrderId M Order identifier at Merchant system (Maximum length is 255 symbols) String 98788
Payment amount. (Floating point number. Any value that is more than 0 is allowed. It should always contain
Amount M Decimal 9.99
2 decimal places.)
Payment currency. The following values are possible:
Currency M  usd – for USD payments; String usd
 eur – for EUR payments.
bb55a4a47971e92ff
Sign M Request signature String
d4257d786a83067
MyAwesomeMerch
NickName O Merchant’s name indicated to a User as a payment recipient. (Maximum length is 255 symbols) String
ant
Additional information for a Merchant. The Merchant can use it to carry out additional identification of orders
ExtraId O String 12RT34
at Merchant system. (Maximum length is 255 symbols)
Merchant e-Wallet number at ePayments. The payment will be credited to the e-Wallet indicated. If the value
TargetEwallet O String 000-123456
is not set, the transfer will be executed to the first found e-Wallet of the Merchant.
Details O Payments details. (Maximum length is 1000 symbols) String Some order details
LifeTime O Account time frame (indicated in seconds). Restrictions: from 300 to 1800 int 1500
URL return in case of an error. In case the error occurs or a user refuses to make a payment GET request will
be sent to this address with the following parameters:
 orderId - Order identifier at Partner system. http://pay.fufs.ru/pa
DeclineUrl O String
 - code – Error code. y/decline/
 - msg – Error description (a message).
Restriction: one domain with SuccessUrl is required
URL return in case the payment is successful. In case the payment for a user’s invoice is successful the user
will be redirected to this address by the GET request with the following parameters:
 orderId - Order identifier at Merchant system. http://pay.fufs.ru/pa
SuccessUrl O String
y/success/
 transactionId – Transaction identifier.
Restriction: one domain with DeclineUrl is required

7
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38
POST-request example:
A Merchant should redirect a user to the ePayments payment gateway via POST-request, which
should contain order details and will look as follows:
POST /Merchant/Prepare HTTP/1.1
Content-Type: application/x-www-form-urlencoded

partnerid=16&sign=bb55a4a47971e92ffd4257d786a83067&orderid=98788&amount=9.99¤cy=usd&details=Some orde
r details&nickname=MyAwesomeMerchant&extraid=12RT34&lifetime=1500&successurl=http://pay.fufs.ru/pay/succe
ss/&declineurl=http://pay.fufs.ru/pay/decline/

In case there is a need to indicate the user’s language settings (the user’s preferred language)
Accept-Language HTTP heading is allowed in the request heading (follow this link to find the
description, section 14.4 "Accept-Language").
POST-request example with language settings indication:
POST /Merchant/Prepare HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Accept-Language: en

partnerid=16&sign=bb55a4a47971e92ffd4257d786a83067&orderid=98788&amount=9.99¤cy=usd&details=Some orde
r details&nickname=MyAwesomeMerchant&extraid=12RT34&lifetime=1500&successurl=http://pay.fufs.ru/pay/succe
ss/&declineurl=http://pay.fufs.ru/pay/decline/

The correct POST-request will redirect to the Operator IS authorisation form, which is shown
on Picture 2. The user should enter the login (email or phone) and password to his account at Operator
IS on this page and click “Next”.

8
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38

Picture 2. Authorisation page


In case the authorisation is successful the Operator IS user will be invoiced. The invoice
payment page will be displayed, which will look as shown on Picture 3.

9
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38

Picture 3. Invoice payment page


1.3.2 Request Signature Calculation Algorithm
All the mandatory fields are used in the signature calculation algorithm, which are sent to the
payment gateway, as well as a partner’s secret key received when registering at ePayments.
In order to identify the signature the following string should be formed:
Partner_id;Partner_secret;OrderId;Amount;Currency

MD5-hash should be taken from the string received, which will be the request signature.
NOTE
The payment amount should be indicated in the following format "0.00" (the amount should always contain 2 decimal
places)

Request Signature Calculation example:


The Merchant should send the following details about the order for the user to pay for it:
Parameter Value
10
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38

OrderId 98788
Amount 9.99
Currency usd
In this case the following string will be received for the Merchant with 16 identifier and
Pass@word1 secret key:
16;Pass@word1;98788;9.99;usd

By subtracting MD5-hash from this string we receive the request signature (Sign) with the
value:
bb55a4a47971e92ffd4257d786a83067

1.3.3 Operation Result


By completing the operation an Operator sends a user to one of the two URL sent by the
Merchant himself in the order.
1. SuccessUrl – URL in case the order payment is successful.
The URL address the user will be sent to has the following general format:
[SuccessUrl]?orderId={orderId}&transactionId={transactionId}&sign={responseSign}

Thus, if the Merchant has indicated http://pay.fufs.ru/pay/success/ address as SuccessUrl, the


user will be sent to the following address after making the payment:
http://pay.fufs.ru/pay/success/?orderId=98788&transactionId=415019&sign=181C27567A11FBA7590CB4324593F48
B

Where:
 orderId – order identifier at Merchant System, which has been paid by the user.
 transactionId – identifier of the payment transaction at ePayments, which corresponds to the
order payment.
 sign – reply signature from the Merchant, which is sent to him.
The signature calculation is based on the order and payment transaction identifiers as well as
the partner’s secret key. Thus, the Merchant can verify whether the reply from the Merchant service
is valid by comparing it with the signature indicated in the reply and by calculating the same value
through the following algorithm:
sign = md5(orderId;transactionId;partner_secret)

If the operation is successful the user is redirected to the successful result page at first (see
Picture 4). After clicking “Back to Merchant” button the user is redirected to SuccessURL.

11
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38

Picture 4. Successful Payment Result


2. DeclineUrl – URL in case of an error or refusal to pay for the order.
If the user refuses to pay for the partner’s order or an error occurs the user will be redirected
URL address indicated by the partner in the DeclinelUrl field when redirecting the user to make the
payment for the order at ePayments gateway.
The URL address the user will be sent to has the following general format:
[DeclinelUrl]?orderId={orderId}&code={code}&msg={msg}&sign ={responseSign}

Thus, if the Merchant has indicated http://pay.fufs.ru/pay/decline/ address as DeclineUrl, the


user will be sent to the following address after making the payment
http://pay.fufs.ru/pay/decline/?orderId=98788&code=40002&msg=Balance%20is%20not%20sufficient&sign=579030
A8F9C7B36AB13AE29565A3A69A

Where:
 orderId – order identifier at Merchant System, which has been paid for by the user.
 code – error code (see Appendixes).
 msg – error message description.
sign – reply signature from the Merchant, which is sent to him.
In case of an error the signature calculation is based on the order identifier, error code and
partner’s secret key. Thus, the Merchant can verify whether the reply from the Merchant service is
12
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38
valid by comparing it with the signature indicated in the reply and by calculating the same value
through the following algorithm
sign = md5(orderId;errorCode;partner_secret)

If the operation is unsuccessful the user is redirected to the unsuccessful result page at first (see
Picture 5). After the user clicks “Back to Merchant” button he is redirected to DeclineURL.

Picture 5. Unsuccessful Payment Result

1.4 Functions Allowing Merchant to Receive Information About Orders


The following API functions are available to a Merchant, which allow him to receive the
detailed information about his orders:
 MWS_ordersOrderId – get the details about order payment.
 MWS_ordersLastTake –get the list of recent payments.
 MWS_ordersFromTill – get the payment details for a period “from – to”.

NOTE
In order to make a request to the indicated MWS types authorisation for partners is required

1.4.1 Authorisation Method for Partners


The authorisation on the basis of the OAuth 2.0 (RFC-6749) protocol has been provided in order
to ensure access to the operations indicated above. In order to identify a Merchant a token should be
13
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38
received before each request to ePayments API (when a partner’s unique identifier and partner’s
secret key are available).
In order to receive the token a POST request should be sent to TokenEndpoint:
 Staging environment: https://api.sandbox.epayments.com/token
 Production environment: https://api.epayments.com/token
The request should contain the heading:
Content-Type: application/x-www-form-urlencoded

The request should contain the following parameters:


grant_type = partner
partner_id = partner’s identifier
partner_secret = partner’s secret key

NOTE
This method to receive a token is only available from the IP addresses indicated in the whitelist. If the Merchant’s
account at the Operator system does not have the whitelist with IP addresses or the IP addresses verification has been
deactivated, it will not be possible to receive the token.
If the details sent to TokenEndpoint are correct, the following parameters will be sent in reply:
Parameter Description
access_token Token to access API
token_type Token type. It will always have the bearer value
expires_in access_token / refresh_token timeframe. Indicated in seconds
refresh_token A token to receive a new token (RFC-6748#1.5)

The example of positive reply (json):


{
"access_token":"2YotnFZFEjr1zCsicMWpAA",
"token_type":"bearer",
"expires_in":1119,
"refresh_token":"tGzv3JOkF0XG5Qx2TlKWIA"
}

In case the token is denied the following parameters will be received in reply:
Parameter Description
error Error type
error_desctiption Detailed description of the error. The parameter will not always have the value

The example of negative reply (json):


{
"error":"invalid_request",
"error_description":"missed something required"
}

14
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38
A token has its timeframe. That is why it is necessary to refresh the token or to request the new
one from time to time. To refresh the token refresh_token should be used, which has been received
together with access_token.
To refresh the token POST request should be sent to TokenEndpoint. The request should
contain the heading:
Authorization: Basic GENERATED_STRING
Content-Type: application/x-www-form-urlencoded

The request should contain the following parameters:


grant_type = refresh_token
refresh_token = refresh_token received before

NOTE
 You can find more detailed description on how to refresh at RFC-6749:10.4.
 The token refreshment function is only available if the ePayments support has been contacted by a user
beforehand

1.4.2 API Requests


The following symbols are allowed in string variables when formulating the request to API
functions:
 Latin letters;
 Numerals;
 A space;
 Special symbols: ':', '-', '_', ',', '.', '(', ')';
 A decimal mark – a dot.
The following are the URLs to request API functions:
 Staging environment: https://api.sandbox.epayments.com
 Production environment: https://api.epayments.com
The required API version is set in the URL request. For example:
 https://api.epayments.com/v1/mymethod - shall request version 1 API method;
 https://api.epayments.com/v5/mymethod - shall request version 5 API method.
ePayments API platform supports JSON requests formats. After receiving a token all API
requests should contain the heading

Authorization: Bearer ACCESS_TOKEN


Content-type: application/json

with ACCESS_TOKEN being a token received from TokenEndpoint.


All text descriptions of API errors will be returned in English by default. To receive the messages
about the errors in Russian the following should be added to the request:

Accept-Language: ru-RU

The language code is used in accordance with ISO639. It is allowed to just indicate "ru" as well.
15
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38

1.4.3 "MWS_ordersOrderId" Function


This function allows the Merchant to receive information status of the order payment operation
as well as errors that occurred when executing the operation.
A request should be sent in order to receive the information about a particular order.
https://api.epayments.com/v1/merchant/orders/{orderId}

Request parameters:
Parameter Type Description M/O Field Exaple
Order number in the records of the
orderId string М 666
Merchant IS

Request example:
https://api.epayments.com/v1/merchant/orders/666

The result of processing the request:


Parameter Type Description
Collection
Orders List of payments (orders)
of MerchantInvoiceResponse
Error code:
 0 – the operation has been successful
ErrorCode integer
 -1 – system error has occurred
 -2 – invalid/ empty request
ErrorMsgs Collection of string Message about the error
Collection of MerchantInvoiceResponse
OrderId string Order number
ExtraId string Additional information for the Merchant
Payment status. Possible values:
 Open. New order
State string  Paid. The order has been paid for.
 Expired. The order has expired
 Rejected. The order has been rejected
CreationDate date Order creation date
PayDate date Order payment date
Purse string e-Wallet – payment recipient
Amount decimal number Payment amount
Currency string Payment currency
Details string Details to indicate payment destination
ErrorCode integer Error code for the reason for payment rejection
ErrorText string Reason for payment rejection
Number of incoming transactions to Merchant e-
PaymentTransactionId integer
Wallet
You can find the full description of error codes and texts in the Appendixes.

16
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38
Reply Example (json):
{
"orders": [
{
"orderId": "sample string 1",
"extraId": "sample string 2",
"state": "Open",
"creationDate": "2015-07-24T19:02:19.6925212+01:00",
"payDate": "2015-07-24T19:02:19.6925212+01:00",
"purse": "sample string 4",
"amount": 5.0,
"currency": "sample string 6",
"details": "sample string 7",
"errorCode": 1,
"errorText": "sample string 8",
"paymentTransactionId": 1
},
{
"orderId": "sample string 1",
"extraId": "sample string 2",
"state": "Open",
"creationDate": "2015-07-24T19:02:19.6925212+01:00",
"payDate": "2015-07-24T19:02:19.6925212+01:00",
"purse": "sample string 4",
"amount": 5.0,
"currency": "sample string 6",
"details": "sample string 7",
"errorCode": 1,
"errorText": "sample string 8",
"paymentTransactionId": 1
}
],
"errorCode": 1,
"errorMsgs": [
"sample string 1",
"sample string 2"
]
}

1.4.4 "MWS_ordersLastTake" Function


This function allows the Merchant to receive the status of the recent order payment operations
as well as errors that occurred when executing the payment for the orders.
A request should be sent in order to receive the information about recent orders.
https://api.epayments.com/v1/merchant/orders/last/{take}

Request parameters:
Parameter Type Description M/O Field Example
The number of last orders. Minimum value:
take integer М 15
1. Maximum value: 20

Request example:
17
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38

https://api.epayments.com/v1/merchant/orders/last/15

The result of processing the request:


Parameter Type Description
Collection
Orders List of payments (orders)
of MerchantInvoiceResponse
Error code:
 0 – the operation has been successful
ErrorCode integer
 -1 – system error has occurred
 -2 – invalid/ empty request
ErrorMsgs Collection of string Message about the error
Collection of MerchantInvoiceResponse
OrderId string Order number
ExtraId string Additional information for the Merchant
Payment status. Possible values:
 Open. New order
State string  Paid. The order has been paid for.
 Expired. The order has expired
 Rejected. The order has been rejected
CreationDate date Order creation date
PayDate date Order payment date
Purse string e-Wallet – payment recipient
Amount decimal number Payment amount
Currency string Payment currency
Details string Details to indicate payment destination
ErrorCode integer Error code for the reason for payment rejection
ErrorText string Reason for payment rejection
You can find the full description of error codes and texts in the Appendixes.

Reply example (json):


{
"orders": [
{
"orderId": "sample string 1",
"extraId": "sample string 2",
"state": "Open",
"creationDate": "2015-03-26T13:48:15.7885975+00:00",
"payDate": "2015-03-26T13:48:15.7885975+00:00",
"purse": "sample string 4",
"amount": 5.0,
"currency": "sample string 6",
"details": "sample string 7",
"errorCode": 1,
"errorText": "sample string 8"
},
{
"orderId": "sample string 1",
18
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38

"extraId": "sample string 2",


"state": "Open",
"creationDate": "2015-03-26T13:48:15.7885975+00:00",
"payDate": "2015-03-26T13:48:15.7885975+00:00",
"purse": "sample string 4",
"amount": 5.0,
"currency": "sample string 6",
"details": "sample string 7",
"errorCode": 1,
"errorText": "sample string 8"
}
],
"errorCode": 1,
"errorMsgs": [
"sample string 1",
"sample string 2"
]
}

1.4.5 "MWS_ordersFromTill" Function


This function allows the Merchant to receive the status of the order payments operations which
have been executed during certain period of time. This function also allows receiving information
about errors that occurred when executing the payment for the orders.
A request should be sent in order to receive the information about the orders during the selected
period of time.
https://api.epayments.com/v1/merchant/orders/{from}/{till}

NOTE
Maximum period of time you can receive the information about is 60 days. In order to receive information for the
longer period of time you need to send several requests.

Request parameters:
Parameter Type Description M/O Field Example
from date Start of sampling. Format: MM.DD.YYYY М 12.31.2015
till date End of sampling. Format: MM.DD.YYYY М 10.02.2016

Request example:
https://api.epayments.com/v1/merchant/orders/12.31.2015/10.02.2016

The result of processing the request:


Parameter Type Description
Collection
Orders List of payments (orders)
of MerchantInvoiceResponse
Error code:
ErrorCode integer  0 – the operation has been successful
 -1 – system error has occurred

19
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38

 -2 – invalid/ empty request


ErrorMsgs Collection of string Message about the error
Collection of MerchantInvoiceResponse
OrderId string Order number
ExtraId string Additional information for the Merchant
Payment status. Possible values:
 Open. New order
State string  Paid. The order has been paid for.
 Expired. The order has expired
 Rejected. The order has been rejected
CreationDate date Order creation date
PayDate date Order payment date
Purse string e-Wallet – payment recipient
Amount decimal number Payment amount
Currency string Payment currency
Details string Details to indicate payment destination
ErrorCode integer Error code for the reason for payment rejection
ErrorText string Reason for payment rejection
You can find the full description of error codes and texts in the Appendixes.
Reply example (json):
{
"orders": [
{
"orderId": "sample string 1",
"extraId": "sample string 2",
"state": "Open",
"creationDate": "2015-03-26T14:00:24.1903858+00:00",
"payDate": "2015-03-26T14:00:24.1903858+00:00",
"purse": "sample string 4",
"amount": 5.0,
"currency": "sample string 6",
"details": "sample string 7",
"errorCode": 1,
"errorText": "sample string 8"
},
{
"orderId": "sample string 1",
"extraId": "sample string 2",
"state": "Open",
"creationDate": "2015-03-26T14:00:24.1903858+00:00",
"payDate": "2015-03-26T14:00:24.1903858+00:00",
"purse": "sample string 4",
"amount": 5.0,
"currency": "sample string 6",
"details": "sample string 7",
"errorCode": 1,
"errorText": "sample string 8"
}
],
"errorCode": 1,
"errorMsgs": [
"sample string 1",
20
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38

"sample string 2"


]
}

21
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38

4. APPENDIX
1.5 Error codes
Code Description
-1 System error
-2 Incorrect request. The invoice amount should be more than 0
400 Incorrect request. It is returned in case there are mistakes in the details transferred. The error text will contain
the error description.
403 Access has been prohibited. It is returned when a user or a merchant does not have the required permission to
pay for the order.
404 Account has not been found or does not exist
500 System error
12008 Card service has not been paid for (when paying for the account with a user’s card)
13009 Exchange rate has expired
13011 The indicated exchange rate does not exist
13012 Exchange rate is not valid
18002 Account with the indicated OrderId already exists
18004 Payment has been cancelled by a user
18011 The indicated payment source is not supported by the system
18013 The payment for the account cannot be executed because a merchant and user paying for the account are the
same person.
18014 The account has expired and cannot be paid for
18015 The account has been closed
18016 The invoice cannot be submitted because the order amount is less than the partner’s fee for merchant’s
services
19008 The user has not been verified to execute this operation
19022 The e-Wallet section for the indicated account currency has not been found or the indicated e-Wallet of the
recipient does not belong to the partner
20091 The operation cannot be executed because the user does not have payment password required to confirm the
payment
21002 The user does not have a fee schedule
21003 ePayments card limit has been exceeded
21004 e-Wallet limit has been exceeded
21005 Card operation amount is less than minimum limit allowed
21006 e-Wallet operation amount is less than minimum limit allowed
21007 ePayments card operation amount limit has been exceeded
21008 e-Wallet operation amount limit has been exceeded
21009 ePayments card maximum limit on the number of operations has been reached
21010 e-Wallet maximum limit on the number of operations has been reached
29011 User’s account has been suspended (the payment password has been entered incorrectly 3 times in a row)
40002 The indicated source of payment for the account does not have enough funds (ePayments card/user’s e-Wallet)

22
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38

1.6 FAQs and Business Restrictions


№ Question Answer
1 How can I receive notifications about operations completed? It is planned that HTTP notifications of the merchant about operations completed will be introduced in
the next MWS_PaymentOrder version
2 We can enter an optional parameter in the TargetEwallet redirect After registering at ePayments all users receive an eWallet. TargetEwallet is Merchant’s e-Wallet
to Operator IS. What if we do not enter it? Where can we get number. You can find it in your ePayments account.
TargetEwallet? If there is no TargetEwallet the first found Merchant’s e-Wallet will be indicated in the request.
3 What default settings are there for Merchant IS? Default settings are set when connecting Merchant IS upon his request. You can change default settings
via tickets system. You can find the list of default settings below:
 DefaultInvoiceLifeTime – invoice time frame (restriction: 300-1800 seconds)
 DefaultSuccessUrl – URL for redirecting to Merchant IS in case the operation has been
successful (restriction: one domain with DefaultDeclineUrl is required)
 DefaultDeclineUrl - URL or redirecting to Merchant IS in case the operation has been
unsuccessful (restriction: one domain with DefaultSuccessUrl is required)
 DefaultTargetPurseId –an account for funds depositing transfer at ePayments
4 What payment instruments are available for Users via MWS? The users will be able to pay for the invoice issued by the Merchant from ePayments e-Wallet and card.
5 How will funds be transferred if the currency of the Merchant IS The amount (Amount) indicated in the request in the currency (Currency) indicated in the request will
invoice is different from the currency the invoice will be paid in be deposited to the account (TargetEwallet) indicated in the request from the Merchant IS to the
by a USER? Operator IS.
6 Are there any fees applicable to Merchant IS when using MWS? There is a fee for accepting payments via MWS. The applicable fee amount is determined by the
Operator.
7 In what currency can the Merchant issue an invoice to be paid via A user can be invoiced only in USD or EUR. Merchants should exchange other currencies to USD or
Operator IS? EUR by themselves.
8 What payment methods does Operator IS offer? In the current version payments can be maid via ePayments e-Wallet or card with the condition that the
card service has been paid for and it should be active.
9 Are there any restrictions on the payment page via Operator IS? If a user enters his payment password incorrectly more than five times, his account will be suspended.

23
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38

24
ePayments
91 Wimpole Street, London W1G 0EF, United Kingdom
Company No. 07637944, VAT Number: GB 168 0010 38

5. CHANGES HISTORY
Version Date Description
0.1 2015-03-26 First draft
Sign element has been added to URL for the redirect from Operator IS to
0.2 2015-04-20
Merchant IS in section 3.1.3
In the result of processing the request of function "MWS_ordersOrderId"
0.3 2015-07-24
added the number of incoming transactions to Merchant e-Wallet

25

S-ar putea să vă placă și