SVC Balance Inquiry

You can perform an SVC Balance Inquiry request using the REST API for Oracle Retail EFTLink as long as a logon request was successfully performed. For more details, see the Use Case Logon.

To perform a log on request:

URL: wss://localhost:8443/svc_balance

Sample request from client:

{
             "POSdata":
             {
                     "TransactionNumber":"217",
                     "StoreID":"731",
                     "LanguageCode":"eng"
                     "Currency":"GBP",
                     "text":"0.00"
            },
            "TotalAmount":
                  {
                    "Currency":"GBP",
                    "text":"5.00"
                  },
            "PaymentProviderName":"",
            "RequestType":"",
            "RequestSubType":"",
            "ApplicationSender":"XSTORE",
            "WorkstationID":"1",
}

This request will be converted to IFSF XML and sent over the SSL channel 0 as follows:

<CardServiceRequest RequestID="7" WorkstationID="1" ApplicationSender="XSTORE" RequestType="CardBalanceQuery">
  <POSdata LanguageCode="en">
    <POSTimeStamp>2020-07-07T11:37:42</POSTimeStamp>
    <StoreID>731</StoreID>
    <TransactionNumber>217</TransactionNumber>
  </POSdata>
  <TotalAmount Currency="GBP">0.00</TotalAmount>
</CardServiceRequest>

If the request is successful, depending on the EFTLink Core a device request could be sent over SSL channel 1 to confirm that the request was successful as follows:

<?xml version="1.0" encoding="UTF-8"?>
<DeviceRequest RequestID="7.1" WorkstationID="1" ApplicationSender="MICROS" RequestType="Output">
  <Output OutDeviceTarget="CashierDisplay">
    <TextLine>Transaction Approved</TextLine>
  </Output>
</DeviceRequest>

This will be converted to JSON and sent back over the web socket channel to the client:

{
           "RequestType":"Output",
           "ApplicationSender":"MICROS",
           "WorkstationID":"1",
           "RequestID":"7.1",
           "Output":
           {
                   "OutDeviceTarget":"CashierDisplay",
                   "TextLine":"Transaction Approved"
           },
           "Input":
           {
                 "Command":
                 {
                        "PII":false,
                        "Command":"GetAnyKey"
                 },
                 "CustomerOptions":[]
           }
}

This particular device request is a message to display. The client must respond with an acknowledgement on the same web socket channel, the following JSON is the response to the device request:

{
         "Output":
         {
                 "OutDeviceTarget":"CashierDisplay",
                 "OutResult":"Success"
         },
         "RequestType":"Output",
         "ApplicationSender":"MICROS",
         "WorkstationID":"1",
         "RequestID":"7.1",
         "OverallResult":"Success"
}

SSL socket channel 1 on the client will receive the following response:

<?xml version="1.0" encoding="UTF-8"?>
<DeviceResponse RequestID="7.1" WorkstationID="1" OverallResult="Success" ApplicationSender="MICROS" RequestType="Output">
  <Output OutDeviceTarget="CashierDisplay" OutResult="Success"/>
</DeviceResponse>

Note:

This response should be sent as soon as the text to display has been rendered on the client user interface.

If the EFTLink payment Core is configured to provide a merchant copy of the receipt a device request will be sent back on SSL socket channel 1 as follows:

<?xml version="1.0" encoding="UTF-8"?>
<DeviceRequest RequestID="7.2" WorkstationID="1" ApplicationSender="MICROS" RequestType="Output">
  <Output OutDeviceTarget="Printer">
    <TextLine>Demo Res</TextLine>
    <TextLine>ORACLE Demo Store</TextLine>
    <TextLine>888 Test Ave., Columbia,MD</TextLine>
    <TextLine/>
    <TextLine> Merchant Copy</TextLine>
    <TextLine/>
    <TextLine>Merchant ID : Simulator123456</TextLine>
    <TextLine>Terminal ID : 12345678</TextLine>
    <TextLine/>
    <TextLine>Trans. Type : BAL INQUIRY</TextLine>
    <TextLine/>
    <TextLine>Card No.    : XXXXXXXXXXXX0002</TextLine>
    <TextLine>Card Type   : SVC</TextLine>
    <TextLine>Exp. Date   : 9912</TextLine>
    <TextLine/>
    <TextLine>Trans. Time : 07/07/2020 11:37</TextLine>
    <TextLine>Trace No.   : 224488</TextLine>
    <TextLine>RRN         : 149414</TextLine>
    <TextLine>Offline Auth: N</TextLine>
    <TextLine>Auth Code   : 225575</TextLine>
    <TextLine/>
    <TextLine>Balance     : ??10.00</TextLine>
    <TextLine/>
    <TextLine/>
    <TextLine> Approved</TextLine>
    <TextLine/>
    <TextLine>I agree to the terms of my</TextLine>
    <TextLine>credit agreement.</TextLine>
  </Output>
</DeviceRequest>

This will then be converted to JSON and sent back on the web socket channel as follows:

{
       "RequestType":"Output",
       "ApplicationSender":"MICROS",
       "WorkstationID":"1",
       "RequestID":"7.2",
       "Output":
       {
              "OutDeviceTarget":"Printer",
              "TextLine":
              "Demo Res\n
              ORACLE Demo Store\n
              888 Test Ave., Columbia,MD\n\n 
              
              Merchant Copy\n\n
              
              Merchant ID : Simulator123456\n
              Terminal ID : 12345678\n\n
              
              Trans. Type : BAL INQUIRY\n\n
              
              Card No.    : XXXXXXXXXXXX0002\n
              Card Type   : SVC\n
              Exp. Date   : 9912\n\n
              
              Trans. Time : 07/07/2020 11:37\n
              Trace No.   : 224488\n
              RRN         : 149414\n
              Offline Auth: N\n
              Auth Code   : 225575\n\n
              
              Balance     : ??10.00\n\n\n 
              
              
              Approved\n\n
              
              I agree to the terms of my\n
              credit agreement."
       },
       "Input":
       {
             "Command":
             {
                   "PII":false,
                   "Command":"GetAnyKey"
             },
             "CustomerOptions":[]
       }
}

