Exchanger Trust Pay

There is XML-API implemented in the section for automatic placement of a new bid to exchange.

<?xml version=\"1.0\"?>
<wm.exchanger.request>    
    <wmid></wmid>
    <signstr></signstr>
    <inpurse></inpurse>
    <outpurse></outpurse>    
    <inamount></inamount>    
    <outamount></outamount>    
    <capitallerwmid></capitallerwmid>    
</wm.exchanger.request>
  • JSON Request format:
    {    
        "wmid":"",
        "signstr":"",
        "inpurse":"",
        "outpurse":"",
        "inamount":"",
        "outamount":"",
        "capitallerwmid":"" 
    }
    
  • Request parameters:
name purpose comments
wmid Signer's WMID WMID from which a new bid will be placed.
signstr Request signature. 132-digits digital signature (by .kwm keys of the wmid) encoding the value of three tags of the request, pulled together in one line without spaces, "wmid + inpurse + outpurse + inamount + outamount"
inpurse purse number the number of WMID purse from which the amount for bid to exchange has to be taken out. The trust for transfer funds (wm.exchanger) has to be set to this purse. Please draw your attention that for capitallerwmid bid placement this trust is set up by capitaller’s administrator in site integration capitaller.ru section
outpurse purse number purse to receive exchanged funds
inamount payment amount the amount which will be automatically transferred from purse inpurse into purse of wm.exchanger section and placed for exchange
outamount transferred amount the amount which has to be transferred to the purse outpurse when the transfer is done. If the amount 0.0 is put in this field so the bid would be placed through FAST EXCHANGE, that is right after this bid is placed, from this bid would be completely redeemed the queue of the most paying from the opposite to its direction
capitallerwmid optional field if Capitaller’s WMID is being transferred in this field (www.capitaller.ru) the exchange bid on behalf of capitallerwmid may be set under this request. In this case there must be an access for WMID which signs the request which is described at Capitaller’s Impersonalization page.
  • XML Response format:
<?xml version=\"1.0\"?>
<wm.exchanger.response>
    <retval operid="" wmtransid=""></retval>
    <retdesc></retdesc>
    <capitallerwmid></capitallerwmid>
</wm.exchanger.response>
  • JSON Response format:
    {
        "retval":"", 
        "operid":"", 
        "wmtransid":"", 
        "retdesc":"", 
        "capitallerwmid":"" 
    }
    
  • Response parameters
Name Purpose Description
retval Execution code "0" means that the request was executed successfully. Check the execution code table for detailed information;
◦ operid attribute - number of a new bid
◦ wmtransid attribute - Transaction number (in the WebMoney system)
retdesc Execution code description error description in case retval tag is not 0
capitallerwmid optional field capitaller’s WMID
  • Example
<?xml version=\"1.0\"?>
<wm.exchanger.request>    
    <wmid>500000000008</wmid>
    <signstr>
        f9f340d9d7cfe488a728b01e0ebcbaa18472e8b2ccbcbe244390b148a7a714a9454056e736a34b2e1a0185297e70c593c0bf4fee9e71e9aed297fa0bfbfa55730344
    </signstr>
    <inpurse>Z200000000006</inpurse>
    <outpurse>R000000000006</outpurse>    
    <inamount>1.5</inamount>    
    <outamount>90</outamount>    
    <capitallerwmid>0</capitallerwmid>    
</wm.exchanger.request>

<?xml version=\"1.0\"?>
<wm.exchanger.response>
    <retval operid=\"27746344\" wmtransid=\"1531350222\">0</retval>
    <retdesc></retdesc>
    <capitallerwmid>0</capitallerwmid>
</wm.exchanger.response>
  • Execution/Error Codes
Code Description
Code Description
-10 Client's wmid missed
-11 Error with signature, tag signstr
-14 Signature verification failed.%Str%
-15 General parsing error. Incorrect request format.
-20 Operations for this purse typr are not awailable
-21 Wrong purse from which the amount for bid to exchange has to be taken out. Purse number must consists of 12 digits and one letter
-22 Wrong purse for receiving exchanged funds. Purse number must consists of 12 digits and one letter
-23 Wrong payment amount. This parametrs must be specifyed and consist only from digits and delimiter symbol without spaces and other symbols. Max length is 10 symbols
-24 Wrong payment amount. Which will be transfered to your purse. This parametrs must be specifyed and consist only from digits and delimiter symbol without spaces and other symbols. Max length is 10 symbols
-25 Purse purse number that you specified as a withdrawal doesn't belong to your WMID wmid, or the transaction you try to perform falls under the limitaitions imposed by the Guarantee (WMB - initial passport or higher, WME - http://urla.ru/7V )
-26 Purse purse number that you specified for incoming funds doesn't belong to your WMID wmid, or the transaction you try to perform falls under the limitaitions imposed by the Guarantee (WMB - initial passport or higher, WME - http://urla.ru/7V ).
-27 Purse purse number that you specified for incoming funds doesn't belong to your WMID wmid
-60 Problem while transferring funds from payer's purse to exchangers purse. Please check that you have enough of funds and set necessary trust settings.
2 Purse that you specified for incoming funds doesn't much to exchange direction
3 Amount, that you want to exchange is too small, you should specify amount more or equal to value
4
5
6
7
41 Result return error, try again
43 You already have a bid with the same (or more favorable) rate in the opposite direction. If you complete this operation, you will be forced to buy (clearing) your exists bid in the opposite direction. Adjust the rate of this or the opposite of your bid.
51 Error occurred (database level)
128 Unknown error occurred