Apply Payment Command

Overview

The RMS receives an applyPayment command when a tender for a check approves. In the event of a partial approval, the terminal will continue to request additional tender until the check is paid in full. The RMS receives an applyPayment command for each leg of a partial approval. With each applyPayment, the RMS updates remainingAmount and tableRemainingAmount. When tableRemainingAmount equals zero, the check is paid in full.


Request Structure

ELEMENTTYPEDESCRIPTIONSIZEREQUIRED
terminalId String Terminal ID request originated from V8 Required
merchantId String Merchant ID of requestor V13 Required
apiVersion String API version number V20 Required
requestId String A unique identifier for this request V50 Required
requestTimestamp String Date and time of the request F19 Required
action String Transaction type – “applyPayment” V24 Conditional
data Object Data applicable to this transaction type
server Object
serverId String Server ID entered on the terminal V50 Optional
trackData Object
Track1 String Track 1 from server card swiped V50 Optional
Track2 String Track 2 from server card swiped V50 Optional
Track3 String Track 3 from server card swiped V50 Optional
check Object
tableId Object Table ID for internal use by system V50 Required
checkId String Check ID for internal use by system V50 Required
payment String Check ID for internal use by system V50 Required
tenderType Object
card String Payment Type: Card, Cash etc V50 Required
cardType Object
authNumber String Authorization number of payment V50 Required
referenceNumber Number Reference number of payment V50 Required
lastDigits Number Last four digits of the PAN V4 Required
paidAmount Number Payment amount received / approved V9 Required
tipAmount Number Tip amount entered by user V9 Optional
error Object Present if the terminal detects an error in the previous response. Applicable to all actions.
status String Status code F3 Conditional
statusDesc String Description for status code V50 Conditional
session String Session ID from Moneris cloud V50 Conditional


{
   "terminalId": "I9000001",
   "merchantId": "0030112345678",
   "apiVersion": "1.0",
   "requestId": "I9000001-1555449670-037",
   "idempotencyKey": "74ae1696-b1e3-4328-af6d-f1e04d947a13",
   "requestTimestamp": "2020-01-01 09:00:00",
   "action": "applyPayment",
   "data": {
      "server": {
         "serverId": "1234",
         "trackData": {
            "track1": "",
            "track2": "",
            "track3": ""
         }
      },
      "check": {
         "tableId": "5cbb687bb376894ed03662db",
         "checkId": "1"
      },
      "payment": {
         "tenderType": "CARD",
         "card": {
            "cardType": "VISA",
            "authNumber": "183235",
            "referenceNumber": "1020293",
            "lastDigits": "1234"
         },
         "paidAmount": 1000,
         "tipAmount": 100
      }
   },
   "error": {
      "status": "703",
      "statusDesc": "Table Number Error"
   },
   "session": "c9e5558c-3dfb-4359-adcf-c3c3de0d269d"
}

Response Structure

ELEMENTTYPEDESCRIPTIONSIZEREQUIRED
terminalId String Terminal ID request originated from V8 Required
merchantId String Merchant ID of requestor V13 Required
configCode String Integration configuration code provided by Moneris V25 Required
requestId String A unique identifier for this request V50 Required
requestTimestamp String Date and time of the request F19 Required
status String RMS status code F3 Required
statusDesc String RMS status code description V50 Required
data Object Data applicable to this transaction type
table Object
tableId String Primary key, used in subsequent requests to address particular table V50 Required
tableTotalAmount Number The total amount for the table. V9 Required
tableRemainingAmount Number Amount due for the table. Reduced by the approved amount each time a payment is approved. V9 Required
check Object
checkId String Check ID for internal use by system. V50 Required
checkName String Check name for display in terminal user interface V50 Optional
totalAmount Number Total transaction amount V9 Required
preTaxAmount Number Transaction Amount Before Taxes V9 Optional
gratuity Number Service charges. This is a charge the restaurant may automatically add to a bill. For example, some restaurants add a gratuity for large parties or groups. V9 Optional
remainingAmount Number The amount due after a partial approval (total amount + tip - amount(s) partially approved) V9 Required
session String Session ID from Moneris cloud V50 Conditional


{
   "terminalId": "I9000001",
   "merchantId": "0030112345678",
   "configCode": "C12345678SI",
   "requestId": "I9000001-1555449670-037",
   "responseTimestamp": "2020-01-01 09:00:00",
   "status": "200",
   "statusDesc": "OK",
   "data": {
      "table": {
         "tableId": "5cbb687bb376894ed03662db",
         "tableTotalAmount": 12300,
         "tableRemainingAmount": 0
      },
      "check": {
         "checkId": "1",
         "checkName": "Jim",
         "totalAmount": 12300,
         "preTaxAmount": 10885,
         "gratuity": 0,
         "remainingAmount": 0
      }
   },
   "session": "c9e5558c-3dfb-4359-adcf-c3c3de0d269d"
}


Did this page help you?