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

Magento 2 – Mastercard Payment Gateway Services

Created date: 14-03-23   |   Updated date: 28-10-24   |   Plugin version: 2.4.0  |   API version: 81

Hosted Checkout Configuration

Please find a brief description of the fields in the ‘Hosted Checkout’ section

  • Enabled: Click on the dropdown and select ‘Yes’ to enable the Hosted Checkout configuration.
  • Title: Enter the text that needs to be displayed in the front-end checkout page/payment method section.
  • Payment Model Title: Enter the title of the payment modal that appears after clicking on the submit button on checkout.
  • Payment Action: There are two payment actions (payment flow methods) under Hosted Checkout integration: Authorize Only and Authorize & Capture.
  • Authorize & Capture
    If you select ‘Payment Action’ as Authorize & Capture, then the transaction will be done automatically. After the user has entered card details and submitted an order, the amount of the total order will be deducted from the user’s card and will be automatically transferred to the merchant’s account. It may take some time to reflect the amount into the merchant’s account, but the process will be automatic.
  • Authorize Only
    If you select ‘Payment Action’ as Authorize Only, the merchant should manually process the transactions and accept the payment amount. The manual process of capturing funds can be done via the Backend and will be covered later in the document. The Authorize Only payment method involves two-stage processing, where authorization is obtained during the checkout process, but funds are not deducted until the order status is set by the merchant to Invoice.
  • Form Type: For the Form Type, you have the option to select either “Embedded Form” or “Redirect to Payment Page” from the dropdown menu.
  • Choosing the “Embedded Form” option allows you to enter the user’s card details directly in the Payment Options section.
  • The “Redirect to Payment Page” will direct you to another page where you can enter the user’s payment details.
Embedded Form
Redirect to Payment Page
  • Authentication Type: Select Username and Password
  • API Username: Enter your API username. Please refer below to obtain the API Password.
  • API Password: Enter the API password from your merchant account.

Instead of Username and Password, an SSL certificate can be used. When this option is selected under Authentication Type, the admin panel will need to submit the following information:

  • API Username
  • SSL Certificate
  • SSL Key
  • Custom PKI Gateway URL: You will need to contact your payment service provider/bank to receive Custom PKI Gateway URL for Certificate Authentication.
  • A Certificate Authority (CA) approved by MasterCard must issue the SSL Certificate. Please get in touch with Mastercard to get a list of approved CAs.
  • You can refer to the Documentation to understand the requirement of SSL Certificate Authentication and what things you need to take care of.
  • WebHook Secret: Enter your webhook secret from your merchant account. Please refer below to obtain the WebHook Secret.
  • WebHook URL: Enter your webhook URL from your merchant account.
  • Gateway: Select the gateway based on your account region.
  • Custom Gateway URL: This field will be displayed if the Gateway is set to "Other," and it will override the Gateway region.
  • Test Mode: Select ‘Yes’ to configure your Merchant credentials to Test mode. In Test mode, you can check if the payment transactions are working correctly. Select ‘No’ if you want to switch to Live mode. It is possible to add credentials for the test and live mode simultaneously. Both modes have their own set of credential fields, which you need to fill separately. It allows you to switch between modes without re-entering your credentials every time.
  • We highly recommend you to configure your Merchant credentials in TEST mode beforehand and make sure that everything works.
  • Select ‘Yes’ to submit transactions using test credentials, prefixing TEST in front of the API Username.
  • Select ‘No’ to submit transactions using the PRODUCTION credentials.
  • Debug: Select ‘Yes’ to enable the merchant’s logging. Debug logging only works in Test mode. If you enable the Debug setting, it provides the additional output in the Magento extension for payment processes.
  • New Order Status: Select the status of any new order processed within the Magento Platform. Changing this field will not affect how the gateway processes the transaction. Three options are available: Payment Verified, Processing or Suspected Fraud.
  • Accepted Currency: Select the base currency of the store.
  • Payment from Applicable Countries: The merchant can select the countries from which the payment can be processed (separate from any blocking enabled via Merchant Manager). Two options are available: All Allowed Countries, Specific Countries
  • Payment from Specific Countries: Select the country from which the payment can be made. This will be enabled only if you have selected the ‘Payment from Applicable Countries’ as Specific Countries.
  • Send Line Items: Select “Yes” to send the additional data to the Mastercard Gateway.
  • Sort Order: Enter the sort order of the payment method. 0 is the highest priority.
Advanced Configuration

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