Interface X1

Interface X1. Sending invoice from merchant to customer.

The Keeper signing the requests should have a personal passport or higher

<w3s.request>
    <reqn></reqn>
    <wmid></wmid>
    <sign></sign>
    <invoice>
        <orderid></orderid>
        <customerwmid></customerwmid>
        <storepurse></storepurse>
        <amount></amount>
        <desc></desc>
        <address></address>
        <period></period>
        <expiration></expiration>
        <onlyauth></onlyauth>
        <lmi_shop_id></lmi_shop_id>
    </invoice>
</w3s.request>
  • Request properties:
Name Purpose Description
reqn Request number An integer, maximum 18 digits. Should always be larger than number of the previously submitted request!!! Max value is 999999999999999999
wmid Signer's WMID Is used only with the WM Keeper WinPro (Classic) authorization method.
sign Request signature Formed from the following parameters: orderid+customerwmid+storepurse+amount+desc+address+period+expiration+reqn. Is used only with WM Keeper WinPro (Classic) authorization method.
invoice Invoice attributes  
invoice\orderid Invoice ID number Number of the invoice in the merchant's accounting system. A positive integer of 15 digits maximally, less than 999999999999999.
invoice\customerwmid Customer’s WMID  
invoice\storepurse Purse for payment The number of the purse which the invoice should be paid to.
invoice\amount Invoice amount A floating-point number, without a decimal point (if the number is an integer) or insignificant trailing zeros. The separator is . (decimal point). For example, 10.5, 9 and 7.36 are valid, while 10.50 and 9. are not.
invoice\desc Description of the product or service String of 0 - 255 characters in length. No spaces at the beginning or end. Win-1251 encoding.
invoice\address Delivery address Line from 0 to 255 characters. No spaces at the beginning or end
invoice\period Maximum protection period Maximum protection period allowed in days; An integer in the range 0 - 255; zero means that protection is prohibited. When issuing an invoice to a WM purse, this is the maximum period (in days) for returning funds.
invoice\expiration Invoice payment period Maximum valid payment period in days; an integer in the range 0 - 255; zero means that the period is undefined.
invoice\onlyauth Consider recipient authorization If 0 - then invoices are issued without considering recipient's permission for this action. If 1 - then invoices can be issued only with recipient's permission (otherwise error code 35 is returned). Users can forbit to issue them invoices in two cases. The first case is when the recipient forbade to issue him invoices for this specific correspondent. The second case is when the recipient forbade to issue him invoices for unauthorized correspondents, and the issuer is unauthorized.
invoice\lmi_shop_id shop number This parameter is obligatory for aggregators only ( these are transitional services that accept payments for third parties). This field should be used by aggregators to transmit the Megastock catalogue http://www.megastock.ru/ registration number of a store which the given payment is accepted for.
  • Response format:
<w3s.response>
    <reqn></reqn>
    <retval></retval>
    <retdesc></retdesc>
    <invoice id="n1" ts="n2">
        <orderid></orderid>
        <customerwmid></customerwmid>
        <storepurse></storepurse>
        <amount></amount>
        <desc></desc>
        <address></address>
        <period></period>
        <expiration></expiration>
        <state>0</state>
        <datecrt></datecrt>
        <dateupd></dateupd>
    </invoice>
</w3s.response>

Response properties:

Name Purpose Description
reqn Request number  
retval Execution code Zero means that the request was executed successfully; see the execution code table for other values.
retdesc Execution code meaning  
invoice Invoice attributes The id attribute is the invoice's unique number in the WebMoney system. The ts attribute is an internal invoice number for the WebMoney system.
invoice\orderid Invoice number Invoice's serial number in the merchant's accounting system. Any integer without a decimal point.
invoice\customerwmid Customer’s WMID  
invoice\storepurse Number of the purse where funds will be sent to  
invoice\amount Amount of funds that customer needs to pay A floating-point number. The separator is . (a decimal point). Insignificant trailing zeros should not be used; nor should decimal points be used for integers. For example, 10.5, 9 and 7.36 are valid, while 10.50 and 9. are not.
invoice\desc Description of the product or service Line in the range of 0 - 255 characters. No spaces in the beginning and in the end.
invoice\address Delivery address Line from 0 to 255 characters. No spaces at the beginning or end
invoice\period Maximum protection period Maximum protection period allowed in days; An integer in the range 0 - 255; zero means that protection is prohibited. When issuing an invoice to a WM purse, this is the maximum period (in days) for returning funds.
invoice\expiration Maximum valid period Maximum valid payment period in days; An integer in the range 0 - 255; zero means that the period is undefined.
invoice\state Invoice state 0 – unpaid 1 – paid with protection 2 – fully paid or paid without protection 3 – rejected
invoice\datecrt Date and time of invoice creation YYYYMMDD HH:MM:SS
invoice\dateupd Date and time of invoice status change YYYYMMDD HH:MM:SS
  • Execution codes
Code Description
-100 General parsing error. Incorrect request format.
-1 Invalid value in w3s.request/invoice/orderid field
-2 Invalid value in w3s.request/invoice/customerwmid field
-3 Invalid value in w3s.request/invoice/storepurse field
-5 Invalid value in w3s.request/invoice/amount field
-6 Field in w3s.request/invoice/desc is too long
-7 Field in w3s.request/invoice/address is too long
-8 Invalid value in w3s.request/sign field
-9 Invalid value in w3s.request/reqn field
-11 Identifier sent in w3s.request/wmid is not registered
-12 Signature verification failed
102 Requirement for the steady increase of the w3s.request/reqn property was not followed
110 No permission for using the interface; certificate does not meet the requirements
111 Attempt to send invoice for a purse which does not belong to the WMID used to sign the request; security trust is also not set.
5 Invoice sender was not found
6 Invoice recipient was not found
7 A sender’s purse is not found
8 purse w3s.request/invoice/storepurse belongs to a payments aggregator, but lmi_shop_id is missing or specified incorrectly
11 the payer's purse is not found or there is no purse of the required type for payment
35 Payer is not authorized by correspondent to execute this operation
51 purse w3s.request/invoice/storepurse belongs to a payments aggregator, but lmi_shop_id is missing or specified incorrectly
52 merchant's purse w3s.request/invoice/storepurse isn't registered in the Megastock catalog and at the same time its owner holds Formal passport without verified phone number and verified ID card, that is not enough to accept funds using the given automated method
61 Borrower's trust limit has been exceeded.
67 The operation in the amount of more than 15000 WMR to this purse is only available to the identified citizens of the Russian Federation.
75 The legal entity cannot pay this seller
76 This payment method to the seller is limited with less than 60,000 WMR
87 For products and services of the specified category (lmi_shop_id), you cannot accept payment from aliases.
154 merchant's purse w3s.request/invoice/storepurse isn't registered inthe Megastock catalog and at the same time exceeded the daily limit for accepting funds set for this automated method
155 merchant's purse w3s.request/invoice/storepurse isn't registered in the Megastock catalog and at the same time exceeded the weekly limit for accepting funds set for this automated method
156 merchant's purse w3s.request/invoice/storepurse isn't registered in the Megastock catalog and at the same time exceeded the monthly limit for accepting funds set for this automated method
8002 You can not issue an invoice, the seller does not accept payments from the country of registration of the payer. Managing countries in the purse properties https://merchant.wmtransfer.com/conf/purses.asp
8005 You can not issue an invoice, because payments for these goods or services are prohibited in the buyer's country

See also:
Interface X23. Rejecting invoice from merchant to customer.