Guides
Log In
Guides

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
terminalIdStringTerminal ID request originated fromV8Required
merchantIdStringMerchant ID of requestorV13Required
apiVersionStringAPI version numberV20Required
requestIdStringA unique identifier for this requestV50Required
requestTimestampStringDate and time of the requestF19Required
actionStringTransaction type – “applyPayment”V24Conditional
dataObjectData applicable to this transaction type
serverObject
serverIdStringServer ID entered on the terminalV50Optional
trackDataObject
Track1StringTrack 1 from server card swipedV50Optional
Track2StringTrack 2 from server card swipedV50Optional
Track3StringTrack 3 from server card swipedV50Optional
checkObject
tableIdObjectTable ID for internal use by systemV50Required
checkIdStringCheck ID for internal use by systemV50Required
paymentStringCheck ID for internal use by systemV50Required
tenderTypeObject
cardStringPayment Type: Card, Cash etcV50Required
cardTypeObject
authNumberStringAuthorization number of paymentV50Required
referenceNumberNumberReference number of paymentV50Required
lastDigitsNumberLast four digits of the PANV4Required
paidAmountNumberPayment amount received / approvedV9Required
tipAmountNumberTip amount entered by userV9Optional
errorObjectPresent if the terminal detects an error in the previous response. Applicable to all actions.
statusStringStatus codeF3Conditional
statusDescStringDescription for status codeV50Conditional
sessionStringSession ID from Moneris cloudV50Conditional


{
   "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
terminalIdStringTerminal ID request originated fromV8Required
merchantIdStringMerchant ID of requestorV13Required
configCodeStringIntegration configuration code provided by MonerisV25Required
requestIdStringA unique identifier for this requestV50Required
requestTimestampStringDate and time of the requestF19Required
statusStringRMS status codeF3Required
statusDescStringRMS status code descriptionV50Required
dataObjectData applicable to this transaction type
tableObject
tableIdStringPrimary key, used in subsequent requests to address particular tableV50Required
tableTotalAmountNumberThe total amount for the table.V9Required
tableRemainingAmountNumberAmount due for the table. Reduced by the approved amount each time a payment is approved.V9Required
checkObject
checkIdStringCheck ID for internal use by system.V50Required
checkNameStringCheck name for display in terminal user interfaceV50Optional
totalAmountNumberTotal transaction amountV9Required
preTaxAmountNumberTransaction Amount Before TaxesV9Optional
gratuityNumberService 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.V9Optional
remainingAmountNumberThe amount due after a partial approval (total amount + tip - amount(s) partially approved)V9Required
sessionStringSession ID from Moneris cloudV50Conditional


{
   "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"
}