My Profile_


Moneris Checkout Overview

Moneris Checkout gives e-commerce merchants a simple and secure way to process payments by integrating a Moneris-hosted payment module into the merchant checkout page.

System and Skills Requirements

In order to integrate with Moneris Checkout as a merchant, you must have:

  • An e-commerce website with a back-end server

For development, you should have some understanding of the following:

  • JavaScript
  • JSON
  • Server-side programming

Additionally, for Google Pay™ integration, all your front-end web pages must use the HTTPS protocol.

Configuration

The first step is to configure your Moneris Checkout page in the Moneris Merchant Resource Center (MRC).

In the initial stage of development, you create a test configuration in the testing MRC. Once the solution is ready to be deployed to production, you must create a new, separate configuration for the production environment in the production MRC.

The checkout ID is the key value that is generated after the configuration is completed and used within the Preload Request in order to identify the specific Moneris Checkout configuration.

To get the checkout ID and start configuring your page, do the following:

  1. Log into the Merchant Resource Center at one of the following URLs (according to your stage of development)

    Testing:
    https://esqa.moneris.com/mpg

    Production:
    https://www3.moneris.com/mpg

  2. In the Admin menu, select Moneris Checkout Config
  3. Click the Create Profile button
  4. Follow the on-screen steps to complete the configuration

For more information, see the Merchant Resource Center documentation

Additional Features in Moneris Checkout

Tokenization of Credentials with Moneris Checkout

You can configure Moneris Checkout to store a cardholder's credentials in the Moneris Vault and receive a token that represents those credentials for use in future transactions.

If you want to tokenize credentials in Moneris Checkout transactions, you select the Tokenize Card option in the Merchant Resource Center

Fraud Tools in Moneris Checkout

About Fraud Tools in Moneris Checkout

Several tools to mitigate the risk of fraud are available for transactions in Moneris Checkout, including:

  • AVS
  • CVD
  • 3-D Secure
  • Kount

To select which of these tools to use when performing transactions with Moneris Checkout, go to your Moneris Checkout configurator in the Moneris Merchant Resource Center under the Payment Security section.

NOTE: CVD is always enabled as a fraud tool and will be performed on each transaction request in Moneris Checkout, but you can choose whether Moneris will treat the CVD result as a mandatory or optional factor to approve or deny the transaction.

Kount as a Fraud Tool in Moneris Checkout

If you select Kount as a fraud tool in Moneris Checkout and your company has its own Enterprise service account from Kount, you will need to include your Kount Merchant ID, Kount API Key and Kount Website ID when you configure your Moneris Checkout store in the Merchant Resource Center.

If you are using Moneris' basic fraud service package and do not have your own Kount enterprise account, you do not require this information.

Fraud Tools and Auto Decision-Making

Moneris Checkout can be configured to automatically proceed with or deny transactions as a result of a risk assessment it makes based on the responses it receives from the selected fraud tools.

When you check the box for auto decision-making, you also can choose whether each fraud tool's analysis will be treated by Moneris as an optional or mandatory factor in the decision to approve or deny the transaction.

This information applies to all fraud tools with the following exception:

  • 3-D Secure, which is always mandatory if enabled

Window Size in Moneris Checkout

You can customize the appearance of the Moneris Checkout window presented to the customer on their web browser, including how much of the browser window will be taken up by Moneris Checkout.

The default sizing behaviour of the Moneris Checkout window is full-screen, i.e., Moneris Checkout fills the entire web page. You can alter this behaviour to present the customer with a windowed view instead.

If you do not use the full-screen option, you must define the size of the <div> for the windowed view.
For more information, see the Client-Side Checkout Page section.

You configure the sizing along with other aspects of the Moneris Checkout window in the Merchant Resource Center.

Transaction Process Overview

Client-Side Checkout Page

In order to prepare your client-side checkout page for interacting with Moneris Checkout, you need to do a few tasks first:

  1. Add a call to the Moneris Checkout JavaScript library in a <script> tag:

    Test

    <script src="https://gatewayt.moneris.com/chkt/js/chkt_v1.00.js">

    Production

    <script src="https://gateway.moneris.com/chkt/js/chkt_v1.00.js">

  2. Create a <div> in the HTML:

    <div id="monerisCheckout"></div>

    (Optional): If you are not using the "Full screen" window sizing option, you will need to define the size of your window by creating another <div> around this one, for example:
    <div id="outerDiv" style="width:400px"; height"300px">
    <div id="monerisCheckout"></div>
    </div>

  3. Instantiate the monerisCheckout object and set it up:

    var myCheckout = new monerisCheckout();
    myCheckout.setMode("qa");
    myCheckout.setCheckoutDiv("monerisCheckout");


  4. Set callbacks in JavaScript:

    myCheckout.setCallback("page_loaded", myPageLoad);
    myCheckout.setCallback("cancel_transaction", myCancelTransaction);
    myCheckout.setCallback("error_event", myErrorEvent);
    myCheckout.setCallback("payment_receipt", myPaymentReceipt);
    myCheckout.setCallback("payment_complete", myPaymentComplete);

For more information about callbacks in Moneris Checkout, see Handling Callbacks.

Preload Request

The Preload request is the means by which a Moneris Checkout instance is securely generated at transaction time. It involves a server-to-server post using the JSON format.

