My Profile_


Standard Response Fields

To collect the applicable response details, once you send the transaction by invoking the HttpsPostRequest object's send() method you may instantiate the Receipt object, by invoking the HttpsPostRequest object's getReceipt() method. Use this object to retrieve the applicable response details.

This section outlines all of the possible response fields that may be returned. For response details custom to a particular transaction please refer to that transaction example.

$mpgHttpPost =new mpgHttpsPost($store_id,$api_token,$mpgRequest);

$mpgResponse=$mpgHttpPost->getMpgResponse();


Transaction Response Fields

VALUE LIMITS GET METHOD DESCRIPTION
Order ID / Receipt ID 50 – character alphanumeric $mpgResponse->getReceiptId(); Returns the order_id from the request.
Reference Number 18 – character alphanumeric $mpgResponse->getReferenceNum(); Terminal used to process the transaction as well as the shift, batch and sequence number. This data is typically used to reference transactions on the host systems, and must be displayed on any receipt presented to the customer. This information is to be stored by the merchant. Example: 660123450010690030
  • 66012345: Terminal ID
  • 001: Shift number
  • 069: Batch number
  • 003: Transaction number within the batch.
Response Code 3 – character numeric Or null $mpgResponse->getResponseCode(); Transaction Response Code < 50: Transaction approved >= 50: Transaction declined NULL: Transaction was not sent for authorization For further details on the response codes that are returned please see the Response Codes table
ISO Code 2 – character numeric $mpgResponse->getISO(); ISO response code return from issuing institution. For further details on the response codes that are returned please see the Response Codes table
Authorization Code 8 – character alphanumeric $mpgResponse->getAuthCode(); Authorization code returned from the issuing institution.
Transaction Time ##:##:## $mpgResponse->getTransTime(); Processing host time stamp (24 hour clock).
Transaction Date yyyy-mm-dd $mpgResponse->getTransDate(); Processing host date stamp.
Transaction Type 2 – character numeric $mpgResponse->getTransType();
  • Type of transaction that was performed:
  • 00 = Purchase, Vault Credit Card Purchase
  • 01 = Preauthorization, Vault Credit Card Pre-Authorization
  • 02 = Pre-Authorization Completion
  • 04 = Refund, Independent Refund, Vault Credit Card &
  • 11 = Purchase Correction
Complete true/false $mpgResponse->getComplete(); Transaction was sent to authorization host and a response was received
Message 100 – character alphanumeric $mpgResponse->getMessage(); Response description returned from issuing institution. This message should not be displayed on any cardholder facing materials.  For receipt purposes, please refer to the Receipt Requirements
Transaction Amount 9 - decimal $mpgResponse->getTransAmount(); Returns the transaction amount from the request.
Card Type 2 – character alphanumeric $mpgResponse->getCardType(); Card Type M = MasterCard V = Visa AX = American Express NO = Novus/Discover in (Canada only)P = Debit (Canada only) C1 = JCB (Canada only) SE = Sears (Canada only)
Transaction Number 20 - character alphanumeric $mpgResponse->getTxnNumber(); Gateway Transaction identifier. This field is required for any future follow-on transactions such as Refunds, Corrections, Completions, Reversals, etc.
Timed Out true/false $mpgResponse->getTimedOut(); Indicates if a transaction failed due to a process timing out.
Bank Totals Object receipt.getBankTotals(); Response data returned in a Batch Close and Open Totals request. Refer to Batch Close Response Fields below for further breakdown.
Ticket   $mpgResponse->getTicket(); Reserved field.
Advice Code String

2-character alphanumeric
$mpgResponse->getAdviceCode(); The message returned from the issuer is intended for merchant information only, and is not intended for customer receipts. For further details on the response codes that are returned, see the Advice Code document at Moneris · GitHub .

Note: If you are interested in enabling these MAC codes, please contact us at https://www.moneris.com/en/support

Other Response Fields

VALUE LIMITS GET METHOD DESCRIPTION
Is Visa Debit true/false $mpgResponse->getIsVisaDebit(); (Canada only) Indicates whether the card processed is a Visa Debit.
Corporate Card true/false $mpgResponse->getCorporateCard(); Indicates whether the card or the card on file in the vault is a corporate card.

Batch Close / Open Totals Response Fields

