Payment with Hosted Tokenization

Hosted Tokenization allows your customers to input credit card numbers directly on your website in a secure frame controlled by Moneris

Accepting customer payments by using the Moneris Hosted Tokenization and the Moneris server-to-server APIs allows you to avoid compliance burdens for Payment Card Industry (PCI) standards.

Hosted Tokenization allows your customers to input credit card numbers directly on your website in a secure frame controlled by Moneris; this allows the rest of your website to maintain the look and feel you choose. Upon customer submission the tokenization frame captures the sensitive credit card data and returns a temporary “token” to your server allowing you to proceed with payment via our API.

1.Hosted Tokenization Setup

Moneris Merchant Resource Centre (MRC)
Access MRC

You will need to follow these steps.

  1. Login to your Moneris Merchant Resource Centre:

  2. Click on ‘Admin on the menu.

  3. Click on ‘Hosted Tokenization’ in the sub-menu.

  4. Enter the source domain page. This is the address of the main outer page that sends the transaction to Moneris.

  5. Click the button “Create Profile”

  6. Make a note of the Profile ID that gets generated since this will need to be included in your HTML iFrame code.

  7. Do the required development as outlined here

  8. Test your solution in the test environment

  9. Activate your production store

  10. Create and configure your product Hosted Tokenization store in the production Merchant Resource Centre

  11. Make the necessary changes to move your solution from the test environment into production

2. Getting Temporary Token

To get a temporary token you will need to send a request to Moneris from within an IFrame.

A sample code is illustrated below.

Note that the Profile ID in the HTML link below will need to be replaced with your own Profile ID, which you can configure the MRC as described here.


The src and postMessage URL will need to be updated to the appropriate QA or production URL listed below.

Optional variables

Required variables

Response Code Definitions

Response Fields

Code sample

3. Receiving Temporary Token Response


Describes how to receive the response from the Hosted Tokenization page containing the temporary token. 

4. Processing the Payment

To charge the card using the temporary token you will need to utilize our API to Create Payment with the temporary token as the payment method.

In the POST /payments request, include the “paymentMethodData” object with the following parameters:

  • "paymentMethodType" with a value of "TEMPORARY_TOKEN",

  • “temporaryToken” with a value matching the token provided by the Hosted Tokenization service

Additional Information

Learn more with the API Definitions

Peruse the endpoints, request/response formats, and authentication methods covered in this scenario.

API References