Cash Transaction Command
This is used to initiate a Cash transaction on the POS terminal. The amount of goods purchase is to be sent along in the request as shown below. The transaction would be completed on the POS as the customer would be prompted to confirm the amount of the goods to be purchased.
Endpoint
ws://localhost:1337
Headers n/a
n/a
Sample Request
<request>
<command>purchase</command>
<amount>100</amount>
<accounttype>default</accounttype>
<paymentOption>cash</paymentOption>
<staff>123S89</staff>
</request>
Response Message field description
This field will vary depending on the transaction:
Field | Field Name | Description |
---|---|---|
1 | Stan | Terminal serial counter |
2 | RespMessage | Transaction Response Message |
3 | RespCode | Transaction Response Code |
4 | Amount | Transaction Amount |
5 | TerminalId | POS Terminal Id |
7 | Staff | Staff Id of the teller or cashier |
8 | Payment Option | The method used for Payment |
Sample Response (success)
The response for success: at least a port is returned
<transResponse>
<Stan>000003</Stan>
<RespMessage>Transaction Approved</RespMessage>
<RespCode>00</RespCode>
<Amount>100</Amount>
<TerminalId>2056XYZ1</TerminalId>
<staff>123S89</staff>
<paymentOption>cash</paymentOption> </transResponse>
Sample Response (failure)
<transResponse>
<Stan>000003</Stan>
<RespCode>51</RespCode>
<Amount>100</Amount>
<TerminalId>2056XYZ1</TerminalId>
<staff>123S89</staff>
<paymentOption>cash</paymentOption>
</transResponse>
Updated about 13 hours ago
What’s Next