VALUE LIMITS VARIABLE DESCRIPTION
Processed Card Type String Array receipt.GetCreditCards(ecr_no); Returns all of the processed card types in the current batch for the terminal ID/ECR Number from the request.
Terminals IDs 8 – character alphanumeric receipt.GetTerminalIDs(); Returns the terminal ID/ECR Number from the request.
Purchase Count 4 – character numeric receipt.GetPurchaseCount(ecr, cardType); Indicates the # of Purchase,, Pre-Authorization Completion and Force Post transactions processed. If none were processed in the batch, then 0000 will be returned.
Purchase Amount 11 – character alphanumeric receipt.GetPurchaseAmount(ecr, cardType); Indicates the dollar amount processed for Purchase,, Pre-Authorization Completion or Force Post transactions.  This field begins with a + and is followed by 10 numbers, the first 8 indicate the amount and the last 2 indicate the penny value. Example, +0000000000 = 0.00  and +0000041625 = 416.25
Refund Count 4 – character numeric receipt.GetRefundCount(ecr, cardType); Indicates the # of Refund, Independent Refund transactions processed. If none were processed in the batch, then 0000 will be returned.
Refund Amount 11 – character alphanumeric receipt.GetRefundAmount(ecr, cardType); Indicates the dollar amount processed for Refund, Independent Refund transactions.  This field begins with a + and is followed by 10 numbers, the first 8 indicate the amount and the last 2 indicate the penny value. Example, +0000000000 = 0.00  and +0000041625 = 416.25
Correction Count 4 – character numeric receipt.GetCorrectionCount(ecr, cardType); Indicates the # of Purchase Correction transactions processed. If none were processed in the batch, then 0000 will be returned.
Correction Amount 11 – character alphanumeric receipt.GetCorrectionAmount(ecr, cardType); Indicates the dollar amount processed for Purchase Correction transactions.  This field begins with a + and is followed by 10 numbers, the first 8 indicate the amount and the last 2 indicate the penny value. Example, +0000000000 = 0.00  and +0000041625 = 416.25

CVD and AVS Response Fields

Value Limits Get Method Description
CVD result code 2-character alphanumeric $mpgResponse->getCvdResultCode(); Indicates the CVD validation result. The first byte is the numeric CVD indicator sent in the request; the second byte is the response code. Possible response codes are shown in the CVD Result Code table.
AVS result code 1-character alphanumeric $mpgResponse->getAvsResultCode(); Indicates the address verification result. For a full list of possible response codes refer to the AVS Result Code table.

Status Check Response Fields

Value Limits Get Method Description

Status Code

3-character alphanumeric

$mpgResponse->getStatusCode();

The StatusCode is populated when status_check is set to “true” in the request.

<50: Transaction found

>=50: Transaction not found

Status Message

found/not found

$mpgResponse->getStatusMessage();

The StatusMsg is populated when status_check is set to “true” in the request.


3-D Secure Response Fields

Value Limits Get method Description
CAVV result code 1-character alphanumeric $mpgResponse->getCavvResultCode(); Indicates the Verified by Visa CAVV result. Possible response codes are shown in the CAVV Result Code table

Recurring Billing Response Fields

Value Limits Get method Description
Recurring billing success true/false $mpgResponse->getResSuccess(); Indicates whether the recurring billing transaction has been successfully set up for future billing.

Convenience Fee Response Fields

VALUE LIMITS GET METHOD DESCRIPTION
Convenience fee success true/false $mpgResponse->getCfSuccess(); Indicates whether the Convenience Fee transaction processed successfully.
Convenience fee status 2-character alphanumeric $mpgResponse->getCfStatus(); Indicates the status of the merchant and convenience fee transactions. The CfStatus field provides details about the transaction behavior and should be referenced when contacting Moneris Customer Support.
Possible values are:
1 or 1F – Completed 1st purchase transaction
2 or 2F – Completed 2nd purchase transaction
3 – Completed void transaction
4A or 4D – Completed refund transaction
7 or 7F – Completed merchant independent refund transaction
8 or 8F – Completed merchant refund transaction
9 or 9F – Completed 1st void transaction
10 or 10F – Completed 2nd void transaction
11A or 11D – Completed refund transaction
Convenience fee amount 9-character decimal $mpgResponse->getFeeAmount(); The expected Convenience Fee amount. This field will return the amount submitted by the merchant for a successful transaction. For an unsuccessful transaction, it will return the expected convenience fee amount.
Convenience fee rate 9-character decimal $mpgResponse->getFeeRate(); The convenience fee rate that has been defined on the merchant’s profile. For example:
1.00 – a fixed amount or
10.0 - a percentage amount
Convenience fee type AMT/PCT $mpgResponse->getFeeType(); The type of convenience fee that has been defined on the merchant’s profile.
Available options are:
AMT – fixed amount
PCT – percentage

Vault Response Fields

