Search

Are you looking for test card numbers?

Would you like to contact support?

MOLPay online banking

Learn how to accept online banking payments in Malaysia, Thailand, and Vietnam using MOLPay.

Online banking is a popular payment method for ecommerce in many countries in the Asia-Pacific region. In Malaysia, Thailand, and Vietnam we offer online banking through our partner MOLPay.

For Vietnam, we also offer online banking through our partner MoMo.

When making a MOLPay online banking payment, the shopper is redirected to their bank's website or app to complete the payment. Getting a final result of such a payment can be asynchronous, so you will need to rely on notifications to know whether the payment was successful.

Instead of your company name, the name that will appear on the shopper's bank statement against the online bank transfer is MOLPay (Malaysia), Omise/MOLPay (Thailand), or MOLPay/VTC-Pay (Vietnam).

Payment Type Payment flow Recurring Refunds Partial Refunds Captures Chargebacks
Online Banking Redirect No

Malaysia: supported

Thailand and Vietnam: not supported

No No No

Integration options

The integration sections describe configuration specific for MOLPay online banking. Make sure that you have implemented the core integration for Drop-in, Components, or API only.

You can accept MOLPay online banking payments with:

Integrate with Drop-in

Our Web, iOS, and Android Drop-in solutions support MOLPAY online banking payments without any additional configuration.

To know whether a payment is successful, you'll also need to set up notifications.

Integrate with Components

In this section, we show how you can add MOLPay Component to your existing Components integration. You can accept MOLPay online banking payments with:

Web MOLPay Component

The steps for integrating Web Components are similar for all supported payment methods, as described in the core Web Components integration page. Go to the core Web Components integration steps we link to below and apply the configuration for MOLPay.

For MOLPay, there are three different Web components for each supported country: one for Malaysia, one for Thailand, and one for Vietnam. You'd use the Component corresponding to the country where you want to offer online banking via MOLpay.

To add one of our pre-built MOLPay eBanking Components to your web payments form:

  1. In step 1 of the core Web Components integration where you make a /paymentMethods call, specify the countryCode and currency for the country where you offer online banking via MOLPay.

    • For Malaysia:

      • countryCode: MY.
      • currency: MYR.
    • For Thailand:

      • countryCode: TH.
      • currency: THB.
    • For Vietnam:
      • countryCode: VN.
      • currency: VND.

    In the response, find the following object:

    • For Malaysia:
      • type: molpay_ebanking_fxp_MY
    • For Thailand:
      • type: molpay_ebanking_TH
    • For Vietnam:
      • type: molpay_ebanking_VN

    Then store this object, for example as molPayEBankingData.

    You can pass this object when you instantiate the MOLPay Component, or you can pass the entire paymentMethodsResponse object in the AdyenCheckout.

  2. In step 2, add the Components JavaScript file and include the required configuration for AdyenCheckout.

    Then, create a DOM element, placing it where you want the online banking form to be rendered:

    <div id="molpay_ebanking"></div>

    Next, create an instance of the MOLPay eBanking Component, and mount it, specifying:

    • molPayEBankingData.details: The contents of the details array of the object that you stored in the previous step.

    Example for Malaysia:

    const molPayEBankingMY = checkout.create('molpay_ebanking_fpx_MY', {
       details: molPayEBankingData.details
       // If you pass the full paymentMethodsResponse in the AdyenCheckout configuration,
       // then you don't need to pass the details separately per Component
    }).mount('#molpay_ebanking');

    When the onChange event is triggered and when state.isValid is true, collect the encrypted values passed in the state.data. You'll use these to make the payment in step 3. If you wish to override the function on the core AdyenCheckout instance, you can also define an onChange event on the Component level.

Next, proceed to step 3 to submit a payment request from your server. From here you can continue to refer to the steps on the core Web Components page.

To configure how the MOLPay eBanking Component renders in your payment form, see Configuring the Component.

iOS MOLPay and Redirect Component

To complete a MOLPay online banking payment on your iOS app, you can use the following iOS Components:

If you only want to use one of the Components, see the API only section to learn how you can build the issuer selection list or to perform the redirect on your own.

