The merchant can also get the results of the transactions performed within a certain period by means of Web service.
To get the authorization results, send a request to IPS Assist server via HTTP POST, SOAP method (in UTF-8 coding) or in JSON format (swagger description: https://docs.assist.ru/swagger/).
The request URL for receiving the authorization results:
https://<SERVER-NAME>/resultbydate/resultbydate.cfm.
You can get the results via Web service only for a specified time period not exceeding 24 hours. For this, specify the values of parameters that set forth the sampling start date, and parameters setting the sampling end date, so that the difference between these dates is no more than 24 hours. Otherwise, the default values will be used for these parameters (for the last three hours). In other words, if parameters of the sampling start and end dates are not specified, or specified incorrectly, the results of the operations performed within the last three hours will be output as the request results. Please, note that the parameters of the sampling date and time shall be indicated for GMT/UTC time zone.
If the buyer interrupted the payment process before the selection of payment means then there no payment operation created in IPS Assist and there no operations on this order in the results displayed.
Attention! You can request the operations results only for the time period not exceeding 24 hours and with the maximum interval of 10 minutes.
List of request parameters:
Parameter | Mandatory field | Adopted values | Default value | Description |
Merchant_ID | Yes | Number | The enterprise identifier in IPS Assist | |
Login | Yes | 8 - 20 characters | Login (Latin letters, digits and symbol _) | |
Password | Yes | 8 - 20 characters | Password (Latin letters and digits) | |
TestMode | Yes | 0 1 | 0 | Mode (0 – operation mode, |
Language | No | RU EN | EN | Language of the results output |
Format | No | 1 – CSV | 1 | Format of the results output. Passed only for a request in POST format (by default, the response will be returned in CSV format). For other formats, the response is returned in the same format in which the request was made. |
MeanType_ID | No | 1 – VISA 2 – MasterCard 3 – DCL 4 – JCB 5 – AMEX 6 - MIR 30 – WebMoney 32 – YandexMoney 36 – QIWI 39 – QIWIBeeline 40 – QIWIMts 41 - QIWIMegafon | All values sampling by default | Sampling by types of payment means |
Operationstate | No | N – created, P – being processed, S – completed, F – failed T – closed upon time expiration | All values sampling by default | Sampling by operation states. Use upper case only. |
Operationtype | No | A – payment C – payment confirmation R – cancellation | All values sampling by default | Sampling by operation types. Use upper case only. |
StartDay | No | dd | By default: minus three hours from the current time at the moment of sampling | Sampling start date (GMT) |
StartMonth | No | mm | ||
StartYear | No | yyyy | ||
StartHour | No | hh | ||
StartMin | No | mm | ||
EndDay | No | dd | By default: current time at the moment of sampling | Sampling end date (GMT) |
EndMonth | No | mm | ||
EndYear | No | yyyy | ||
EndHour | No | hh | ||
EndMin | No | mm | ||
DateTimeMode | No | 0 – by order date; | 0 | Date type - target date for data sampling |
ZipFlag | No | "0" – browser | 0 | Format of the results output |
Based on the values of the request parameters the replay information is selected and formatted.
For example, only successful payment operations by VISA cards can be received as the request result.
An example of HTTP POST results request returning the information on the completed payment operations by VISA cards in the test mode from 07:00 till 11:00 (GMT) 01.03.2011 in XML format:
<FORM ACTION="https://<SERVER-NAME>/resultbydate/resultbydate.cfm" method="POST"> <INPUT TYPE="hidden" NAME="Merchant_ID" VALUE="Your Merchant_ID"> <INPUT TYPE="hidden" NAME="Login" VALUE="Your login"> <INPUT TYPE="hidden" NAME="Password" VALUE="Your password"> <INPUT TYPE="hidden" NAME="TestMode" VALUE="1"> <INPUT TYPE="hidden" NAME="Language" VALUE="EN"> <INPUT TYPE="hidden" NAME="MeanType_ID" VALUE="1"> <INPUT TYPE="hidden" NAME="Operationstate" VALUE="S"> <INPUT TYPE="hidden" NAME="Operation type" VALUE="A"> <INPUT TYPE="hidden" NAME="StartDay" VALUE="01"> <INPUT TYPE="hidden" NAME="StartMonth" VALUE="03"> <INPUT TYPE="hidden" NAME="StartYear" VALUE="2011"> <INPUT TYPE="hidden" NAME="StartHour" VALUE="07"> <INPUT TYPE="hidden" NAME="StartMin" VALUE="00"> <INPUT TYPE="hidden" NAME="EndDay" VALUE="01"> <INPUT TYPE="hidden" NAME="EndMonth" VALUE="03"> <INPUT TYPE="hidden" NAME="EndYear" VALUE="2011"> <INPUT TYPE="hidden" NAME="EndHour" VALUE="11"> <INPUT TYPE="hidden" NAME="EndMin" VALUE="00"> <INPUT TYPE="hidden" NAME="Format" VALUE="3"> <INPUT TYPE="Submit"></FORM>
List of response parameters:
Parameter | Value |
ordernumber | Order number |
billnumber | Extended format of billnumber |
testmode | Test mode |
ordercomment | Comment |
orderamount | Original amount of order |
ordercurrency | Original currency of order |
amount | Operation amount |
currency | Operation currency |
rate | Currency rate |
lastname | Payer's last name |
firstname | Payer's first name |
middlename | Payer's middle name |
Payer's e-mail | |
clientip | Transactor's IP-address |
ipaddress | Payer's IP-address |
meantype_id | Payment means ID |
meantypename | Type of payment means |
meansubtype | Payment means subtype |
meannumber | Number of payment means |
cardholder | Payment means holder |
issuebank | Name of issue bank |
bankcountry | Country of issue bank |
orderdate | Date of order |
orderstate | Order state |
responsecode | Response code |
message | Message |
customermessage | Result message for a customer |
recommendation | Recommendations |
approvalcode | Authorization code |
protocolname | Protocol |
processingname | Processing |
operationtype | Operation type |
operationdate | Operation date and time (GMT) |
authresult | 3Ds authorization result (Y – success, N - fail, A - Attempt, U – unknown) |
authrequired | The card involvement in 3Ds check result (1 – involved, 0 – not involved, -1 – unknown, null – error appear during involvement check) |
slipno | Financial transaction identifier |
packetdate | Request issue date |
checkvalue | uppercase(md5(uppercase(md5(SALT) + md5(Х)))), where SALT – secret word; Х – result of the following parameters string concatenation: merchant_id, ordernumber, orderamount, ordercurrency, orderstate (without delimiters), + means string concatenation. |
Card expired date |
Attention! The testmode value of response has to be checked. If the payment was made in test mode (testmode = 1), then the shipment of goods or providing of services for the current request is not required.
An example of field for outputting the results in XML format
<?xml version='1.0' encoding='utf-8' standalone='yes'?> <!DOCTYPE result [ <!ATTLIST result firstcode CDATA #REQUIRED secondcode CDATA #REQUIRED count CDATA #REQUIRED> <!ELEMENT result (payment*)> <!ELEMENT payment (ordernumber?,billnumber?,testmode?,ordercomment?,orderamount?,ordercurrency?,amount?,currency?,rate?,firstname?,lastname?,middlename?,email?,clientip?,ipaddress?,meantype_id?,meantypename?,meansubtype?,meannumber?,cardholder?,issuebank?,bankcountry?,orderdate?,orderstate?,responsecode?,message?,customermessage?,recommendation?,approvalcode?,protocoltypename?,processingname?,operationtype?,operationdate?,authresult?,authrequired?, slipno?,packetdate?,signature?,checkvalue?,cardexpirationdate?,)> <!ELEMENT ordernumber (#PCDATA)> <!ELEMENT billnumber (#PCDATA)> <!ELEMENT testmode (#PCDATA)> <!ELEMENT ordercomment (#PCDATA)> <!ELEMENT orderamount (#PCDATA)> <!ELEMENT ordercurrency (#PCDATA)> <!ELEMENT amount (#PCDATA)> <!ELEMENT currency (#PCDATA)> <!ELEMENT rate (#PCDATA)> <!ELEMENT firstname (#PCDATA)> <!ELEMENT lastname (#PCDATA)> <!ELEMENT middlename (#PCDATA)> <!ELEMENT email (#PCDATA)> <!ELEMENT clientip (#PCDATA)> <!ELEMENT ipaddress (#PCDATA)> <!ELEMENT meantype_id (#PCDATA)> <!ELEMENT meantypename (#PCDATA)> <!ELEMENT meansubtype (#PCDATA)> <!ELEMENT meannumber (#PCDATA)> <!ELEMENT cardholder (#PCDATA)> <!ELEMENT issuebank (#PCDATA)> <!ELEMENT bankcountry (#PCDATA)> <!ELEMENT orderdate (#PCDATA)> <!ELEMENT orderstate (#PCDATA)> <!ELEMENT responsecode (#PCDATA)> <!ELEMENT message (#PCDATA)> <!ELEMENT customermessage (#PCDATA)> <!ELEMENT recommendation (#PCDATA)> <!ELEMENT approvalcode (#PCDATA)> <!ELEMENT protocoltypename (#PCDATA)> <!ELEMENT processingname (#PCDATA)> <!ELEMENT operationtype (#PCDATA)> <!ELEMENT operationdate (#PCDATA)> <!ELEMENT authresult (#PCDATA)> <!ELEMENT authrequired (#PCDATA)> <!ELEMENT slipno (#PCDATA)> <!ELEMENT packetdate (#PCDATA)> <!ELEMENT signature (#PCDATA)> <!ELEMENT checkvalue (#PCDATA)> <!ELEMENT cardexpirationdate (#PCDATA)>]> <result firstcode='0' secondcode='0' count='17'> <payment> <ordernumber>0001-01</ordernumber> <billnumber>511111100000001.1</billnumber> <testmode>1</testmode> <ordercomment>test payment</ordercomment> <orderamount>100.00</orderamount> <ordercurrency>RUB</ordercurrency> <amount>100.00</amount> <currency>RUB</currency> <rate>1</rate> <firstname>Test</firstname> <lastname>Testov</lastname> <middlename>Testovich</middlename> <email>test@testpost.ru</email> <clientip>111.23.11.23</clientip> <ipaddress>0.0.0.0</ipaddress> <meantype_id>1</meantype_id> <meantypename>VISA</meantypename> <meansubtype>Corporate Purchasing Card</meansubtype> <meannumber>411111****1111</meannumber> <cardholder>TEST</cardholder> <issuebank>BANK </issuebank> <bankcountry>Russia</bankcountry> <orderdate>01.03.2011 08:39:25</orderdate> <orderstate>Approved</orderstate> <responsecode>AS000</responsecode> <message>Success </message> <customermessage>Success </customermessage> <recommendation></recommendation> <approvalcode>F31720</approvalcode> <protocoltypename>NET</protocoltypename> <processingname>Name</processingname> <operationtype>100</operationtype> <operationtdate>01.02.2012 06:39:42</operationdate> <authresult/> <authrequired>0</authrequired> <slipno>111111</slipno> <packetdate>01.03.2011 10:55:51</packetdate> <checkvalue> </checkvalue> <cardexpirationdate>12/20</cardexpirationdate> </payment> <payment> ... </payment> </result>
An example of field for outputting the results in CSV format:
"ordernumber";"billnumber";"testmode";"ordercomment";"orderamount";"ordercurrency";"amount";"currency";"rate";"firstname";"lastname";"middlename";"email";"clientip";"ipaddress";"meantype_id";"meantypename";"meansubtype";"meannumber";"cardholder";"issuebank";"bankcountry";"orderdate";"orderstate";"responsecode";"message";"customermessage";"recommendation";"approvalcode";"protocoltypename";"processingname";"operationtype";"operationdate";"authresult";"authrequired";"slipno";"packetdate";"checkvalue";"cardexpirationdate"; "001-1";"500000000000000.1";"0";"test payment";"70.00";"USD";"1 975.48";"RUB";"28.2212";"Testov";"упр";"S.";"test@test.ru";"10.20.10.00";"0.0.0.0";"1";"VISA";"Classic";"411111****1111";"TEST";"New Bank";"Russia";"18.04.2011 07:51:42";"Paid";"AS000";"Completed.";"Completed.";"";"X28577";"NET";"Fake";"100";"01.02.2012 06:39:42";"";"0";”111111”;"18.04.2011 12:27:32";"5189407747A5435E9E7A0C06A7BC18CD";"12/20";
If an error occurs, Web service will return the error first and second code values, for example, in XML format (in case of wrong password):
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> <!DOCTYPE result [...]> <result firstcode="7" secondcode="102" count="0" /></result>
The WEB-service description for SOAP format can be seen on page:
https://<SERVER-NAME>/resultbydate/resultbydate.wsdl .
Replay example in SOAP format:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://www.paysecure.ru/ws/"><soapenv:Body> <ws:resultbydateResponse><resultbydate><payment> <ordernumber>18062012_SDR</ordernumber> <billnumber>550000110000001.1</billnumber> <testmode>1</testmode> <ordercomment>тестовый платеж</ordercomment> <orderamount>21.00</orderamount> <ordercurrency>RUB</ordercurrency> <amount>21.00</amount> <currency>RUB</currency> <rate>1</rate> <firstname>Test</firstname> <lastname>Testov</lastname> <middlename>T.</middlename> <email>test@test.ru</email> <clientip>10.10.10.10</clientip> <ipaddress>0.0.0.0</ipaddress> <meantype_id>2</meantype_id> <meantypename>MasterCard</meantypename> <meansubtype>Standart</meansubtype> <meannumber>546792****4128</meannumber> <cardholder>TEST</cardholder> <issuebank>Bank</issuebank> <bankcountry>RUS</bankcountry> <orderdate>18.06.2012 11:10:06</orderdate> <orderstate>Approved</orderstate> <responsecode>AS000</responsecode> <message>Success </message> <customermessage>Success</customermessage> <recommendation/> <approvalcode>X40334</approvalcode> <protocoltypename>NET</protocoltypename> <processingname>Fake</processingname> <operationtype>100</operationtype> <operationdate>18.06.2012 11:10:07</operationdate> <authresult/> <authrequired>0</authrequired> <slipno>111111</slipno> <packetdate>18.06.2012 11:22:37</packetdate> <checkvalue>45A33F800F2BD16C02E3D2F5C81557A0</checkvalue> <cardexpirationdate>12/20</cardexpirationdate> </payment> </resultbydate></ws:resultbydateResponse ></soapenv:Body></soapenv:Envelope>
Attention!
The following root certificates have to be installed on the requester side in the Trusted Root Certification Authorities Store for correct work with WEB-services via secure communication over TLS:
- root certificates GlobalSign (https://www.globalsign.com/repository/ca-certificates/):
- GlobalSign Root R3;
- GlobalSign ECC Root R5;
- GlobalSign Root R6.
Before to start, check the presence of these certificates in the trust store and add tit if necessary.