1. Home
  2. Corporate Node
  3. SOAP requests
  4. giveMoneyRequest

giveMoneyRequest

Operation giveMoneyRequest request the money transfer from cNode to another user.

Example SOAP request:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:ns="ns1">
 <SOAP-ENV:Body  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <ns:giveMoneyRequest>
   <username>testUsername</username>
   <uniqueTransferId>54321</uniqueTransferId>
   <amount>
    <amount>1000</amount>
    <currency>PLN</currency>
    <colour>0</colour>
   </amount>
   <shortDescription>Transfer title</shortDescription>
   <peerLocation>
    <userName>peerUsername</userName>
    <userLocation>
     <machineIdHex>0000111100005555</machineIdHex>
     <ip>192.168.3.147</ip>
     <tcp>8999</tcp>
     <udp>8999</udp>
    </userLocation>
    <buddyLocation>
     <machineIdHex>0000222200005555</machineIdHex>
     <ip>192.168.3.145</ip>
     <tcp>8990</tcp>
     <udp>8990</udp>
    </buddyLocation>
    <confirmationCode1></confirmationCode1>
    <confirmationCode2></confirmationCode2>
   </peerLocation>
  </ns:giveMoneyRequest>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Example SOAP response:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:ns="ns1">
 <SOAP-ENV:Body  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <ns:giveMoneyRequestResponse>
   <return>
    <taskId>8M5M81KS4RM4FALBNUN2C51CLW</taskId>
    <requestStatus>SUCCESS</requestStatus>
    <requestStatusDescription>Request succeeded.</requestStatusDescription>
   </return>
  </ns:giveMoneyRequestResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Request parameters:

parametertypedescriptionrequired?specification
usernamestringname of user – receiver of money transferyesIt must be different from the current user name.
uniqueTransferIdstringthe transfer identifieryes
amountbillonAmounttransferred amountyes
shortDescriptionstringa short description or a title of the transferno
peerLocationbillonUserLocationuser peer localization (if not provided, application will look for user in network)no

Response parameters:

nametypedescription
taskIdstringidentifier of created task
requestStatusstringresult of request
requestStatusDescriptionstringstatus description

Possible errors:

errordescription
ERR_INVALID_USERNAMEinvalid username
ERR_INVALID_TRANSFER_IDinvalid transfer identifier
ERR_INVALID_AMOUNTinvalid amount
ERR_INVALID_CURRENCYinvalid currency
ERR_INVALID_MONEY_COLOURinvalid/not supported colour of money
ERR_INVALID_PEER_LOCATIONinvalid peer location
ERR_NOT_ENOUGH_MONEYnot enough amount of money
Was this article helpful to you? Yes No

How can we help?