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

getMoneyFromVault

Operation getMoneyFromVault begins withdrawal of cash from the vault. The request should containt billonAmount and mpin.

Example SOAP request:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="ns1">
   <soapenv:Header/>
   <soapenv:Body>
      <ns1:getMoneyFromVault soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <amount xsi:type="ns1:billonAmount">
            <amount xsi:type="xsd:unsignedLong">10</amount>
            <currency xsi:type="xsd:string">PLN</currency>
            <colour xsi:type="xsd:unsignedLong">0</colour>
         </amount>
         <mpin xsi:type="xsd:string">L6UN8</mpin>
      </ns1:getMoneyFromVault>
   </soapenv:Body>
</soapenv: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:getMoneyFromVaultResponse>
   <return>
    <taskId>X60M88LSSU1714GB9E32GB1P14</taskId>
    <requestStatus>SUCCESS</requestStatus>
    <requestStatusDescription>Request succeeded.</requestStatusDescription>
   </return>
  </ns:getMoneyFromVaultResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Request parameters:

parametertypedescription
amountbillonAmountamount of money to be transferred from vault
mpinstringnumber pin (long pin) of machine

Response parameters:

nametypedescription
taskIdstringidentifier of created task
requestStatusstringresult of request
requestStatusDescriptionstringstatus description

Possible errors:

ErrorDescription
ERR_INVALID_AMOUNTInvalid amount
ERR_INVALID_CURRENCYInvalid currency
ERR_INVALID_MONEY_COLOURinvalid/not supported colour of money
ERR_INVALID_MPINInvalid mpin code
ERR_VAULT_BUSYThe vault is busy performing another operation
ERR_NOT_ENOUGH_MONEYNot enough money

Checking the progress:

The progress of the withdrawal of cash from the vault can be followed, providing received taskId in the request getTaskStatus. A percent of the withdrawal is seen in the field progressPercent and the status of task in the field status.

The status of a task can be:

  • PREPARATION – the preparation of starting the transfer
  • TRANSFERRING – the transfer is in progress
  • FINISHED_OK – the money transfer finished succesfully
  • FINISHED_ERR_NOT_ENOUGH_MONEY – there is not enough money to transfer
  • FINISHED_ERR_CHANGE_MISMATCH – the amount could not be collected (loose change, small change)
  • FINISHED_ERR_SELLER_LIMITS_EXCEEDED – exceeded limits
  • FINISHED_ERR_BUYER_LIMITS_EXCEEDED – exceeded limits
  • FINISHED_ERR – an unknown error

An example of JSON in a parameter ‘additionalInfo’ in the response of the operation ‘getTaskStatus’:

{
   "amount": 500,
   "actual_amount": 500,
   "restart_amount": 0
}
Was this article helpful to you? Yes No

How can we help?