iOS MOLPay Component

The steps for integrating iOS Components are similar for all supported payment methods, as described in the core iOS Components integration page. Go to the core iOS Components integration steps we link to below and apply the configuration for MOLPay.

  1. Present MOLPay online banking issuer list and collect your shopper's selection. In step 2 of the core iOS Components integration after you decode the /paymentMethods response, find the IssuerListPaymentMethod with any of the type values for MOLPay: molpay_ebanking_fxp_MY, molpay_ebanking_TH, or molpay_ebanking_VN.

  2. Next, initialize the MOLPay eBanking Component. Assign a delegate, use the viewController property, pass the payment method object, and set the environment to test. When you're ready to go live, change this to live or to other environment values described in the class reference.

    let molpayComponent = MOLPayComponent(paymentMethod: molpayPaymentMethod)
    molpayComponent.delegate = self
    molpayComponent.environment = .test
    present(molpayComponent.viewController, animated: true)

    After the shopper provides payment details, the didSubmit method from the PaymentComponentDelegate will be invoked. Get the contents of data.paymentMethod and pass this to your server.

  3. Next, proceed to step 3 and submit the payment request containing the data.paymentMethod.

    If you receive an action object, this means that you should proceed to step 4 to perform additional actions on your client app.

  4. In step 4, you can use the Action class to determine the type of action that you should take.

    For MOLPay online banking payments, the Action type is redirect, which means that you need to redirect the shopper to the issuer's website or app to complete the payment.

From here you can choose either to handle your own redirection or to use our Redirect Component.

iOS Redirect Component

If you choose to use the iOS Redirect Component, follow the same procedures described in Using the Redirect Component.

Android MOLPay and Redirect Component

To complete a MOLPay online banking payment on your Android app, you can use the following Android Components:

If you only want to use one of the Components, see the API only section to learn how you can build the issuer selection list or to perform the redirect on your own.

Android MOLPay Component

The steps for integrating Android Components are similar for all supported payment methods, as described in the core Android Components integration page. Go to the core Android Components integration steps we link to below and apply the configuration for MOLPay.

  1. To start integrating MOLPay, first you need to import the MOLPay Component to your to your build.gradle file.

    implementation "com.adyen.checkout:molpay-ui:<latest-version>"
  2. Present the MOLPay issuer list and collect your shopper's selection. In step 2 of the core Android Components integration where you deserialize the response from the /paymentMethods call, get the object with type molpay_ebanking_fxp_MY. We will support MolPay Vietnam and Thailand for Android in future releases.

    Create an molpayConfiguration object and set the environment to TEST. When you're ready to go live, change this to a location closest to where your shoppers are, for example EUROPE. See possible environment values on GitHub.

    val molpayConfiguration =
        MolpayConfiguration.Builder(Locale.getDefault(), resources.displayMetrics, Environment.TEST)
        .build()

    Next, initialize the MOLPay Component. Pass the payment method object and the molpayConfiguration object.

    val molpayComponent = MolpayComponent.PROVIDER.get(this@YourActivity, paymentMethod, molpayConfiguration)

    Then, add the MOLPay Component view to your layout.

    <com.adyen.checkout.molpay.MolpaySpinnerView
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"/>

    Attach the Component to the view to start getting your shopper's payment details.

    MolpaySpinnerView.attach(molpayComponent, this@YourActivity)

    When shoppers enter their payment details, you will start receiving updates. If isValid is true and the shopper proceeds to pay, pass the paymentComponentState.data.paymentMethod to your server to make the /payments request.

    molpayComponent.observe(this@coreActivity, Observer {
        if (it?.isValid == true) {
            //  // When the proceeds to pay, pass the `it.data` to your server to send a /payments request
        }
    })
  3. Next, proceed to step 3 and submit the payment request containing the paymentComponentState.data.paymentMethod.

    If you receive an action object, which means that you should proceed to step 4 to perform additional actions on your client app.

  4. In step 4, use the action.type you received in the response to determine the type of action that you should take.

    For MOLPay online banking payments, the action.type is redirect, which means that you need to redirect the shopper to the issuer's website or app to complete the payment.

