Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Web Service Description

URL for HTTP POST: https://<SERVER-NAME>/cancel/cancel.cfm.URL for SOAP: https://<SERVER-NAME>/cancel/wscancel.cfm, parameters are passed by SOAP request, or when sending parameters in JSON format (, see swagger description:https://docs.belassist.by/swagger/).

List of request parameters:

Parameter

Mandatory field

Adopted values

Default value

Description

Billnumber

Yes

15 or 16 digits; extended format


Unique number of payment corresponding to the order number in IPS Assist; extended payment number can be passed only if the cheque is not transferred in the order.

Merchant_ID

Yes

Number


The enterprise identifier in IPS Assist

Login

Yes

8-20 character string


Login (Latin letters, digits and symbol _)

Password

Yes

8-20 character string


Password (Latin letters and digits)

Amount

No1

Number, 15 digits, two digits after the delimiter (delimiter '.')

Authorization amount

Refund amount

Currency

No1

3 characters

Authorization currency code

Cancellation and refund currency code. Only the authorization currency code can be used

CancelReason

No

1 – Declined by shop
2 – Declined by customer
3 – Fraud operation

2

Reason of cancellation or refund

Language

No

RU – Russian
EN – English

RU

Language of the results output

ClientIP

No



IP-address of the operator performing the cancellation/refund

Format

No

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

Format of input data4

Format of the results output. If the request is sent in SOAP or in JSON format, then the response will also be in SOAP or in JSON respectively, in other cases, in accordance with the passed format value.

CustomerExternalrefundid

No2

Data structure

Customer options

10 to 100 characters (allowed characters are [A-Za-z0-9\-_]


External refund ID (unique value within one order).

Customer

No3

Data structure


Customer options

Anchor
Anchor
1
1


1The parameters Amount and Currency can be available or missing in the request only simultaneously. If the above parameters are missing, the full amount cancelation operation will be performed.

Anchor
2
2


2The parameter is used only for JSON and SOAP formats.

Anchor
3
3


3The parameter is required only for canceling payments by ERIP.

...

Interface for HTTP POST - format (cancel)format 

An example of HTTP POST request for the payment cancellation by bankcard:

Code Block
languagexml
<FORM ACTION="https://<SERVER-NAME>/cancel/cancelwscancel.cfm" method="POST">
<INPUT TYPE="hidden" NAME="BillNumber" VALUE="511111100000001">
<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="Amount" VALUE="amount">
<INPUT TYPE="hidden" NAME="Currency" VALUE="Currency">
<INPUT TYPE="hidden" NAME="ClientIP" VALUE="IP-address">
<INPUT TYPE="hidden" NAME="Language" VALUE="Language of result output">
<INPUT TYPE="hidden" NAME="Format" VALUE="Result output format">
<INPUT TYPE="Submit"></FORM>

...

Code Block
languagexml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://www.paysecure.ru/ws/">
    <soapenv:Body><ws:WSCancelResponseParams>
        <order>
            <billnumber>500000210031071</billnumber>
            <ordernumber>14092012-002</ordernumber>
            <testmode>0</testmode>
            <ordercomment>test payment</ordercomment>
            <orderamount>4010.00</orderamount>
            <ordercurrency>BYN</ordercurrency>
            <rate>1</rate>
            <orderdate>06.07.2016 09:29:38</orderdate>
            <orderstate>Canceled</orderstate>
            <customer>
                <firstname>Testov</firstname>
                <lastname>Test</lastname>
                <middlename>T</middlename>
                <email>test@test.by</email>
            </customer>
            <operation>
                <billnumber>500000210031071.3</billnumber>
                <operationtype>300</operationtype>
                <operationstate>Завершено успешно.</operationstate>
 <operationstate>Success</operationstate>
                <amount>4010.00</amount>
                <currency>BYN</currency>
                <ipaddress>10.10.10.10</ipaddress>
                <meantype_id>1</meantype_id>
                <meansubtype></meansubtype>
                <meannumber>411111****1111</meannumber>
                <cardholder>TEST</cardholder>
                <cardexpirationdate>12/20</cardexpirationdate>
                <issuebank>Bank T</issuebank>
                <bankcountry>Россия</bankcountry>
                <responsecode>AS000</responsecode>
                <message></message>
                <customermessage>Завершено успешно<<customermessage>Success</customermessage>
                <recommendation></recommendation>
                <approvalcode>X34209</approvalcode>
                <protocoltypename></protocoltypename>
                <processingname>Fake</processingname>
                <operationdate>06.07.2016 09:33:51</operationdate>
                 <slipno></slipno>
            </operation>
        </order>
        <packetdate>06.07.2016 09:33:57</packetdate>
        <signature>kA0DAAIRzfHw5YyCW...bQnThrGPVGBK6gh9bxUl1w==</signature>
    </ws:WSCancelResponseParams></soapenv:Body>
</soapenv:Envelope>

An example of request result, returning the error (wrong amount):

Code Block
languagexml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server.generalException</faultcode><faultstring/><detail><ns:WSException xmlns:ns="http://www.paysecure.ru/ws/">
<firstcode>5</firstcode><secondcode>108</secondcode>
</ns:WSException></detail>
</soapenv:Fault></soapenv:Body></soapenv:Envelope>

An example of a request to cancel a payment using the ERIP system:

Code Block
languagexml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://www.paysecure.ru/ws/">
   <soapenv:Body>
        <ws:WSCancelRequestParams>
            <billnumber>5481287255582736</billnumber>
            <merchant_id>481287</merchant_id>
            <login>login</login>
            <password>password</password>
            <amount>50</amount>
   <currency>BYN</currency>
   <bankcode>444</bankcode>
   <accountnumber>BY11AAAA1234123412341234123445</accountnumber>
   <firstname>Ivan</firstname>
   <lastname>Ivanov</lastname>
 
        </WSCancelRequestParams>
    </soapenv:Body>
</soapenv:Envelope>
Note

Cancellation is possible only after a daily reconciliation with ERIP system. Attempting to cancel before reconciliation results in "15 - Forbidden operation" and "308 - Cancellation operation" errors.

An example of the result of a request sent before reconciliation:

Code Block
languagexml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>soapenv:Server.generalException</faultcode>
         <faultstring/>
         <detail>
            <ns:WSException xmlns:ns="http://www.paysecure.ru/ws/">
                <firstcode>15</firstcode>
                <secondcode>308</secondcode>
            </ns:WSException>
          </detail>
      </soapenv:Fault>
</soapenv:Envelope>

Back on top