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
You will need to follow these steps.
Login to your Moneris Merchant Resource Centre:
Click on ‘Admin on the menu.
Click on ‘Hosted Tokenization’ in the sub-menu.
Enter the source domain page. This is the address of the main outer page that sends the transaction to Moneris.
Click the button “Create Profile”
Make a note of the Profile ID that gets generated since this will need to be included in your HTML iFrame code.
Do the required development as outlined here
Test your solution in the test environment
Activate your production store
Create and configure your product Hosted Tokenization store in the production Merchant Resource Centre
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.
Note
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
Note
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
Learn more with the API Definitions
Peruse the endpoints, request/response formats, and authentication methods covered in this scenario.