The response to the Preload request returns a ticket number which uniquely identifies the instance and must be passed in the JavaScript monerisCheckout.startCheckout(ticket #) request in order to display the Moneris Checkout page in the browser.

In your server implementation, use the following Moneris Checkout URLs to post to, depending on the development stage:

Testing:
https://gatewayt.moneris.com/chkt/request/request.php

Production:
https://gateway.moneris.com/chkt/request/request.php

JSON structure overview for Preload request

preload request high level

EXAMPLE PRELOAD REQUEST JSON
{
   "store_id":"moneris",
   "api_token":"hurgle",
   "checkout_id":"chkt5BF66neris",
   "txn_total":"452.00",
   "environment":"qa",
   "action":"preload",
   "order_no":"",
   "cust_id":"chkt - cust - 0303",
   "dynamic_descriptor":"dyndesc",
   "language":"en",
   "recur":{
      "bill_now":"true",
      "recur_amount":"1.00",
      "start_date":"2020-1-1",
      "recur_unit":"month",
      "recur_period":"1",
      "number_of_recurs":"10"
   },
   "cart":{
      "items":[
         {
            "url":"https:\/\/example.com\/examples\/item1.jpg",
            "description":"One item",
            "product_code":"one_item",
            "unit_cost":"100.00",
            "quantity":"1"
         },
         {
            "url":"https:\/\/example.com\/examples\/item2.jpg",
            "description":"Two item",
            "product_code":"two_item",
            "unit_cost":"200.00",
            "quantity":"1"
         },
         {
            "url":"https:\/\/example.com\/examples\/item3.jpg",
            "description":"Three item",
            "product_code":"three_item",
            "unit_cost":"100.00",
            "quantity":"1"
         }
      ],
      "subtotal":"400.00",
      "tax":{
         "amount":"52.00",
         "description":"Taxes",
         "rate":"13.00"
      }
   },
   "contact_details":{
      "first_name":"bill",
      "last_name":"smith",
      "email":"test@moneris.com",
      "phone":"4165551234"
   },
   "shipping_details":{
      "address_1":"1 main st",
      "address_2":"Unit 2012",
      "city":"Toronto",
      "province":"ON",
      "country":"CA",
      "postal_code":"M1M1M1"
   },
   "billing_details":{
      "address_1":"1 main st",
      "address_2":"Unit 2000",
      "city":"Toronto",
      "province":"ON",
      "country":"CA",
      "postal_code":"M1M1M1"
   }
}

Request fields for Preload request – Required

Variable Name Type and Limits Description
store ID

store_id
String

10-character alphanumeric
Unique identifier provided by Moneris upon merchant account set up
API token

api_token
String

20-character alphanumeric
Unique alphanumeric string assigned upon merchant account activation
checkout ID

checkout_id
String

30-character alphanumeric
Identifies your Moneris Checkout configuration; this is given to you when you configure your page in the Merchant Resource Center
transaction amount

txn_total
String

10-character decimal

Up to 7 digits (dollars) + decimal point (.) + 2 digits (cents) after the decimal point
The total dollar amount of the transaction
developmental mode

environment
String

alphabetic

qa or prod
Indicates the stage of development you are sending the request for:

testing = qa

production = prod
request type

action
String

alphabetic

preload or receipt
Type of request being made to Moneris Checkout server; is either preload or receipt request

Optional Preload Request Variables

Variable Name Type and Limits Description
order number

order_no
String

50-character alphanumeric

Note: some special characters are not allowed
< > $ % = ? ^ { } [ ] \
The order number is a unique identifier appended to every financial transaction
customer ID

cust_id
String

50-character alphanumeric

Note: some special characters are not allowed
< > $ % = ? ^ { } [ ] \
Merchant-defined field that can be used as an identifier
dynamic descriptor

dynamic_descriptor
String

20-character alphanumeric

Note: some special characters are not allowed
< > $ % = ? ^ { } [ ] \

total of 22 characters including
your merchant name
and separator
Merchant-defined description sent on a per-transaction basis that will appear on the credit card statement appended to the merchant’s business name.

Dependent on the card issuer, the statement will typically show the dynamic descriptor appended to the merchant's existing business name separated by the "/" character; additional characters will be truncated.

Note: The 22-character maximum limit must take the "/" into account as one of the characters
language

language
String

2-character alphabetic
Determines which language Moneris Checkout will display information in

Allowable values:

en – English

fr – French

Optional Objects for Preload Requests in Moneris Checkout

Moneris Checkout also allows you to send optional objects in the Preload request that reflect additional information entered by the customer at checkout, enable additional features, or meet transaction processing requirements.

If you have configured Moneris Checkout to handle these additional items, you do not send the corresponding object in the Preload request. Only send these optional objects if you are using your own ecommerce page to collect them separately from Moneris Checkout.

Variable Name Type and Limits Description
Recurring Billing

recur
Object

N/A
Contains fields related to Recurring Billing
Shopping Cart

cart
Object

N/A
The virtual shopping cart and its contents
Contact Details

contact_details
Object

N/A
Customer contact information
Shipping Details

shipping_details
Object

N/A
Customer shipping information
Billing Details

billing_details
Object

N/A
Customer billing information

Preload Request with Recurring Billing

Optional object

Include this object in Preload request to indicate the start of a series of Recurring Billing transactions that will be managed by Moneris.

Top level object field

recur

Variable Name Type and Limits Description
number of recurs

number_of_recurs
String

numeric

1-999
The number of times that the transaction must recur
period

recur_period
String

numeric

1-999
Number of recur unit intervals that must pass between recurring billings
recurring amount

recur_amount
String

10-character decimal, minimum three digits

Up to 7 digits (dollars) + decimal point (.) + 2 digits (cents) after the decimal point
Dollar amount of the recurring transaction

This amount will be billed on the start date, and then billed repeatedly based on the interval defined by period and recur unit
recur unit

recur_unit
String

day, week, month or eom
Unit to be used as a basis for the interval

Works in conjunction with the period variable to define the billing frequency
start date

start_date
String

YYMMDD format
Date of the first future recurring billing transaction; this must be a date in the future

If an additional charge will be made immediately, the start now variable must be set to true
bill now

bill_now
String

true or false
Set to true if a charge will be made against the card immediately; otherwise set to false

Preload Request with Shopping Cart

Optional object

The shopping cart object can contain multiple items (each item is represented as its own array within the Shopping Cart object).

Top level field

cart

Required Variables for Shopping Cart

Variable Name Type and Limits Description
shopping cart items

items
Object

sub-object containing arrays, nested within cart

contains following items in blue
Encapsulates the entire array of items in the shopping cart
URL

items.url
String

alphanumeric
URL that corresponds to the image Moneris Checkout shopping cart item
description

items.description
String

50-character alphanumeric

Note: some special characters are not allowed
< > $ % = ? ^ { } [ ] \
Describes the item in the shopping cart
product code

items.product_code
String

50-character alphanumeric

Note: some special characters are not allowed
< > $ % = ? ^ { } [ ] \
The SKU for the item
unit cost

items.unit_cost
String

10-character decimal

Up to 7 digits (dollars) + decimal point (.) + 2 digits (cents) after the decimal point
EXAMPLE: 1234567.89
Per-unit cost of the item
quantity

items.quantity
String

numeric

6 characters maximum
Number of individual instances of the given item in the shopping cart
subtotal

subtotal
String

10-character decimal

Up to 7 digits (dollars) + decimal point (.) + 2 digits (cents) after the decimal point
EXAMPLE: 1234567.89
Total dollar amount of the shopping cart before taxes
tax

tax
Object

sub-object nested within cart

contains following items in blue
Contains items related to taxes
tax amount

tax.amount
String

10-character decimal

Up to 7 digits (dollars) + decimal point (.) + 2 digits (cents) after the decimal point
EXAMPLE: 1234567.89
Dollar amount of taxes
tax description

tax.description
String

50-character alphanumeric

Note: some special characters are not allowed
< > $ % = ? ^ { } [ ] \
Describes type of tax being applied
tax rate

tax.rate
String

Must be a numer wth up to 3 decimal places
EXAMPLE: xx or xx.x or xx.xx or xx.xxx
Percentage tax rate charged

Preload Request with Contact Details

Optional object

Top Level Field

contact_details

Required Variables for Contact Details Object

Variable Name Type and Limits Description
first name

first_name
String
30-character alphanumeric
Customer first name
last name

last_name
String
30-character alphanumeric
Customer last name
e-mail

email
String
255-character alphanumeric
Customer email
phone number

phone
String
30-character alphanumeric
Customer phone number

Preload Request with Shipping Details

Optional object

Top Level Field

shipping_details

Required Variables for Shipping Details Object

Variable Name Type and Limits Description
shipping address line 1

address_1
String

50-character alphanumeric

Note: some special characters are not allowed
< > $ % = ? ^ { } [ ] \
Customer shipping address
shipping address line 2

address_2
String

50-character alphanumeric

Note: some special characters are not allowed
< > $ % = ? ^ { } [ ] \
Customer shipping address
shipping city

city
String

50-character alphanumeric

Note: some special characters are not allowed
< > $ % = ? ^ { } [ ] \
Customer shipping address city
shipping province

province
String

3-character alphanumeric
Customer shipping address province
Country subdivision ISO 3166-2
shipping country

country
String

3-character alphanumeric
Customer shipping address country
ISO 3166-1 alpha-2
shipping postal code

postal code
String

20-character alphanumeric

Note: some special characters are not allowed
< > $ % = ? ^ { } [ ] \
Customer shipping address postal code

Preload Request with Billing Details

Optional object

Top Level Field

billing_details

Required Variables for Billing Details Object

Variable Name Type and Limits Description
billing address line 1

address_1
String

50-character alphanumeric

Note: some special characters are not allowed
< > $ % = ? ^ { } [ ] \
Customer billing address
billing address line 2

address_2
String

50-character alphanumeric

Note: some special characters are not allowed
< > $ % = ? ^ { } [ ] \
Customer billing address
billing city

city
String

50-character alphanumeric

Note: some special characters are not allowed
< > $ % = ? ^ { } [ ] \
Customer billing address city
billing province

province
String

3-character alphanumeric
Customer shipping address province
Country subdivision ISO 3166-2
billing country

country
String

3-character alphanumeric
Customer shipping address country
ISO 3166-1 alpha-2
billing postal code

postal code
String

20-character alphanumeric

Note: some special characters are not allowed
< > $ % = ? ^ { } [ ] \
Customer billing address postal code

Response to Preload Request

Example Preload Response

//Successful Preload
{
    "response":{
       "success":"”true”",
       "ticket":"1585G9G9GIKKGGGIGIOG09G9OGKGJFKFJFNjuit8g9"
    }
}

//Failed Preload
{
    "response":{
       "success":"”false”",
       "error":{
          "billing_details":{
             "data":"”billing address must be set when AVS is enabled”"
          }
       }
    }
}

Response Fields – Response to Preload Request

Variable Name Description
response

"response":{
Top level response object
 success

"success":
Denotes whether the Preload request was successful
 ticket

"ticket":
Identifies the specific Moneris Checkout instance

Only returned if success = true
 error

"error":{
Sub-object that encapsulates all errors that occurred as a result of the Preload request

Only returned if success = false
  data

  "data":
Describes the specific type of error that occurred as a result of some aspect of the Preload request

Displaying in the Browser

When a customer goes to check out their items for purchase, the Moneris Checkout page is displayed in the <div> tag you created on your web site

To insert the Moneris Checkout instance into the <div>, you call the JavaScript function:

monerisCheckout.startCheckout([ticket #])


Handling Callbacks

Callbacks are the means by which Moneris Checkout communicates with your merchant checkout page. All callbacks include a single parameter defined as a JSON-formatted string.

In order to handle callbacks, you need to create JavaScript functions that receive the callbacks being sent by Moneris Checkout when the events occur. These functions are linked to the callbacks you set earlier when you prepared your site's checkout page, as described in the Client-Side Checkout Page section.

Callback Types

These callbacks are required to be included in the JavaScript of your page:

Callback Response Fields

Variable Name Type and Limits Description
handler
handler
String
Alphanumeric
Describes the type of callback being used
Possible values:
cancel_transaction
error_event
page_loaded
payment_complete
payment_receipt
ticket
ticket
String
Alphanumeric
Identifies the specific Moneris Checkout instance
This is also returned in the response to the original Preload
response code
response_code
String
Alphanumeric
Identifies the result of the callback. Possible response codes are shown in the Callback Response Codes table.

Page Loaded

Callback Use

To get the page loaded status of the Moneris Checkout page.

This callback is called once the Moneris Checkout is loaded.

JavaScript Set Method for Callback

myCheckout.setCallback("page_loaded",myPageLoad);

JSON Response Message Format


{
    "handler":"page_loaded",
    "ticket":"1539961059DdrvGG3Yj7rxvMAgvRlc4nqKXF7YjT",
    "response_code":"001"
}
            


Cancel Transaction

Callback Use

This callback is called in the event the cardholder presses the cancel button in Moneris Checkout.

Standard is to call the closeCheckout() method to close the Moneris Checkout <div>.

The closeCheckout() method will need to be called and a new Preload request will be required in order to initiate a new Moneris Checkout instance.

JavaScript Set Method for Callback

myCheckout.setCallback("cancel_transaction",myCancelTransaction);

JSON Response Message Format


{
    "handler":"cancel_transaction",
    "ticket":"1539961059DdrvGG3Yj7rxvMAgvRlc4nqKXF7YjT",
    "response_code":"001"
}
            


Error Event

Callback Use

When an error occurs during the checkout process. This requires the Moneris Checkout session to be closed using the closeCheckout() function

To attempt the transaction again, a new Preload request must be sent to the Moneris Checkout server in order to get a new transaction ticket number.

JavaScript Set Method for Callback

myCheckout.setCallback("error_event",myErrorEvent);

JSON Response Message Format


{
    "handler":"error_event",
    "ticket":"1539961059DdrvGG3Yj7rxvMAgvRlc4nqKXF7YjT",
    "response_code":"902"
}
            


Payment Receipt

Callback Use

Transaction is complete and receipt is ready to be collected.

If you have chosen to have Moneris Checkout generate the receipt, this callback is called once the Moneris Checkout displays the transaction receipt.

Please note that if you have chosen Moneris Checkout not to generate a receipt, this callback will not be called. Please refer Payment Complete callback to know when to obtain the receipt response for the transaction.

JavaScript Set Method for Callback

myCheckout.setCallback("payment_receipt",myPaymentReceipt);

JSON Response Message Format


{
    "handler": "payment_receipt",
    "ticket": "1539961059DdrvGG3Yj7rxvMAgvRlc4nqKXF7YjT",
    "response_code": "001"
}
            


Payment Complete

Callback Use

This callback is called once Moneris Checkout has completed payment.

If you have chosen Moneris Checkout to generate a receipt, the cardholder has to return to your Checkout page in order for the callback to be called. Please refer to Payment Receipt callback to know when to obtain the receipt response for the transaction.

Moneris Checkout should be closed by calling the closeCheckout() method

JavaScript Set Method for Callback

myCheckout.setCallback("payment_complete",myPaymentComplete);

JSON Response Message Format


{  
    "handler":"payment_complete",
    "ticket":"1539961059DdrvGG3Yj7rxvMAgvRlc4nqKXF7YjT",
    "response_code":"001"
}
            


Callback Response Codes

Response Code Reason
001 Success
902 3-D Secure failed on response
2001 Invalid ticket/ticket re-use

Receipt Request

Once the Payment Complete callback has been called, your merchant website can make the server-to-server Receipt Request call in order to obtain the details of the transaction for the receipt and to determine whether the transaction was approved or declined.

In your server implementation, use the following Moneris Checkout URLs to post to, depending on the development stage:

Testing:
https://gatewayt.moneris.com/chkt/request/request.php

Production:
https://gateway.moneris.com/chkt/request/request.php

EXAMPLE RECEIPT REQUEST JSON

{
    "store_id":"example_storeId",
    "api_token":"example_apiToken",
    "checkout_id":"example_checkoutId",
    "ticket":"1539966660vfTyEASfnwNrsQqFE8VkMAOcN169zt",
    "environment":"qa",
    "action":"receipt"
}

Request fields for Receipt Request – Required

Variable Name Type and Limits Description
store ID

store_id
String

N/A
Unique identifier provided by Moneris upon merchant account set up
API token

api_token
String

N/A
Unique alphanumeric string assigned upon merchant account activation
checkout ID

checkout_id
String

30-character alphanumeric (maximum)
Identifies your Moneris Checkout configuration; this is given to you when you configure your page in the Merchant Resource Center
ticket number

ticket
String

maximum 50-character alphanumeric
The unique ticket number that identifies a particular transaction; this returned in the response to the Preload request
developmental mode

environment
String

alphabetic
Indicates the stage of development you are sending the request for:

testing = qa

production = prod
request type

action
String

alphabetic
Type of request being made to Moneris Checkout server

Allowable values:

preload or receipt

Response to Receipt Request

Responses to Receipt Requests can contain multiple, nested response objects.

JSON structure overview for Preload request

receipt response high level

Example Response to Receipt Request JSON

{
   "response":{
      "success":"true",
      "request":{
         "txn_total":"452.00",
         "cart":{
            "items":[
               {
                  "url":"https:\/\/example.com\/examples\/item1.jpg",
                  "description":"One item",
                  "product_code":"one_item",
                  "unit_cost":"100.00",
                  "quantity":"1"
               },
               {
                  "url":"https:\/\/example.com\/examples\/item2.jpg",
                  "description":"Two item",
                  "product_code":"two_item",
                  "unit_cost":"200.00",
                  "quantity":"1"
               },
               {
                  "url":"https:\/\/example.com\/examples\/item3.jpg",
                  "description":"Three item",
                  "product_code":"three_item",
                  "unit_cost":"100.00",
                  "quantity":"1"
               }
            ],
            "subtotal":"400.00",
            "tax":{
               "amount":"52.00",
               "description":"Taxes",
               "rate":"13.00"
            }
         },
         "cust_info":{
            "first_name":"bill",
            "last_name":"smith",
            "phone":"4165551234",
            "email":"test@moneris.com"
         },
         "shipping":{
            "address_1":"1 main st ",
            "address_2":"Unit 2000",
            "city":"Toronto",
            "country":"Canada",
            "province":"Ontario",
            "postal_code":"M1M1M1"
         },
         "billing":{
            "address_1":"1 main st ",
            "address_2":"Unit 2000",
            "city":"Toronto",
            "country":"Canada",
            "province":"Ontario",
            "postal_code":"M1M1M1"
         },
         "cc_total":"252.00",
	 "gift":[
	    {
		"balance_remaining":"0.00",
		"Description":"Gift Fixed Reload",
		"first4last4":"************0214",
		"pan":"0211020000001000214",
		"cvd":"123",
		"balance_used":"200.00"
	    }
	 ],
         "cc":{
            "first6last4":"4761735637",
            "expiry":"0121",
            "cardholder":"bill smith"
         },
         "ticket":"1575568715l0pAi0PJRFZaOISm4DHQvigFswDnET ",
         "cust_id":" chkt - cust - 0303",
         "dynamic_descriptor":"dyndesc",
         "order_no":null,
         "eci":"7"
      },
      "receipt":{
         "result":"a",
         "gift":[
            {
               "order_no":"1583250405Ad1BmCSsfHHDeu4_g1",
               "transaction_no":"6198-1583250435590-00157838_15",
               "reference_no":"3276071",
               "response_code":"000",
               "benefit_amount":"200.00",
               "benefit_remaining":"0.00",
               "first6last4":"0211020214"
            }
         ],
         "cc":{
            "order_no":"1572443908zc9cIHRI6aJTwZU",
            "cust_id":null,
            "transaction_no":"5246-0_14",
            "reference_no":"660187030012750100",
            "transaction_code":"00",
            "transaction_type":"200",
            "transaction_date_time":"2019-10-30 09:59:14",
            "corporateCard":"false",
            "amount":"252.00",
            "response_code":"027",
            "iso_response_code":"01",
            "approval_code":"851268",
            "card_type":"V",
            "dynamic_descriptor":"dyndesc",
            "invoice_number":null,
            "customer_code":null,
            "eci":"7",
            "cvd_result_code":"1M",
            "avs_result_code":"M",
            "first6last4":"4761735637",
            "expiry_date":"0121",
            "recur_success":null,
            "issuer_id":"570106735143835",
            "ecr_no":"66018703",
            "batch_no":"275",
            "sequence_no":"010",
            "result":"a",
            "tokenize":{
               "success":"true",
               "firstlast4":"4761***5637",
               "datakey":"lRNJbQUpcsw4qRkd3LpZ5Lpi7",
               "status":"001",
               "message":"Successfully registered CC details."
            },
            "fraud":{
               "cvd":{
                  "decision_origin":"Merchant",
                  "result":"1",
                  "condition":"1",
                  "status":"success",
                  "code":"1M",
                  "details":""
               },
               "avs":{
                  "decision_origin":"Merchant",
                  "result":"1",
                  "condition":"1",
                  "status":"success",
                  "code":"M",
                  "details":""
               },
               "3d_secure":{
                  "decision_origin":"Moneris",
                  "result":"1",
                  "condition":"1",
                  "status":"success",
                  "code":"5",
                  "details":{
                     "VERes":"Y",
                     "PARes":"true",
                     "message":"Successful Payer Authentication",
                     "cavv":"AAACADlzFBchc3F5NHMUEwAAAAA=",
                     "loadvbv":true
                  }
               },
               "kount":{
                  "decision_origin":"Merchant",
                  "result":"2",
                  "condition":"0",
                  "status":"failed_optional",
                  "code":"001",
                  "details":{
                     "responseCode":"001",
                     "message":"Success",
                     "receiptID":"1567780065NjErgHzsUubOkoIA31gaSUtLkxKseT",
                     "result":"D",
                     "error":[
                        "DECLINE when Device Country is not the same as the BIN Country for VISA and MC & Data Collector is present",
                        "DECLINE when the BIN country is not the same as the Billing Country for VISA and MC"
                     ]
                  }
               }
            }
         }
      }
   }
}

Definition of Response Fields – Response to Receipt Request

The following are fields that may be returned in the Response to Receipt Request, shown with nesting

Response Field Name and Key Description
response

{"response":{
Top level response object
 success

"success":
Denotes whether request was successful (i.e., approved, declined)

Unsuccessful means error or could not process

Possible values: true or false
 request

"request":{
Contains information relating to the Preload request and other information that Moneris Checkout sends to the Moneris Gateway when processing the financial transaction
  transaction total amount

  "txn_total":
The total dollar amount of the transaction
  credit card total

  "cc_total":
Total amount being charged to the credit card
  ticket number

  "ticket":
The unique ticket number that identifies a particular transaction; this returned in the response to the Preload request
  customer ID

  "cust_id":
Merchant-defined field that can be used as an identifier

Searchable from the Moneris Merchant Resource Center
  dynamic descriptor

  "dynamic descriptor":
Merchant-defined description sent on a per-transaction basis that will appear on the credit card statement appended to the merchant’s business name

Dependent on the card issuer, the statement will typically show the dynamic descriptor appended to the merchant's existing business name separated by the "/" character; additional characters will be truncated

NOTE: The 22-character maximum limit must take the "/" into account as one of the characters
  order number

  "order_no":
The order number is a unique identifier appended to every financial transaction
  electronic commerce indicator

  "eci":
The e-commerce indicator or crypt type that was used to process the transaction

Possible values are:

5 - Authenticated e-commerce transaction (3-D Secure)

6 - Non-authenticated e-commerce transaction (3-D Secure)

7 - SSL-enabled merchant
  Customer Information

  "cust_info":{
Customer contact information

The information presented in this response object will reflect one of three scenarios:

If sent in the Preload request, this object will echo the Contact Details object

If Moneris Checkout is set to handle the customer contact information, it will reflect what the customer entered in the web form

If Moneris Checkout was set to not ask for this information, the response object will be empty
   first name

   "first_name":
Customer first name
   last name

   "last_name":
Customer last name
   phone number

   "phone":
Customer phone number
   email

   "email":
Customer email
  Shipping

  "shipping":{
Contains customer shipping information

The information presented in this response object will reflect one of three scenarios:

If sent in the Preload request, this object will echo the Shipping Details object
If Moneris Checkout is set to handle the customer shipping information, it will reflect what the customer entered in the web form
If Moneris Checkout was set to not ask for this information, the response object will be empty
   shipping address line 1

   "address_1":
Customer shipping address
   shipping address line 2

   "address_2":
Customer shipping address
   shipping city

   "city":
Customer shipping address city
   shipping country

   "country":
Customer shipping address country
   shipping province

   "province":
Customer shipping address province
   shipping postal code

   "postal_code":
Customer shipping address postal code
  Billing

  "billing":{
Contains customer billing information The information presented in this response object will reflect one of three scenarios: If sent in the Preload request, this object will echo the Billing Details object If Moneris Checkout is set to handle the customer billing information, it will reflect what the customer entered in the web form If Moneris Checkout was set to not ask for this information, the response object will be empty
   billing address line 1

   "address_1":
Customer billing address
   billing address line 2

   "address_2":
Customer billing address
   billing city

   "city":
Customer billing address city
   billing country

   "country":
Customer billing address country
   billing province

   "province":
Customer billing address province
   billing postal code

   "postal_code":
Customer billing address postal code
   same as shipping

   "same_as_shipping":
Indicates whether the shipping address is the same as the billing address

Possible values: true or false
  Recurring Billing

  "recur":{
Contains fields related to Recurring Billing
   number of recurs

   "number_of_recurs":
The number of times that the transaction must recur
   period

   "recur_period":
Number of recur unit intervals that must pass between recurring billings
   recurring amount

   "recur_amount":
Dollar amount of the recurring transaction

This amount will be billed on the start date, and then billed repeatedly based on the interval defined by period and recur unit
   recur unit

   "recur_unit":
Unit to be used as a basis for the interval

Works in conjunction with the period variable to define the billing frequency
   start date

   "start_date":
Date of the first future recurring billing transaction; this must be a date in the future

If an additional charge will be made immediately, the start now variable must be set to true
   bill now

   "bill_now":
Set to true if a charge will be made against the card immediately; otherwise set to false
  Shopping Cart

  "cart":{
The virtual shopping cart and its contents

This echos the information contained in the Shopping Cart request object
   shopping cart items

   "items":[{
Encapsulates the entire array of items in the shopping cart
    item URL

    "url":
URL that corresponds to the image of the Moneris Checkout shopping cart item
    item description

    "description":
Describes the item in the shopping cart
    item product code

    "product_code":
The SKU for the item
    item unit cost

    "unit_cost":
Per-unit cost of the item
    item quantity

    "quantity":
Number of individual instances of the given item in the shopping cart
   subtotal

   "subtotal":
Total dollar amount of the shopping cart, before taxes
   tax

   "tax":{
Contains information related to taxes charged on the items in the shopping cart
    tax amount

    "amount":
Dollar amount of taxes
    tax description

    "description":
Describes type of tax being applied
    tax rate

    "rate":
Percentage tax rate charged
  Credit Card (request)

  "cc":{
Contains cardholder information
   first 6 last 4

   "first6last4":
First 6 and last 4 digits of card number
   expiry date

   "expiry":
Card expiry date
   cardholder

   "cardholder":
Cardholder name
  Gift (request)

  "gift":[{
Object containing information about a gift card
   balance remaining

   "balance_remaining":
The remaining balance on the gift card
   gift card description

   "description":
Description of the gift card used for the transaction
   first 4 last 4

   "first4last4":
The first 4 and last 4 digits of the card
   gift card number

   "pan":
The account number of the gift card
   gift card CVD

   "cvd":
Card validation digits on the gift card
   balance used

   "balance_used":
The amount that was removed from the card's balance as part of the transaction
  Wallet

  "wallet":
Contains information from the digital wallet that was used in the transaction
   wallet type

   "type":
Type of digital wallet used in this transaction
   payment data

   "paymentData":{
Object containing various information related to the payment sent from the digital wallet
    API version (minor)

    "apiVersionMinor":
Minor version of the API
    API version

    "apiVersion":
Version of the digital wallet's payment API
    payment method data

    "paymentMethodData":{
Object containing information about the payment method used in the transaction
     payment method description

     "description":
User-facing message to describe the payment method that funds this transaction
     tokenization data

     "tokenizationData":{
Object containing information related to tokenization and the digital wallet
      tokenization type

      "type":
The type of tokenization to be applied to the selected payment method

Possible values: PAYMENT_GATEWAY or DIRECT
      token

      "token":
The generated payment method token
     payment method type

     "type":

A short identifier for the supported payment method.

Possible value:

CARD

     info

     "info":{
Object that echoes information about the cardholder, the card and the card network from the digital wallet
      card network

      "cardNetwork":
The payment card network
      card details

      "cardDetails":
The details about the card; this value is commonly the last four digits of the selected payment account number
      card details

      "cardDetails":
The details about the card; this value is commonly the last four digits of the selected payment account number
      digital wallet billing address

      "billingAddress":{
Object that echoes the cardholder's billing information from the digital wallet
       address 3

       "address3":
Third line of the address
       sorting code

       "sortingCode":
The sorting code
       address 2

       "address2":
Second line of the address
       country code

       "countryCode":
ISO 3166-1 alpha-2 country code
       address 1

       "address1":
First line of the address
       postal code

       "postalCode":
Address postal code or ZIP
       name

       "name":
Name of the addressee
       locality

       "locality":
City, town, neighbourhood, or suburb
       administrative area

       "administrativeArea":
A country subdivision, such as a state or province
      digital wallet shipping address

      "shippingAddress":{
Object containing the cardholder's default shipping address information stored in the digital wallet
       address 3

       "address3":
Third line of the address
       sorting code

       "sortingCode":
The sorting code
       address 2

       "address2":
Second line of the address
       country code

       "countryCode":
ISO 3166-1 alpha-2 country code
       postal code

       "postalCode":
Address postal code or ZIP
       name

       "name":
Name of the addressee
       locality

       "locality":
City, town, neighbourhood, or suburb
       administrative area

       "administrativeArea":
A country subdivision, such as a state or province
 Receipt

"receipt":{
Object containing the receipt information
  result (financial transaction)

  "result":
Indicates the result of the financial transaction

Possible values are:

a = Accepted

d = Declined
  Gift (receipt)

  "gift":[{
Contains information related to gift card
   order number

   "order_no":
The order number is a unique identifier appended to every financial transaction
   transaction number

   "transaction_no":
Moneris Gateway-specific transaction identifier

This field is required for any future follow-on transaction requests, such as Refund, Purchase Correction and Pre-Authorization Completion transactions
   reference number

   "reference_no":
Terminal used to process the transaction, followed by 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 should be stored by the merchant

Example: 660123450010690030

66012345: Terminal ID

001: Shift number

069: Batch number

003: Transaction number within the batch.
   response code

   "response_code":
Transaction response code

Possible values are:

<50 – transaction approved

>=50 –transaction declined

NULL – transaction was not sent for authorization

For more details on specific response, please see the Response Codes reference topic
   benefit amount

   "benefit_amount":
This is the benefit that was generated for the transaction; the amount that was removed from the card as part of the transaction
   benefit remaining

   "benefit_remaining":
The remaining balance on the gift card
   first 6 last 4

   "first6last4":
First 6 and last 4 digits of card number
  Credit Card (receipt)

  "cc":{
Contains fields describing the response to the credit card transaction
   order number

   "order_no":
The order number is a unique identifier appended to every financial transaction
   customer ID

   "cust_id":
Merchant-defined field that can be used as an identifier

Searchable from the Moneris Merchant Resource Center
   transaction number

   "transaction_no":
Used to reference the original transaction when performing a follow-on transaction (i.e., Pre-Authorization Completion, Purchase Correction or Refund)

This value is returned in the response of the original transaction

Pre-Authorization Completion: references a Pre-Authorization

Refund/Purchase Correction: references a Purchase or Pre-Authorization Completion
   reference number

   "reference_no":
Terminal used to process the transaction, followed by 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 should be stored by the merchant

Example: 660123450010690030

66012345: Terminal ID

001: Shift number

069: Batch number

003: Transaction number within the batch.
   transaction code

   "transaction_code":
Type of financial transaction that was performed

Possible values:

00 – Purchase

01 – Pre-Authorization

06 - Card Verification
   transaction type

   "transaction_type":
ISO transaction code for financial transaction
   transaction date and time

   "transaction_date_time":
Processing host date and time stamp

Format: YYYY-MM-DD HH:MM:SS
   corporate card

   "corporateCard":
Indicates whether the payment card is a corporate card
   credit card amount

   "amount":
The total dollar amount that was charged to the credit card
   response code

   "response_code":
Transaction response code

Possible values are:

<50 – transaction approved

>=50 –transaction declined

NULL – transaction was not sent for authorization

For more details on specific response, please see the Response Codes reference topic
   ISO response code

   "iso_response_code":
ISO response code returned from issuing institution

For more details on specific ISO codes returned, see the Response Codes reference topic
   approval code

   "approval_code":
Authorization code returned from the issuing institution
   card type

   "card_type":
Type of payment card used to process the transaction Allowable values:

V = Visa

M = Mastercard

AX = American Express

DC = Diner's Card

NO = Novus/Discover

SE = Sears

D = INTERAC® Debit

C1 = JCB
   wallet type

   "wallet_type":
Type of digital wallet used in this transaction
   dynamic descriptor

   "dynamic_descriptor":
Merchant-defined description sent on a per-transaction basis that will appear on the credit card statement appended to the merchant’s business name

Dependent on the card issuer, the statement will typically show the dynamic descriptor appended to the merchant's existing business name separated by the "/" character; additional characters will be truncated

NOTE: The 22-character maximum limit must take the "/" into account as one of the characters
   invoice number

   "invoice_number":
Identifies an invoice number associated with the transaction
   customer code

   "customer_code":
User-defined identifier
   electronic commerce indicator

   "eci":
The e-commerce indicator or crypt type that was used to process the transaction

Possible values:

5 - Authenticated e-commerce transaction (3D-Secure)

6 - Non-authenticated e-commerce transaction (3D-Secure)

7 - SSL-enabled merchant
   CVD result code

   "cvd_result_code":
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 Response Codes reference
   AVS result code

   "avs_result_code":
Indicates the address verification result

For a full list of possible response codes refer to the AVS Response Codes reference
   "first6last4":

   "eci":
First 6 and last 4 digits of card number
   expiry date

   "expiry_date":
Expiry date of the card

MMYY format
   recur success

   "recur_success":
Indicates whether the recurring billing transaction has been successfully set up for future billing

Possible values: true or false
   issuer ID

   "issuer_id":
Unique identifier for the cardholder's stored credentials

Sent back in the response from the card brand when processing a Credential on File transaction

If the cardholder's credentials are being stored for the first time, and the issuer ID was returned in the response, you must save the issuer ID on your system to use in subsequent Credential on File transactions (applies to merchant-initiated transactions only)

The issuer ID must be saved to your systems when returned from Moneris Gateway in the response data, regardless if the value was received or not

As a best practice, if the issuer ID is not returned and you received a value of NULL instead, store that value and send it in the subsequent transaction
   ECR (electronic cash register) number

   "ecr_no":
Terminal ID/ECR Number from the request
   batch number

   "batch_no":
Batch number; also presented as a component of the reference number
   sequence number

   "sequence_no":
Transaction number within the batch; also presented as a component of reference number
   result (financial transaction)

   "result":
Indicates the result of the financial transaction

Possible values are:

a = Accepted

d = Declined
   Tokenize

   "tokenize":{
Contains information related to the tokenization of cardholder credentials
    success (tokenize)

    "success":
Indicates whether the card was successfully tokenized

Possible values: true or false
    first 4 last 4

    "first4last4":
The first 4 and last 4 digits of the card
    data key

    "data_key":
Unique identifier for a Vault profile, and used in future Vault financial transactions to associate a transaction with that profile
    tokenization status

    "status":
Specifies what type of failure, if any, occurred during the tokenization request
Possible values:
001 = Successful creation of a temporary token
940 = Invalid profile id (on tokenization request)
941 = Error generating token
942 = Invalid Profile ID, or source URL
943 = Card data is invalid (not numeric, fails mod10, we will remove spaces)
944 = Invalid expiration date (mmyy, must be current month or in the future)
945 = Invalid CVD data (not 3-4 digits)
    tokenization message

    "message":
Provides additional details about the success or failure of the tokenization
   Fraud

   "fraud":{
Contains sub-objects that describe information related to fraud tool inquiries
    CVD

    "cvd":{
Contains information related to the CVD fraud tool
     decision origin

     "decision_origin":
Possible values: Moneris or Merchant
     CVD result

     "result":
Possible values:

1 = Success

2 = Failed

3 = Not performed

4 = Card not eligible
     condition

     "condition":
Indicates whether this fraud tool was set as a factor for Moneris to use when making an automatic decision on a transaction

Possible values are as follows:

0 = Optional

1 = Mandatory
     status

     "status":
Indicates whether the fraud tool inquiry was performed, and if it was used for auto-decisioning purposes

Possible values:

success = Fraud tool successful

failed = Fraud tool failed (non-auto decision)

disabled = Fraud tool not performed

ineligible = Fraud tool was selected but card is not a credit card or card not eligible

failed_optional = Fraud tool failed and auto decision is optional

failed_mandatory = Fraud tool failed auto decision is mandatory
     CVD code

     "code":
CVD result code; for a list of possible codes see the CVD Response Codes reference
     condition

     "details":
Indicates whether this fraud tool was set as a factor for Moneris to use when making an automatic decision on a transaction

Possible values are as follows:

0 = Optional

1 = Mandatory
    AVS

    "avs":{
Contains information related to the AVS fraud tool
     decision origin

     "decision_origin":
Possible values: Moneris or Merchant
     AVS result

     "result":
Possible values:

1 = Success

2 = Failed

3 = Not performed

4 = Card not eligible
     condition

     "condition":
Indicates whether this fraud tool was set as a factor for Moneris to use when making an automatic decision on a transaction

Possible values are as follows:

0 = Optional

1 = Mandatory
     status

     "status":
Indicates whether the fraud tool inquiry was performed, and if it was used for auto-decisioning purposes Possible values:

success = Fraud tool successful

failed = Fraud tool failed (non-auto decision)

disabled = Fraud tool not performed

ineligible = Fraud tool was selected but card is not a credit card or card not eligible

failed_optional = Fraud tool failed and auto decision is optional

failed_mandatory = Fraud tool failed auto decision is mandatory
     AVS code

     "code":
AVS result code; for a list of potential codes, see the AVS Response Codes reference
     details

     "details":
Provides detailed information about the fraud tool query

Only populated for Kount and 3-D Secure
    3-D Secure

    "3d_secure":{
Contains information related to the 3-D Secure fraud tool
     decision origin

     "decision_origin":
Possible values: Moneris or Merchant
     3-D Secure result

     "result":
Possible values:

1 = Success

2 = Failed

3 = Not performed

4 = Card not eligible
     condition

     "condition":
Indicates whether this fraud tool was set as a factor for Moneris to use when making an automatic decision on a transaction

Possible values are as follows:

0 = Optional

1 = Mandatory
     status

     "status":
Indicates whether the fraud tool inquiry was performed, and if it was used for auto-decisioning purposes

Possible values:

success = Fraud tool successful

failed = Fraud tool failed (non-auto decision)

disabled = Fraud tool not performed

ineligible = Fraud tool was selected but card is not a credit card or card not eligible

failed_optional = Fraud tool failed and auto decision is optional

failed_mandatory = Fraud tool failed auto decision is mandatory
     3-D Secure code

     "code":
The crypt type that was used to process the transaction

Possible values are:

5 - Authenticated e-commerce transaction (3-D Secure)
6 - Non-authenticated e-commerce transaction (3-D Secure)
7 - SSL-enabled merchant
     details

     "details":{
Provides detailed information about the fraud tool query

Only populated for Kount and 3-D Secure
      Cardholder Authentication Value (CAVV)

      "cavv":
Value provided by the Moneris MPI or by a third-party MPI

Returned by Visa Secure, Mastercard Identity Check or American Express SafeKey transactions
      3-D Secure message

      "message":
Describes the reasoning for the outcome of the 3-D Secure inquiry

Possible values:

"Authentication Not Available"

"Unable to Verify Enrollment"

"Successful Payer Authentication"

"Cardholder Not Participating"

"failed 3-D Secure authentication"

"Successful Merchant Attempt"
      VERes

      "VERes":
Verification response code

Possible values:

N = The card/issuer is not enrolled

U = The card type is not participating

Y = The card is enrolled
      PARes

      "PARes":
Payer Authentication response code. Possible values:

“true” = Fully authenticated or attempted to verify PIN.
“false” = Failed to authenticate
      load 3-D Secure

      "loadvbv":
Only present with value "true" if page was successfully redirected from the 3-D Secure site.
    Kount

    "kount":{
Contains information related to the Kount fraud tool
     decision origin

     "decision_origin":
Possible values: Moneris or Merchant
     Kount result

     "result":
Possible values:

001 = Success

973 = Unable to locate merchant Kount details

984 = Data error

987 = Invalid transaction

     condition

     "condition":
Indicates whether this fraud tool was set as a factor for Moneris to use when making an automatic decision on a transaction

Possible values are as follows:

0 = Optional

1 = Mandatory
     status

     "status":
Indicates whether the fraud tool inquiry was performed, and if it was used for auto-decisioning purposes

Possible values:

success = Fraud tool successful

failed = Fraud tool failed (non-auto decision)

disabled = Fraud tool not performed

ineligible = Fraud tool was selected but card is not a credit card or card not eligible

failed_optional = Fraud tool failed and auto decision is optional

failed_mandatory = Fraud tool failed auto decision is mandatory
     Kount code

     "code":
Possible values:

001 = Success

973 = Unable to locate merchant Kount details

984 = Data error

987 = Invalid transaction
     details

     "details":{
Provides detailed information about the fraud tool query

Only populated for Kount and 3-D Secure
      Kount response code

      "responseCode":
Final risk score returned from Kount system
      message (Kount)

      "message":
Brief description message about the Kount inquiry
      receipt ID

      "receiptID":
The order ID echoed from the original financial transaction
      Kount result

      "receiptID":
Possible values are as follows:

1 = Success

2 = Failed

3 = Not performed

4 = Card not eligible
      Kount score

      "score":
Final risk score returned from Kount system
      Kount error

      "error":
List of errors the Kount request generated

Terminating Instance

To terminate the Moneris Checkout instance, call monerisCheckout.closeCheckout(), for example:

myCheckout.closeCheckout([ticket #]);


Testing MCO Integration

In the testing stage of development:

1. Use the testing Merchant Resource Center at https://esqa.moneris.com/mpg to configure your Moneris Checkout page for testing purposes

2. Use the testing URL for server to server requests:

https://gatewayt.moneris.com/chkt/request/request.php

3. Use the testing JavaScript library:

<script src="https://gatewayt.moneris.com/chkt/js/chkt_v1.00.js"></script>

4. Set up your monerisCheckout object to the testing mode:

myCheckout.setMode("qa");

5. In all Preload requests use the value "qa" for the environment variable

6. In all Preload requests, make sure that you are using the testing version of your credentials for Store ID, API token and Checkout ID

7. In all Receipt requests use the value "qa" for the environment variable

8. In all Receipt requests, make sure that you are using the testing version of your credentials for Store ID, API token and Checkout ID

Moving to Production with MCO

Once you have finished testing your Moneris Checkout integration, do the following to move the integration into production:

1. Ensure that you have duplicated your final testing configuration in your Moneris Checkout production configuration in the production Merchant Resource Center at https://www3.moneris.com/mpg

2. Use the production URL for server to server requests:

https://gateway.moneris.com/chkt/request/request.php

3. Use the production JavaScript library:

<script src="https://gateway.moneris.com/chkt/js/chkt_v1.00.js"></script>

4. Set up your monerisCheckout object to the production mode:

myCheckout.setMode("prod");

5. In all Preload requests use the value "prod" for the environment variable

6. In all Preload requests, make sure that you are using the production version of your credentials for Store ID, API token and Checkout ID

7. In all Receipt requests use the value "prod" for the environment variable

8. In all Receipt requests, make sure that you are using the production version of your credentials for Store ID, API token and Checkout ID