Preselecting payment methods

Overview

By default, the customer's payment procedure on Payment Page begins at the step of selecting a payment method. However, in some cases, there is no need to display the payment form with the page for payment method selection. This may be the case when the customer selects a payment method in the merchant web service before opening Payment Page or when paying with a particular method is relevant for this merchant due to region- or customer-specific reasons and other factors.

The ecommpay payment platform provides the capability of opening Payment Page with the payment method that has been preselected by the customer or the merchant. With this functionality configured, the page for selecting a payment method is not displayed to the customer on the payment form. For a payment method to be preselected, this method is specified in the request for opening Payment Page—no additional actions are required for setting up this functionality.

The functionality of preselecting a payment method can be accompanied by other possible capabilities, which are relevant for certain payment methods and affect the Payment Page workflow, such as. Here are some of such capabilities in particular:

  • Displaying details of saved cards issued for a certain payment system. With card payments, it is possible to limit the choice of cards that were previously saved by the customer. For this, the request for opening Payment Page should contain the identifier of the preferred payment system (for example, Mastercard or Visa). As a result, the customer payment procedure begins on the page with the list of the previously saved cards that were issued for the payment system specified in the request. If the customer has not saved the card data before or the list of saved cards does not contain the data the customer needs, the customer can specify the details of another card which can also be the card issued for a different payment system.
  • Preselecting banks for online banking payments. When working with an online banking payment method (for example, the Indonesian Online Banking method), merchants can preselect a particular bank that works with the specified payment method. In this case, the customer is redirected straight to the bank website without being redirected to the pages for selecting a payment method and a bank. The information about such capability that is relevant for particular payment methods is provided in the Methods section.
  • Preselecting payment method groups. Some methods , such as Open Banking in Germany are included in groups whose identifiers can be specified when sending for opening Payment Page. In this case, the customer is shown buttons for selecting only those methods that are included in the specified group and are available within the project being used.

Finally, besides preselecting a certain payment method, merchants can manage the availability of payment methods on Payment Page. For more information about this capability, see Managing payment methods availability.

Special aspects

If you want to set up the functionality of preselecting a payment method, consider the following aspects:

  • Preselecting a payment method is supported only for the methods that are available within the current project, otherwise, the request for opening Payment Page is declined.
  • The customer cannot select a payment method different from the one that was specified in the request for opening Payment Page; this also applies to the procedure of payment retries—with a payment method preselected, the customer cannot select a payment method when making additional payment attempts within a single Payment Page session.
  • If the request for opening Payment Page contains both a payment method and a token, the payment is processed with the use of this token and the information about the specified payment method is ignored.

Request format

The preselected payment method should be specified in the request for opening Payment Page. For this, the code of this payment method should be specified in the force_payment_method parameter in the request, while to preselect a payment method group, specify the code of the group in the force_payment_group parameter. For more information about the codes of the supported payment methods and groups, see this reference.

The following example illustrates the parameters passed in the request for making a purchase with the Alipay payment method.

{
   "project_id": 42,
   "payment_id": "456789",
   "payment_currency": "USD",
   "payment_amount": 131970,
   "customer_id": "customer_12",
   "force_payment_method": "alipay",  // payment method code
   "signature": "TSzdE5rJZaA9TYAKoGpfXriFf82MxF..."
 }

Figure: Example of data in the request for opening Payment Page with the preselected method Alipay

{
   "project_id": 42,
   "payment_id": "456789",
   "payment_currency": "USD",
   "payment_amount": 131970,
   "customer_id": "customer_12",
   "force_payment_method": "alipay",  // payment method code
   "signature": "TSzdE5rJZaA9TYAKoGpfXriFf82MxF..."
 }
If you need to specify a certain payment system for a card payment, the request for opening Payment Page should contain the following:
  • The force_payment_method parameter with the value card (the code of the card payment method) specified.
  • The force_payment_method_subtype parameter with the identifier of the payment system specified.

The list of the identifiers of the supported payment systems is provided in Payment card codes.

The following example illustrates the parameters passed in the request for making a payment with Mastercard specified as the preferred payment system.

{
   "project_id": 43,
   "payment_id": "456790",
   "payment_currency": "USD",
   "payment_amount": 131970,
   "customer_id": "customer_12", 
   "force_payment_method": "card",  // payment method code
   "force_payment_method_subtype": "mastercard",   // payment system identifier
   "signature": "TSzdE5rJZaA9TYAKoGpfXriFf82MxF..."
 }

Figure: Example of data in the request for opening Payment Page with the preselected system Mastercard

{
   "project_id": 43,
   "payment_id": "456790",
   "payment_currency": "USD",
   "payment_amount": 131970,
   "customer_id": "customer_12", 
   "force_payment_method": "card",  // payment method code
   "force_payment_method_subtype": "mastercard",   // payment system identifier
   "signature": "TSzdE5rJZaA9TYAKoGpfXriFf82MxF..."
 }

Related links

  • Payment method codes—the reference section with the list of codes for the supported payment methods.
  • Payment card codes—the reference section with the list of identifiers for the supported payment systems.
  • Managing payment methods availability—the section with the information about limiting the list of payment methods for a particular payment.
  • Methods—the section with the information about the payment methods that are supported within the platform.
  • Parameters for opening payment form—the section with the information about parameters that are used for opening Payment Page.