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

expectPaymentRequest

An operation expectPaymentRequest orders CNode to accept new payment, which is requested for it by given user, for a given amount.

Normally all CNodes (that work on the production colony) reject any transfers from other users automatically; this operation allows to make such a transfer. It returns a transfer identifier, which needs to be provided when requesting the transfer in order that CNode knows that the transfer needs to be accepted.

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:expectPaymentRequest>
   <username>username1</username>
   <amount>
    <amount>1000</amount>
    <currency>PLN</currency>
    <colour>0</colour>
   </amount>
   <timeout>600</timeout>
  </ns:expectPaymentRequest>
 </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:expectPaymentRequestResponse>
   <return>
    <requestPaymentIdConfirmation>X60M88LSSU1714GB9E32GB1P14</requestPaymentIdConfirmation>
    <requestStatus>SUCCESS</requestStatus>
    <requestStatusDescription>Request succeeded.</requestStatusDescription>
   </return>
  </ns:expectPaymentRequestResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Request parameters:

ParameterTypeDescriptionRequired?
usernamestringName of the user that will send the payment request (the user to which money will be send)Yes
amountbillonAmountThe amount which will be sentYes
timeoutunsignedIntTime for which CNode should expect the requestYes

Response parameters:

NameTypeDescription
requestPaymentIdConfirmationstringIdentifier which needs to be provided when requesting the transfer
requestStatusDescriptionstringA description of a status
requestStatusstringThe request execution status

Possible errors:

ErrorDescription
ERR_INVALID_AMOUNTThe invalid amount
ERR_INVALID_CURRENCYAn invalid currency
ERR_INVALID_MONEY_COLOURAn invalid/not supported colour of money
ERR_INVALID_USERNAMEThe invalid username
Was this article helpful to you? Yes No

How can we help?