Skip to main content

Hosted Payment Checkout

Creates a unified payment checkout page for both web and mobile. The customer is redirected to the RM-hosted checkout page to complete payment.

When to Use

Use this endpoint when:

  • Building a web or mobile checkout that supports multiple payment methods
  • You want RM to host the payment UI (no need to build your own)
  • Integrating tokenization or saved cards
note
  • This creates a unified payment checkout page for both web and mobile.
  • The data object must be sorted alphabetically, including nested objects.

How to Use

Endpoint
POST/v3/payment/online
  1. Send order details → receive checkoutId and checkout url
  2. Redirect customer to the url
  3. After payment, customer is redirected to your redirectUrl with status and orderId
  4. Your notifyUrl receives a server-to-server callback on success

Example of Web Payment

Web Payment Example

Example of Mobile Payment

Mobile Payment Example

Request Parameters

storeIdSTRINGrequired

Revenue Monster Store ID

redirectUrlSTRINGrequired

URL to redirect the customer back to after payment.

notifyUrlSTRINGrequired

Server URL to receive payment status callbacks.

layoutVersionSTRINGrequired

Always use "v4".

typeSTRINGrequired

Checkout session type.

methodARRAY

Payment methods to enable. Each item is a payment method identifier.

Example: ["WECHATPAY", "ALIPAY", "FPX"]

orderOBJECTrequired

Order details

idSTRINGrequired

Order ID

titleSTRINGrequired

Order title

currencyTypeSTRINGrequired

Order currency type (currently supported MYR only)

amountINTEGERrequired

Order amount

detailSTRING

Order detail

additionalDataSTRING

Order additional data

customerOBJECT

Customer details

userIdSTRING

Required when tokenization is enabled.

emailSTRING

Customer email address.

countryCodeSTRING

Customer country code.

phoneNumberSTRING

Customer phone number.

Response Parameters

itemOBJECT

Response item

checkoutIdSTRING

Checkout session ID

urlSTRING

Checkout session URL to redirect the customer to

codeSTRING

"SUCCESS" if the request succeeded, otherwise an error code.

errorOBJECT

Error details

codeSTRING

Error code if the request failed.

messageSTRING

Error message.

debugSTRING

Debug message (sandbox only).

Build the Checkout URL

Use the checkoutId from the response to send the customer to the payment page. You can use this URL directly, or wrap it inside a deep link or webview for a custom experience.

Checkout URL
Text
https://sb-pg.revenuemonster.my/v4/checkout?checkoutId=1548316308361173347

When the customer completes payment, RM redirects to your redirectUrl (GET) and, on success, also POSTs to your notifyUrl server-side. See Redirect Response and Notify Response for the payload details.