You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Next »

The merchant can also find out the payment result (order status) by the order number using Web service. All possible order statuses are listed in the table "Order states".

To receive the order status by order number, send a request to IPS Assist server via HTTP POST, SOAP method (in UTF-8 coding) or in JSON format (swagger description: https://docs.belassist.by/swagger/).

The request URL for receiving the order status:

https://<SERVER-NAME>/orderstate/orderstate.cfm.

The order search using Web service can be performed only for the specified time period. For this, you have to specify the time period, when the order payments started to be performed using the parameters STARTDAY, STARTMONTH, STARTYEAR setting forth the sampling starting date, and the parameters ENDDAY, ENDMONTH, ENDYEAR setting forth the sampling end date. If the parameters are not specified, or incorrectly specified, the default values will be applied. The default sampling end date is taken to be the current date, while the default sampling start date is the current date, minus three days.

List of request parameters:

Parameter

Mandatory field

Adopted values

Default value

Description

Ordernumber

Yes

String 128  characters


Order number

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)

StartYear

No

Year in "2011" format

Minus three days from the current date

Sampling start date (GMT)

StartMonth

No

1-12

Minus three days from the current date

StartDay

No

1-31

Minus three days from the current date

StartHour

No

0-23

Minus three days from the current date

StartMin

No

0-59

Minus three days from the current date

EndYear

No

Year in "2011" format

Current year

Sampling end date (GMT)

EndMonth

No

1-12

Current month

EndDay

No

1-31

Current day

EndHour

No

0-23

Current hour

EndMin

No

0-59

Current minute

Format

No

1 – CSV
3 – XML
4 - SOAP
5 - JSON

4

Format of the results output. Passed only for a request in POST format (by default, the response will be in SOAP format). For other formats, the response is returned in the same format in which the request was made.

All request parameters are automatically validated. The validation rules are given in the table "The validation rules for input parameters".

An example of HTTP POST request for receiving a status of order 1001-01 whose payment started on July 6, 2016 (GMT):

<FORM ACTION="https://<SERVER-NAME>/orderstate/orderstate.cfm" METHOD="POST">
<INPUT TYPE="HIDDEN" NAME="Ordernumber" VALUE="1001-01">
<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="Startyear" VALUE="2016">
<INPUT TYPE="HIDDEN" NAME="Startmonth" VALUE="07">
<INPUT TYPE="HIDDEN" NAME="Startday" VALUE="06">
<INPUT TYPE="HIDDEN" NAME="Starthour" VALUE="00">
<INPUT TYPE="HIDDEN" NAME="Startmin" VALUE="00">
<INPUT TYPE="HIDDEN" NAME="Endyear" VALUE="2016">
<INPUT TYPE="HIDDEN" NAME="Endmonth" VALUE="07">
<INPUT TYPE="HIDDEN" NAME="Endday" VALUE="07">
<INPUT TYPE="HIDDEN" NAME="Endhour" VALUE="00">
<INPUT TYPE="HIDDEN" NAME="Endmin" VALUE="00">
<INPUT TYPE="HIDDEN" NAME="Format" VALUE="3">
<INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Submit">
</FORM>

List of response parameters:

Parameter

Value 

billnumber

Unique order number in IPS Assist

ordernumber

Order number

orderstate

Order status

orderamount

Original amount of order

ordercurrency

Original currency of order

packetdate

Request issue date (GMT)

signature

1) For signature type MD5 - empty

2) For PGP type – an X value, signed by IPS Assist secret key and converted into BASE64 string. 

checkvalue

Request validation code

1) For signature type MD5 – calculated as: uppercase(md5(uppercase(md5(SALT) + md5(Х)))), where SALT – the secret word; Х – is string concatenation of merchant_id, ordernumber, orderamount, ordercurrency, orderstate string representations (without delimiters). 

2) For PGP type – empty

An example of response result in CSV format:

ordernumber;billnumber;orderamount;ordercurrency;orderstate;packetdate;signature;checkvalue;2306-08;551508910014022;100.00;RUB;Approved;06.07.2016 11:59;; D6313123A5C09;

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 (order*)>
<!ELEMENT order (ordernumber?,billnumber?,orderamount?,ordercurrency?,orderstate?,packetdate?,checkvalue?)>
<!ELEMENT ordernumber (#PCDATA)>
<!ELEMENT billnumber (#PCDATA)>
<!ELEMENT orderamount (#PCDATA)>
<!ELEMENT ordercurrency (#PCDATA)>
<!ELEMENT orderstate (#PCDATA)>
<!ELEMENT packetdate (#PCDATA)>
<!ELEMENT checkvalue (#PCDATA)>]>
<result firstcode='0' secondcode='0' count='1'>
<order> <ordernumber>0001-01</ordernumber>
<billnumber>511111100000001</billnumber>
<orderamount>100.00</orderamount>
<ordercurrency>BYN</ordercurrency>
<orderstate>Approved</orderstate>
<packetdate>06.07.2016 11:58</packetdate>
<signature></signature>
<checkvalue> </checkvalue>
</order></result>