The client should acknowledge the print request by sending the following JSON object on the same WebSocket channel:

Note:

EFTLink can wait up to 3 minutes to receive the device response before continuing the transaction. If the time out expires EFTLink will continue with the remainder of the transaction workflow.
{
       "Output":
       {
               "OutDeviceTarget":"CashierDisplay",
               "OutResult":"Success"
       },
       "RequestType":"Output",
       "ApplicationSender":"MICROS",
       "WorkstationID":"1",
       "RequestID":"7.2",
       "OverallResult":"Success"
}

SSL socket channel 1 on the client will receive the following response:

<?xml version="1.0" encoding="UTF-8"?>
<DeviceResponse RequestID="7.2" WorkstationID="1" OverallResult="Success" ApplicationSender="MICROS" RequestType="Output">
  <Output OutDeviceTarget="Printer" OutResult="Success"/>
</DeviceResponse>

Finally the client will receive the following payment response on channel 0 as follows:

Note:

In this instance the EFTLink Core is configured for combined receipts which means the customer copy of the receipt will be embedded in the CardServiceResponse as follows.
<?xml version="1.0" encoding="UTF-8"?>
<CardServiceResponse RequestID="7" WorkstationID="1" OverallResult="Success" ApplicationSender="XSTORE" RequestType="CardBalanceQuery">
  <Terminal STAN="149414" TerminalID="12345678" MerchantID="Simulator123456"/>
  <Tender>
    <TotalAmount Currency="GBP">5.00</TotalAmount>
    <Authorization CardPAN="492949******0002" ExpiryDate="1299" CardType="80" CardCircuit="UNKNOWN CARD" AcquirerID="UNKNOWN" AcquirerTransactionReference="149414" TimeStamp="2020-07-07T11:37:48"/>
  </Tender>
  <CardValue CardType="80" LoyaltyEligible="true">
    <CardPAN>492949******0002</CardPAN>
    <EndDate>####</EndDate>
    <CardCircuit>UNKNOWN CARD</CardCircuit>
    <Token>C883655########4641</Token>
  </CardValue>
  <Balance>10.00</Balance>
  <PaymentProviderName>oracle.eftlink.opiretail.OPIRetailCore</PaymentProviderName>
  <TextLine>Demo Res</TextLine>
  <TextLine>ORACLE Demo Store</TextLine>
  <TextLine>888 Test Ave., Columbia,MD</TextLine>
  <TextLine/>
  <TextLine> Customer Copy</TextLine>
  <TextLine/>
  <TextLine>Merchant ID : Simulator123456</TextLine>
  <TextLine>Terminal ID : 12345678</TextLine>
  <TextLine/>
  <TextLine>Trans. Type : BAL INQUIRY</TextLine>
  <TextLine/>
  <TextLine>Card No.    : XXXXXXXXXXXX0002</TextLine>
  <TextLine>Card Type   : SVC</TextLine>
  <TextLine>Exp. Date   : 9912</TextLine>
  <TextLine/>
  <TextLine>Trans. Time : 07/07/2020 11:37</TextLine>
  <TextLine>Trace No.   : 224488</TextLine>
  <TextLine>RRN         : 149414</TextLine>
  <TextLine>Offline Auth: N</TextLine>
  <TextLine>Auth Code   : 225575</TextLine>
  <TextLine/>
  <TextLine>Balance     : ??10.00</TextLine>
  <TextLine/>
  <TextLine/>
  <TextLine> Approved</TextLine>
  <TextLine/>
  <TextLine>I agree to the terms of my</TextLine>
  <TextLine>credit agreement.</TextLine>
</CardServiceResponse>

This will then be converted to JSON and sent to the client on the web socket channel:

Note:

The client will be expected to take the receipt details out of the final response and manage the printing as such.
{
       "Terminal":
       {
                "TerminalID":"12345678",
                "MerchantID":"Simulator123456"
       },
       "Tender":
       {
               "TotalAmount":
               {
                      "Currency":"GBP",
                      "text":"0.00"
               },
               "Authorization":
               {
                     "AcquirerID":"UNKNOWN",
                     "AcquirerTransactionReference":"149414",
                     "TimeStamp":"Tue Jul 07 11:37:48 BST 2020",
                     "CardType":"80",
                     "EntryMode":"0",
                     "CardPAN":"492949******0002",
                     "ExpiryDate":"1299",
                     "CardCircuit":"UNKNOWN CARD"
               }
         },
         "CardValue":
         {
                "ICC":{},
                "CardPAN":"492949******0002",
                "EndDate":"1299",
                "CardCircuit":"UNKNOWN CARD",
                "Category":"0",
                "Token":"C883655271097194641",
                "CardType":"80",
                "EntryMode":"0"
         },
         "Balance":"10.00",
         "PaymentProviderName":"oracle.eftlink.opiretail.OPIRetailCore",
         "RequestType":"17",
         "ApplicationSender":"XSTORE",
         "WorkstationID":"1",
         "RequestID":"7",
         "OverallResult":"Success",
         "Success":true
}