Home > Magento 2 – Mastercard Gateway > Configuration > Hosted Checkout Configuration

Magento 2 – Mastercard Gateway

Created date: 14-03-23   |   Updated date: 10-04-25   |   Plugin version: 2.4.5  |   API version: 100

Hosted Checkout Configuration

Below is a detailed explanation of each field in the Hosted Checkout section, designed to guide you through the setup process:

Enabling the “Hosted Checkout”

Enabled:
Open the dropdown menu and select “Yes” to enable the Hosted Checkout feature. This step activates the configuration needed for this payment option as well as enables the same in the checkout page.

Adding “Title”
”Title” displayed Title displayed in Checkout page

Title:

Type in a name or label for this payment method. This is what your customers will see on the checkout page when choosing how to pay. Make sure the label is clear and easy to understand.

Adding “Payment Modal Title”

Payment Modal Title:
Enter the name or heading for the payment tab as well as the title for the Redirect to Payment page after the user clicks the ‘Submit’ button during checkout.

 

Payment Action:
Choose one of the following payment flows:

Payment Action - Authorize Only

1. Authorize Only

 

  • If you choose “Payment Action” as Authorize Only, you will need to manually process the transaction to accept the payment. This means you must take an additional step to capture the payment amount.
  • The manual capture of funds is done through the Backend. Detailed instructions for this process can be found in the Managing Transactions section of this document.
  • The Authorize Only payment method works in two steps:
  1. Authorization happens during checkout. This ensures the payment method is valid and reserves the funds.
  2. Funds capture happens later. The money is only deducted after the merchant invoices the order.

This method gives you more control but requires you to complete the capture process manually within the stipulated timeframe configured for your MID.

Payment Action - Authorize & Capture

2. Authorize & Capture

 

  • If you choose the ‘Payment Action’ option as Authorize & Capture, the payment process will happen automatically. Here’s how it works:
  1. When a user enters their card details and submits an order, the total amount of the order is immediately deducted from their card.
  2. This amount is then automatically transferred to the merchant’s account.

Please note that while the transfer is automatic, it might take a little time for the amount to show up in the merchant’s account. However, no additional action is required from either the user or the merchant to complete the process.

Form Type:

Form Type - Embedded Form
Embedded Form
  • Embedded Form: Customers enter card details directly on the checkout page.
Form Type - Redirect to Payment Page
Redirected Payment Page
  • Redirect to Payment Page: Customers are redirected to a secure Mastercard-hosted page to complete payment.
Authentication Type

Authentication Type:
Select the preferred authentication method:

Authentication Type → Username and Password

1. Username and Password

 

  • API Username: Enter your API username.
  • API Password: Enter the API password obtained from your merchant account.
Authentication Type → SSL Certificate
Authentication Type → SSL Certificate

2. SSL Certificate

 

  • API Username: Enter your API username.
  • SSL Certificate: Upload the SSL certificate issued by a Mastercard-approved Certificate Authority (CA).
  • SSL Key: Upload the SSL Key
  • Custom PKI Gateway URL: Contact your payment service provider/bank to acquire this URL.

You must present a certificate to authenticate yourself to the Mastercard Gateway with certificate authentication. Certificates are typically issued from one of many organizations that act as Certificate Authorities (CAs). This model of authentication is a component of Public Key Infrastructure (PKI) where security is achieved through confidentiality, integrity, non- repudiation, and authentication.

Gateway, Custom Gateway URL

Gateway:
Select the gateway based on your account region.

 

Custom Gateway URL:
If “Other” is selected for Gateway, provide a custom URL to override the default regional gateway.

WebHook Secret, WebHook URL, Test Mode

WebHook Secret:
Enter the WebHook secret from your merchant account. Please refer to API Configuration to obtain the WebHook Secret.

 

WebHook URL:
Provide the Webhook URL linked to your merchant account to receive WebHook notifications.

Test Mode

Test Mode:

 

  • Select Yes to use test credentials (API username prefixed with TEST).
  • Select No to switch to live production mode.
  • Recommendation: Always test in Test mode before switching to Live mode.
Debug

Debug:
Enable Debug by selecting Yes if you’re testing in Test Mode. Debugging creates detailed logs that can help you identify and fix any issues with your payment process.

New Order Status

New Order Status:
This setting determines how successfully placed orders are labeled in the Magento Platform after being processed. You can choose from three options:

 

  • Payment Verified: The payment has been confirmed.
  • Processing: The order is being handled.
  • Suspected Fraud: The order appears suspicious and may need review.

 

Changing this setting won’t impact how transactions are processed by the payment gateway—it only updates how they are displayed in your system.

Accepted Currency

Accepted Currency:
Choose the currency you want to use as the base for your store. This determines the default currency for all transactions.

Payment from Applicable Countries

Payment from Applicable Countries:
Merchants can decide which countries they want to accept payments from. This setting works separately from any blocking rules set in the Merchant Manager.

 

You have two choices:

  1. All Allowed Countries: Payments can be processed from all countries that are allowed.
  2. Specific Countries: You can pick certain countries from which payments will be accepted.
Send Line Items

Send Line Items:
Select Yes if you want to include detailed order information (like item names, quantities, and prices) in the transactions sent to the Mastercard Gateway. This helps with tracking and provides more details for reporting.

Sort Order

Sort Order:
This controls the order in which this payment method appears to customers. A lower number means higher priority (e.g., 0 is the top priority).

Advanced Configuration

Advanced Configuration:
In the Advanced configuration section, you can find information about the current API version utilized by the Mastercard Gateway plugin. Additionally, there is a field available to create session request data.