Interface X10. Receiving the Listing of Incoming Payable Invoices

Requests using WM Keeper Classic key authorization should be sent to: https://w3s.webmoney.ru/asp/XMLInInvoices.asp
Requests using WM Keeper Light certificate authorization should be sent to: https://w3s.wmtransfer.com/asp/XMLTransCert.asp
Method POST
Request format <w3s.request> <reqn></reqn> <wmid></wmid> <sign></sign> <getininvoices> <wmid></wmid> <wminvid></wminvid> <datestart></datestart> <datefinish></datefinish> </getininvoices> </w3s.request>
Request properties
name purpose description
reqn Request number An integer, maximum 15 digits.
It should always be larger than the number of previous request submitted
wmid Signer's WM-ID Is used for WM Keeper Classic authorization
sign Request's signature
Uses the following parameters: getininvoices/wmid + getininvoices/wminvid + getininvoices/datestart + getininvoices/datefinish + reqn
Is used for WM Keeper Classic authorization
getininvoices Parameters of requested invoice (invoices) Parameters: wmid, datestart, datefinish are required, the rest parameters may be left undefined or defined as 0
getininvoices\wmid WM-ID of invoice's recipient
getininvoices\wminvid Invoice number (in the WebMoney system) An integer >= 0
getininvoices\datestart Minimum time and date of invoice creation YYYYMMDD HH:MM:SS
getininvoices\datefinish Maximum time and date of invoice creation YYYYMMDD HH:MM:SS
Response format <w3s.response> <reqn></reqn> <retval></retval> <retdesc></retdesc> <ininvoices cnt="n" > <ininvoice id="n1" ts="n2"> <orderid></orderid> <storewmid></storewmid> <storepurse></storepurse> <amount></amount> <desc></desc> <address></address> <period></period> <expiration></expiration> <state>0</state> <datecrt></datecrt> <dateupd></dateupd> <wmtranid></wmtranid> </ininvoice> <ininvoice>...</ininvoice> </ininvoices> </w3s.response>
Response properties
name purpose description
reqn Request number
retval Execution code 0 means that the request was executed
retdesc Code interpretation
ininvoices List of invoices received in response Attribute: n defines number of invoices satisfying the request
ininvoices\ininvoice Invoice attributes id defines a unique number of a invoice in the WebMoney system
ts defines a service number of a invoice in the WebMoney system
ininvoice\orderid Invoice number Invoice number set by the sender
ininvoice\storewmid Seller's WMID
ininvoice\storepurse Number of the purse where funds will be sent to
ininvoice\amount Amount that the customer is to pay
ininvoice\desc Description of product or service
ininvoice\address Delivery address
ininvoice\period Maximum period of protection in days
ininvoice\expiration Maximum valid period in days
ininvoice\state Status
  • 0 - unpaid
  • 1 - paid with protection
  • 2 - paid
  • 3 - rejected
  • ininvoice\datecrt Date and time of the invoice creation
    ininvoice\dateupd Date and time of the invoice status change
    ininvoice\wmtranid Transaction number in the WebMoney system, if the invoice was paid
    Sample (IIS, ASP, JScript, MSXML)
    <%@ Language=JScript %> <% try { var AuthorizeType = 'light' // 'classic' var url; if ('classic'== AuthorizeType) url = 'https://w3s.webmoney.ru/asp/XMLInInvoices.asp' else url = 'https://w3s.wmtransact.com/asp/XMLInInvoicesCert.asp' var wmid = '111111111111' var wminvid = 0 var datestart = '20020409 00:00:00' var datefinish = '20020412 00:00:00' var reqwmid = '111111111111' var signstr // only for 'classic' var reqn = (new Date()).valueOf() if ('classic'== AuthorizeType) { var planstr = wmid + wminvid + datestart + datefinish + reqn var reqwmpwd = 'password' var reqwmfilename = 'c:\\wmkeeperclassickeyfile.kwm' var Signer = Server.CreateObject("WMSignerX.Signer") Signer.Login = reqwmid Signer.Passwd = reqwmpwd Signer.KeyFName = reqwmfilename signstr = Signer.SignString(planstr) } var s = '<w3s.request>' s += '<reqn>'+reqn+'</reqn>' if ('classic' == AuthorizeType) { s += '<wmid>'+reqwmid+'</wmid>' s += '<sign>'+signstr+'</sign>' } s += '<getininvoices>' s += ' <wmid>'+wmid+'</wmid>' s += ' <wminvid>'+wminvid+'</wminvid>' s += ' <datestart>'+datestart+'</datestart>' s += ' <datefinish>'+datefinish+'</datefinish>' s += '</getininvoices>' s += '</w3s.request>' var xmlhttp = Server.CreateObject ("MSXML2.ServerXMLHTTP"); if ('light' == AuthorizeType) { xmlhttp.setOption(3, 'WM id: '+reqwmid) } xmlhttp.open('POST', url, false); xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xmlhttp.send(s); var texttes = xmlhttp.responseText; // Response.Write(texttes) // var xmlres = Server.CreateObject ('Microsoft.XMLDOM'); xmlres.loadXML(texttes); var retcode = -1 var Node = xmlres.selectSingleNode("w3s.response/retval") if (null!=Node) retcode = parseInt(Node.text) if (0==retcode) { // } } catch(e) { Response.Write('error:'+(new Number(e.number)).toString(16)+'<br>\r\n') Response.Write('desc:'+e.description+'\r\n') } %>
    The usage of WEBMONEY and WEBMONEY TRANSFER graphic logos by the site holders is authorized by trademark owners.
    Copyright WebMoney © 1997-2012
    Contact Us  |  Help  |  Terms of Use

    For all questions please contact us WebMoney Technical Support