Value Limits Get Method Description
Data Key 25-character alphanumeric $mpgResponse->getDataKey(); This field is created when a profile is created and a token is returned.
It is a unique profile identifier, and is a required value for all future Vault transactions.
Vault Success true/false $mpgResponse->getResSuccess(); Indicates whether Vault transaction was successful.
Payment Type cc $mpgResponse->getPaymentType(); Indicates the payment type associated with a Vault profile.
Customer ID 30-character alphanumeric $mpgResponse->getResDataCustId(); Returns the customer ID saved in the profile.
Phone Number 30-character alphanumeric $mpgResponse->getResDataPhone(); Returns the phone number saved in the profile.
Email Address 30-character alphanumeric $mpgResponse->getResDataEmail(); Returns the email address saved in the profile.
Note 30-character alphanumeric $mpgResponse->getResDataNote(); Returns the note saved in the profile.
Credit Card Fields
Masked PAN 20-character numeric $mpgResponse->getResDataMaskedPan(); Returns the first 4 last 4 of the card number saved in the profile.
PAN 20-character numeric $mpgResponse->getResDataPan(); Returns the full card number saved in the profile.
Expiry Date 4-character numeric $mpgResponse->getResDataExpDate(); Returns the expiry date of the card number saved in the profile. YYMM format.
E-Commerce Indicator 1-character numeric $mpgResponse->getResDataCryptType(); Returns the e-commerce indicator saved in the profile.
AVS Street Number 19-character alphanumeric $mpgResponse->getResDataAvsStreetNumber(); Returns the AVS street number saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.
AVS Street Name 19-character alphanumeric $mpgResponse->getResDataAvsStreetName(); Returns the AVS street name saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.
AVS Zip/Postal Code 9-character alphanumeric $mpgResponse->getResDataAvsZipcode(); Returns the AVS zip/postal code saved in the profile. If no other AVS street number is passed in the transaction request, this value will be submitted along with the financial transaction to the issuer.

MCP Response Fields

Variable Name Type and Limits Get Method Description
cardholder amount

12-character numeric

variable length

$mpgResponse‑>getCardholderAmount(); Amount, in units of foreign currency, the cardholder will pay on the transaction
cardholder currency code 3-character numeric $mpgResponse‑>getCardholderCurrencyCode(); ISO code for the foreign currency the cardholder is using to pay
host ID 15-character alphanumeric $mpgResponse‑>getHostId(); Unique identifier used across the Moneris platform
MCP error message

250-character alphanumeric

variable length

$mpgResponse‑>getMCPErrorMessage(); Message corresponding with an MCP error code
MCP error status code

4-character numeric

variable length

$mpgResponse‑>getMCPErrorStatusCode(); A number representing a MCP error code response
MCP rate 9-character decimal variable length $mpgResponse‑>getMCPRate();

The foreign exchange rate (foreign currency to CAD) that will beused for the transaction


If a MCP rate token was used, it will reflect the rate secured by the MCP Get Rate transaction; if no token was used, the rate is the current exchange rate retrieved by the Moneris Gateway

merchant settlement amount

10-character decimal

Up to 7 digits (dollars) + decimal point (.) + 2 digits (cents) after the decimal point

EXAMPLE: 1234567.89

$mpgResponse‑>getMerchantSettlementAmount(); Amount that will be paid to the merchant, in Canadian dollars
merchant settlement currency 3-character numeric $mpgResponse‑>getMerchantSettlementCurrency(); Currency that the merchant is settling in
Response fields specific to MCP Get Rate
MCP rate token 17-character alphanumeric $mpgResponse‑>getMCPRateToken();

Time-limited token representing a temporarily locked in foreign exchange rate for use in financial transactions

This field is returned in the response to a MCP Get Rate request

rate inquiry end time 24-character alphanumeric $mpgResponse‑>getRateInqEndTime(); The local time (ISO 8601) when the rate is returned
rate inquiry start time 24-character alphanumeric $mpgResponse‑>getRateInqStartTime(); The local time (ISO 8601) when the rate is requested
rate transaction type

max 8-character alphabetic

PURCHASE or REFUND

$mpgResponse‑>getRateTxnType(); Reflects the transaction type being sent in the request
rate validity end time 10-character numeric $mpgResponse‑>getRateValidityEndTime(); The time (unix UTC) of when the rate is valid until
rate validity period 3-character numeric variable length $mpgResponse‑>getRateValidityPeriod(); The time in minutes this rate is valid for
rate validity start time 10-character numeric $mpgResponse‑>getRateValidityStartTime(); The time (unix UTC) of when the rate is valid from