From here you can choose either to handle your own redirection or to use our Redirect Component.

Android Redirect Component

If you choose to use the Android Redirect Component, follow the same procedures as described in Using the Redirect Component.

Integrate with API only

Our API-only integration works the same way for all payment methods, as described in the core API-only integration page. Go to the core API-only integration steps we refer to below and apply the configuration to build your own form for MOLPay online banking payments.

  1. Check if MOLPay is available for the shopper. In step 1 of the core API-only integration, check any of the type values for MOLPay: molpay_ebanking_fpx_MY, molpay_ebanking_TH, or molpay_ebanking_VN.

  2. In step 2, include MOLPay in the list of available payment methods that you present to the shopper.

  3. As described in step 3, render the input fields for MOLPay to collect your shopper's issuer selection. Use your dynamically generated or hard-coded payment form to present a list of available banks in your payments form.

    Malaysia:

    Bank name Issuer ID
    Affin Bank fpx_abb
    Alliance Bank fpx_abmb
    Am Online fpx_amb
    Bank Islam fpx_bimb
    Bank Muamalat fpx_bmmb
    Bank Rakyat fpx_bkrm
    Bank Simpanan Nasional fpx_bsn
    CIMB Clicks fpx_cimbclicks
    Hong Leong Connect fpx_hlb
    HSBC fpx_hsbc
    Kuwait Finance House fpx_khf
    Maybank2u fpx_mb2u
    OCBC Bank fpx_ocbc
    Public Bank fpx_pbb
    RHB Now fpx_rhb
    Standard Chartered Bank fpx_scb
    UOB Bank fpx_uob

    Thailand:

    Bank name Issuer ID
    Bangkok Bank molpay_bangkokbank
    Krungsri Bank molpay_krungsribank
    Krung Thai Bank molpay_krungthaibank
    The Siam Commercial Bank molpay_siamcommercialbank

    Vietnam:

    Bank name Issuer ID
    ACB vtcpay-acb
    Agribank vtcpay-agribank
    BIDV vtcpay-bidv
    DongABank vtcpay-dongabank
    MaritimeBank vtcpay-maritimebank
    MB Bank vtcpay-mb
    Sacombank vtcpay-sacombank
    Techcombank vtcpay-techcombank
    Vietcombank vtcpay-vietcombank
    Vietinbank vtcpay-vietinbank

    Collect the Issuer ID that corresponds to the shopper's bank. You'll need this to make a payment.

  4. Next, proceed to step 4 and submit the payment request.

    • Make a POST request to the /payments endpoint, specifying:

      • reference: Your unique reference for this payment.
      • amount
      • The payment method type, depending on the country where you offer online banking via MOLPay:

        • paymentMethod.type: molpay_ebanking_fpx_MY for Malaysia
        • paymentMethod.type: molpay_ebanking_TH for Thailand
        • paymentMethod.type: molpay_ebanking_VN for Vietnam
      • paymentMethod.issuer: The issuer ID of the shopper's bank.
      • returnUrl: The URL the shopper will be directed back to after they complete the payment.

    Example for Malaysia:

    {
         "merchantAccount":"YOUR_MERCHANT_ACCOUNT",
         "reference":"MOLPay Malaysia test",
         "amount":{
            "currency":"MYR",
            "value":1000
         },
         "paymentMethod":{
            "type":"molpay_ebanking_fpx_MY",
            "issuer":"fpx_bkrm"
         },
         "returnUrl":"https://your-company.com/..."
    }

    This returns a /payments response containing:

    • resultCode of RedirectShopper.
    • action object containing a url. This is supported from API v49 and later.
    • redirect object containing a url.
    {
        "resultCode": "RedirectShopper",
        "action": {
            "data": {},
            "method": "GET",
            "paymentData": "Ab02b4c0!BQABAg/H8YU..",
            "paymentMethodType": "molpay_ebanking_fpx_MY",
            "type": "redirect",
            "url": "https://test.adyen.com/hpp/details.shtml?brandCode=molpay_ebanking_fpx_MY"
        },
        "details": [
            {
                "key": "payload",
                "type": "text"
            }
        ],
        "paymentData": "Ab02b4c0!BQABAg/H8YU..",
        "redirect": {
            "method": "GET",
            "url": "https://test.adyen.com/hpp/details.shtml?brandCode=molpay_ebanking_fpx_MY"
        }
    }
  5. In step 5, use the action.type you received in the response to determine the type of action that you should take.

    For MOLPay payments, the action.type is redirect, which means that you need to redirect the shopper to the issuer's website or app to complete the payment.

    Redirect the shopper to the URL specified at action.url for API v49 and later. For earlier versions, use the redirect.url.

    When the shopper has completed the payment, they return back to your website or app using the returnUrl you provided when you made the /payments request. This is appended with a URL-encoded payload. You'll use the payload in the next step to verify the payment. If any other parameters are appended, ignore them.

    https://your-company.com/?payload=sdfsdf...
  6. Proceed to step 6 to verify the result of the payment. URL decode the payload, and submit a POST /payments/details request containing the following data:

    {
     "details":{
       "payload":"sdfsdfsdf..."
     }
    }

    The response contains a pspReference, which is our unique identifier for this payment, and a resultCode.

