Guides
Log In
Guides

Pre-Authorization

Overview

The pre-authorization command temporarily places a hold on a specific amount on a credit card before the final amount is known. Once the final amount is determined, you can submit a pre-authorization completion request using that amount and the transactionId of the original pre-authorization. To learn how to execute a pre-authorization completion request, visit Pre-Authorization Completion Command.

  1. Pre-Authorization Command

📘

NOTE:

Pre-authorization is not supported on Interac.


Request Structure

ElementTypeDescriptionSizeRequired
apiVersionStringAPI version numberV20Required
istConfigCodeStringMoneris provided integration configuration codeV25Required
dataIdStringMerchant defined unique identifier for the data objectV50Required
dataTimestampStringDate and time of the request (YYYY-MM-DD HH:MM:SS)F19Required
dataObjectObject that contains all transaction requests
requestArrayContains data applicable to transaction request
orderIdStringOrder ID from PurchaseV50Required
idempotencyKeyStringUnique transaction identifier to avoid duplicate requestV50Required
linkIdStringId used to group related transactionsV50Optional
terminalIdStringDestination Terminal IDF8Optional
userNameStringUnique identifier for clerk / userV30Optional
customIdDataStringCustom fieldV50Optional
actionString"preAuthorization"V50Required
totalAmountStringTotal transaction amountV9Required
remainingAmountStringAmount for partial authorization transactions. See remainingAmount for detailsV5Optional
dynamicDescriptorStringMerchant-defined descriptionV20Optional
progressStatusStringIf value is set to "True", terminal will return progress to POS. Note: This feature is only available on Direct Integration.V5Optional
modifierStringEnum which further classifies transactionV24Optional
languageStringValid values "EN" and "FR". If value is not provided, the payment app will use the language from TMSF2Optional
subtotalAmountStringAmount without taxes or feesV9Optional
taxesArrayMaximum of 5 tax objects
taxNameStringName to be displayed on receipt (hst, gst etc)V15Optional
taxAmountStringCorresponding amountV9Conditional

Request example

{
  "apiVersion": "3.0",
  "istConfigCode": "example_istConfigCode",
  "dataId": "example_dataId",
  "dataTimestamp": "1969-12-31 23:59:59",
  "data": {
    "request": [
      {
        "orderId": "example_orderId",
        "idempotencyKey": "example_idempotencyKey",
        "action": "preAuthorization",
        "totalAmount": "example_totalAmount"
      }
    ]
  }
}

Response Structure

ElementTypeDescriptionSizeRequired
apiVersionStringAPI version numberV20Required
statusCodeStringStatus code for the overall transaction requestV4Required
statusStringDescription of the statusCodeV4Required
dataIdStringMerchant defined unique identifier for the data objectV50Required
dataTimestampStringDate and time of the request (YYYY-MM-DD HH:MM:SS)F19Required
dataObjectObject that contains all transaction requests
responseArrayContains data applicable to transaction request
orderIdStringTerminal will either return the orderId from the request or generate a new unique orderId if no orderId was present in the requestV50Required
transactionIdStringUnique identifier for this requestV50Required
idempotencyKeyStringUnique transaction identifier to avoid duplicate requestV50Required
linkIdStringId used to group related transactionsV50Optional
actionString"preAuthorization"V50Required
statusCodeStringStatus code for individual requestV4Required
statusStringDescription of the individual statusCodeV50Required
totalAmountStringEcho of the Total transaction amount from the requestV9Required
approvedAmountStringPayment amount received / approvedV9Conditional
tenderTypeStringPayment Type: Credit, Debit, Gift etcV50Required
cardTypeStringCard Type: V, M, P, AX etcV2Conditional
cardNameStringCard Name: Visa, MasterCard, Interac, Amex etcV25Conditional
sequenceNumStringSequence NumberV18Conditional
realTimeUniqueIdStringReal Time Moneris Transaction Unique IdentifierF15Conditional
responseCodeStringMoneris Host Response CodeV3Conditional
isoStringISO response CodeV2Conditional
authCodeStringAuthorization code returned from the issuing institution.V8Conditional
formFactorStringEMV Specific DataF2Conditional
maskedPanStringMasked Primary Account Number (PAN)V21Conditional
completedString"true" or "false"V5Required
receiptStringFinancial receipt data sent using ISO-8895-1 encodingV4000Conditional
receiptChoiceStringThe choices of how the receipt is being returned to the cardholder at the time of transaction. Valid values include: PRINT (Default Option), EMAIL, SMS, NONE.V10Conditional
terminalIdStringDestination Terminal IDF8Required
dccOptInStringThis field indicates a Dynamic Currency Conversion (DCC) transaction.V5Optional
installmentOptInStringThis field indicates an Installment by Visa transactionV5Optional
receiptExtensionStringDCC transaction data for compact format receiptsV275Conditional

Response example

{
  "apiVersion": "3.0",
  "statusCode": "example_statusCode",
  "status": "example_status",
  "dataId": "example_dataId",
  "dataTimestamp": "1969-12-31 23:59:59",
  "data": {
    "response": [
      {
        "orderId": "example_orderId",
        "transactionId": "example_transactionId",
        "statusCode": "example_statusCode",
        "status": "example_status",
        "idempotencyKey": "example_idempotencyKey",
        "completed": "true",
        "responseCode": "example_responseCode",
        "iso": "example_iso",
        "approvedAmount": "example_approvedAmount",
        "totalAmount": "example_totalAmount",
        "tenderType": "example_tenderType",
        "cardType": "example_cardType",
        "sequenceNum": "example_sequenceNum",
        "realTimeUniqueId": "example_realTimeUniqueId",
        "authCode": "example_authCode",
        "formFactor": "example_formFactor",
        "maskedPan": "example_maskedPan",
        "action": "preAuthorization",
        "receipt": "example_receipt",
        "receiptChoice": "PRINT",
        "terminalId": "example_terminalId"
      }
    ]
  }
}

Errors

If your response contains errors, visit the Errors page for a detailed description of each one.