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.

Therefore, ECommPay 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.

Figure: Standard scenario—the payment method is selected by the customer on Payment Page



Figure: Augmented scenario—the payment method is preselected before Payment Page opens



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. Here are some of such capabilities:

  • 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 Banks of Indonesia 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 Payment methods section.

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 passed in the force_payment_method parameter in the request. For more information about the codes of the supported payment methods, see this section.

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..."
 }
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 Supported payment cards.

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..."
 }

Related links