From here you can continue to refer to the steps on the core API-only integration page.

MOLPay result codes

The resultCode values you can receive for MOLPay online banking are:

  • Authorised: The payment was successful.
  • Cancelled: The shopper cancelled the payment while on their bank's website or app. Ask the shopper whether they want to continue with the order, or request that they select a different payment method.
  • Refused: The payment was refused by the shopper's bank.
  • Pending: The shopper has completed the payment but it will take a while for the MOLPay payments network to confirm this. Inform the shopper that you have received their order, and are waiting for the payment to be completed.

To find out more about result codes and how you can action them, see Result codes.

MOLPay notifications

Our notifications are webhooks informing you of important events related to your account. Accepting notifications is required for MOLPay, regardless of the type of integration. In most cases, the resultCode you receive at the end of the redirect payment flow already indicates whether the payment was authorised. In other cases, we can only inform you of the outcome of a payment by means of a notification. You'll need to rely on notifications when:

  • The resultCode is Pending or Received.
  • You didn't receive a resultCode, for example because the shopper failed to return to your website or app after completing the payment.

To inform you of the outcome of a payment, we send you a notification with:

  • pspReference: Adyen's unique reference associated with the payment request.
  • eventCode: AUTHORISATION.
  • success: Indicates the outcome of the payment. Possible values:

    • true: The payment was authorised.
    • false: The payment failed.

AUTHORISATION is just one of the events that trigger a notification. Refer to Notification webhooks to accept notifications and learn about their structure and content.

Configuring the Component

Web Component

Our MOLPay eBanking Components let you configure whether to display a list of bank logos on your payments form, and whether to preselect a default bank.

  • When instantiating the MOLPay eBanking Component, optionally specify: 

    • showImage: To remove the bank logos from the form, set this to false.
    • issuer: To preselect a specific issuer (bank), set this to the id of the issuer.

    Example for Malaysia:

    const molPayEBankingMY = checkout.create('molpay_ebanking_fpx_MY', {
      details: molPayEBankingMYData.details,
      showImage: false,
      issuer: 'fpx_bimb',
      onChange: handleOnChange
    }).mount('#molpay_ebanking');

Testing MOLPay payments

For testing purposes, the MOLPay online banking payment method is linked to the default acquirer simulator. The simulator redirects you to a page where you select a scenario. For example, a scenario with a payment result of Authorised, or Cancelled.

Before accepting live MOLPay online banking payments, test your integration:

  1. To find issuer IDs, make a POST request to /paymentMethods. The issuer IDs are in the details.items array for molpay_ebanking_fxp_MY (Malaysia), molpay_ebanking_TH (Thailand), or molpay_ebanking_VN (Vietnam).
  2. Using any issuer ID that is available for the MOLPay eBanking Component for the country, make MOLPay online banking test payments to test each of the following Payment Results:

    • Authorised
    • Cancelled
    • Error
    • Refused
    • Pending
  3. Check the status of the MOLPay test payments in your Customer Area > Transactions > Payments.

See also