Onerway
Payment methods

Maybank Virtual Account

Accept Maybank virtual account payments in Indonesia through the Direct API or Checkout, supply customer details, and confirm payment on your server.

Basic information

Customers follow the provider’s hosted page to complete the virtual account payment.

  • Integration paths: Direct API, Checkout
  • Transaction type: One-time payment
  • lpmsInfo.lpmsType: Maybank
Customer country/regionOrder currency
🇮🇩 IDIDR

The customer country/region is the billingInformation.country value in the payment request.

This guide covers enabled configurations where you supply customer details before creating the payment, as described in Before you begin. It covers the Indonesian virtual account product; it does not cover Malaysian online banking, FPX bank selections, or bank choices within another payment method. Before using another market or order currency, confirm the enabled scope for your merchant account and application with Onerway, then check the current order with List available payment methods.

Before you apply to enable Maybank Virtual Account, contact Onerway to confirm that it can be enabled for your merchant account and application.

Before you begin

Complete Setup and confirm that Maybank is enabled. Also confirm transaction limits, the applicable payment validity period, settlement arrangements, and the test procedure. For amount formatting, see Currency and amount validation.

For this flow, collect the customer’s billing first and last names, email, phone number, and country before creating the payment. Submit the phone number and phoneCountryCode in the separate fields defined by the API. Prepare the other required billing, shipping, and product details, including the required email and actual country for each address. You do not supply a virtual account number, bankName, or IBAN to select this method. Configure your server notification URL and customer return URL, and store the mapping between your order and the Onerway identifiers.

Start the payment

Direct API

  1. Check List available payment methods for the current order. After the customer selects this method, call Create direct transaction from your server with productType=LPMS, subProductType=DIRECT, txnType=SALE, and paymentMode=WEB. Set lpmsType=Maybank in lpmsInfo, encoded as a JSON string.
  2. Supply the customer details prepared above in billingInformation, and follow the API requirements for shippingInformation. Encode both as JSON strings. Include products, notification and return URLs, and merchant-collected end-user IP, browser, and device information in txnOrderMsg. Keep product and order currencies consistent, with product amounts, discounts, and shipping fees adding up to orderAmount.
    Select the request example “Redirect local payment request (illustrative)”. It uses Bancontact / BE / EUR to show the shared structure. Replace the method with Maybank, use IDR for this flow, and supply the actual order, customer name, email, phone, and address details. The example amount does not establish a transaction limit.
  3. Store the returned paymentId and transactionId. When status=R and actionType=RedirectURL, redirect the customer’s browser to redirectUrl. The response example “Redirect local payment response (illustrative)” shows this shape. For other actions or states, follow Local payment integration. Do not repeatedly create the same order while waiting.
  4. The provider’s page guides the customer through payment. When the customer returns to your site, display the result retrieved from your server. See Request signing for authentication.

Checkout

When locking Checkout to this method, first call List available payment methods for the current order and confirm that the method is returned. When Checkout displays all available methods, Onerway performs this filtering.

  1. On your server, call Create checkout payment with productType=ALL, subProductType=DIRECT, and txnType=SALE. To show only Maybank, set lpmsInfo.lpmsType to Maybank, sending lpmsInfo as a JSON string. If you omit lpmsInfo, the customer chooses from the methods available for the order.
  2. Supply the customer details prepared above, along with the required shipping, product, return URL, and notification URL fields. Encode billingInformation and shippingInformation as JSON strings. Keep product and order currencies consistent, and ensure that product amounts, discount entries, and shipping fees add up to orderAmount.
    Select the request example “Unified Checkout with all available payment methods”. Replace the order and customer details, use IDR for this flow, and add this method’s lpmsInfo if you want to select only Maybank. Remove cardInfo from the example for this flow. The example shows the shared Checkout request structure.
  3. Select the response example “Unified Checkout session created”. Store the returned paymentId and transactionId against your order, then redirect the customer’s browser to redirectUrl. The initial status=U means that payment has not been completed.
  4. Checkout handles the payment page and subsequent customer interaction. When the customer reaches returnUrl, display the result retrieved from your server. For signing, redirects, and return handling, see Checkout integration.

Customer actions and final result

When a redirect is required, send the customer to the returned redirectUrl. On the provider’s payment page, the customer reviews the order amount and follows the instructions to complete the Maybank virtual account payment. Payment details, available bank services, and steps follow the instructions for that order. Your application does not generate the virtual account details or display them from API response fields.

If the payment page displays a deadline, customers should pay before it. Obtaining payment details or returning to your site does not confirm receipt of funds. Keep the order awaiting payment until your server confirms the result, and do not promise immediate confirmation after a bank transfer.

Process the order using a signature-verified payment result webhook. If no notification has arrived or you need to check the result, call Query payments with the stored paymentId. Fulfill the order only after your server confirms a successful payment. For verification, acknowledgement, idempotency, and query fallback, see Webhooks.

Refunds and disputes

Confirm the refund capabilities, restrictions, and dispute process applicable to your merchant with Onerway. If refunds are enabled, follow Refunds.

Testing and go-live

Confirm the test environment and available Maybank test procedure with Onerway, then follow Sandbox testing:

  1. Test each path you use with IDR and the customer details prepared above. For the Direct API, confirm that the returned redirect opens the provider’s payment page. For Checkout, confirm that the first redirectUrl opens Checkout and that Maybank is available before proceeding to the provider’s page.
  2. Check the payment instructions, order amount, and any displayed deadline on the provider’s page. Complete the agreed bank-payment test and verify the result on your server. Merely obtaining payment details does not pass the successful-payment check.
  3. Test an order for which the customer has not made the bank payment and a return to your site before payment. If a deadline is displayed, also test the agreed expiry handling. Verify query fallback when no notification has arrived and idempotent handling of duplicate notifications.
  4. For go-live acceptance, retain the notification and acknowledgement for the same order. Query the payment status and check that it matches the notification. Check production enablement, notification and return URLs, limits, and validity periods. Test refunds separately if they are enabled.