Online Payment
{% raw %}
/v3/payment/onlineWhat is this?
Online Payment lets businesses accept online payments through web and mobile applications. Customers can enter card details or select an e-wallet to complete payment from their smartphone or website.
Online Payment is an online payment method. Subscription is based on the online subscription rate.
How to Use
Step 1: Create a Checkout Session
Send the order details to this endpoint. You will receive a checkoutId and a checkout url.
Step 2: Redirect the Customer
Redirect the customer to the url returned in the response. They will complete payment on the hosted checkout page.
Step 3: Handle the Redirect
After payment, the customer is redirected to your redirectUrl. The redirect includes status and orderId as query parameters.
Step 4: Receive the Server Notification
Set a notifyUrl to receive a server-to-server callback when payment succeeds. Query the transaction using Query Transaction for full details.
Hosted Payment Checkout
- This creates a unified payment checkout page for both web and mobile.
- The data object must be sorted alphabetically, including nested objects.
Request Parameters
Revenue Monster Store ID
URL to redirect the customer back to after payment.
Server URL to receive payment status callbacks.
Always use "v4".
Checkout session type.
Payment methods to enable.
Order ID
Order title
Order currency type (currently supported MYR only)
Order amount
Order detail
Order additional data
Required when tokenization is enabled.
Customer email address.
Customer country code.
Customer phone number.
Response Parameters
Checkout session ID
Checkout session URL to redirect the customer to
"SUCCESS" if the request succeeded, otherwise an error code.
Error code if the request failed.
Error message.
Debug message (sandbox only).
Individual Payment Checkout
After creating a checkout session, use the checkoutId to build a custom payment experience:
https://sb-pg.revenuemonster.my/v4/checkout?checkoutId=1548316308361173347
Redirect Response
The redirect URL brings the customer back to your page after payment. It can be any URL type (deep link, browser URL, server URL).
Method: GET
| Parameter | Type | Required | Description |
|---|---|---|---|
status | String | Yes | Payment status |
orderId | String | Yes | Payment order ID |
reason | String | No | Payment failure reason |
Notify Response
The notify URL informs your server of the transaction status after a successful payment. Notify is only called on success — failure or refund does not trigger a notify. Query the transaction using Query Transaction for full details.
Method: POST
Notify event type. Always "PAYMENT_WEB_ONLINE".
Store details.
Reference ID.
Transaction ID.
Terminal ID.
Currency type (currently supported MYR only).
Remaining balance for initiating refund.
Amount after deductions (voucher, membership).
Transaction platform.
Transaction type.
Transaction payment method.
Transaction payment region.
Transaction payment status.
Transaction date time (present only when status is SUCCESS).
Transaction created date time.
Transaction last updated date time.
Order ID.
Order title.
Order currency type.
Order amount.
Order detail.
Order additional data.
Query Payment Checkout
Payment checkout is not the same as payment transaction info. Checkout only returns status, amount, and redirectUrl. For full transaction details, query the transaction using Query By Transaction ID with the transactionId from the checkout response.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
checkoutId | QueryParam | Yes | Payment checkout ID |
Response Parameters
"SUCCESS" if the request succeeded.
Error code.
Error message.
Debug message (sandbox only).
Payment checkout ID.
Payment checkout type.
Payment transaction ID. Use this to query the transaction via Query Transaction.
Order ID.
Order title.
Order currency type.
Order amount.
Order detail.
Order additional data.
Payment checkout platform.
Payment checkout available methods.
Payment redirect URL.
Payment notify URL.
Payment checkout start date time.
Payment checkout status.
Payment checkout created date time.
Payment checkout last updated date time.
Direct Payment Checkout
With Direct Payment Checkout, you create a payment page with your own UI design. There are two modes: QR code and URL. URL is preferred in most cases.
Direct Payment Checkout requires polling the Query Payment Checkout API to keep the payment status updated. Without polling, the payment status will not update until our system performs a pre-timeout check. Suggested polling interval is 3 to 5 seconds.
Mode: URL
Request Parameters
Checkout ID from the Hosted Payment Checkout response.
Checkout type. Set to "URL".
Payment method (e.g., ALIPAYPLUS_MY).
1{2 "checkoutId": "1582438693268947023",3 "type": "URL",4 "method": "ALIPAYPLUS_MY"5}
Response Parameters
Checkout session type.
Checkout session URL.
"SUCCESS" if the request succeeded.
Error code.
Error message.
Debug message (sandbox only).
Mode: QR Code
Request Parameters
Checkout ID from the Hosted Payment Checkout response.
Checkout type. Set to "QRCODE".
Payment method (e.g., MAYBANK_MY).
1{2 "checkoutId": "1582438693268947023",3 "type": "QRCODE",4 "method": "MAYBANK_MY"5}
Response Parameters
Checkout session type.
Base64-encoded QR code image.
QR code data string.
"SUCCESS" if the request succeeded.
Error code.
Error message.
Debug message (sandbox only).
Mode: DuitNow QR
Request Parameters
Checkout ID from the Hosted Payment Checkout response.
Checkout type. Set to "DUITNOW_QRCODE".
Leave empty for DuitNow QR.
1{2 "checkoutId": "1687168234460362061",3 "method": "",4 "type": "DUITNOW_QRCODE"5}
Response Parameters
Checkout session type.
Base64-encoded QR code image.
QR code data string.
"SUCCESS" if the request succeeded.
Error code.
Error message.
Debug message (sandbox only).
Mode: Alipay Mini Program
Request Parameters
Checkout ID from the Hosted Payment Checkout response.
Checkout type. Set to "MINI_PROGRAM".
Payment method. Set to "ALIPAY_CN".
1{2 "checkoutId": "1582438693268947023",3 "type": "MINI_PROGRAM",4 "method": "ALIPAY_CN"5}
Response Parameters
Checkout session type.
Base64-encoded data to pass to the mini program API.
"SUCCESS" if the request succeeded.
Error code.
Error message.
Debug message (sandbox only).
Alipay Mini Program Frontend
Use base64 decode on the data parameter and pass the result to the mini program API.
1my.tradePay({2 orderStr: base64Decode(dataParameter),3 success: (res) => { console.log("success", res); },4 fail: (res) => { console.log("error", res); }5});
Mode: WeChat Pay Mini Program
Before starting integration, contact support@revenuemonster.my to bind your "Mini Program App ID / 小程序 App ID" to your account.
Request Parameters
Checkout ID from the Hosted Payment Checkout response.
Checkout type. Set to "MINI_PROGRAM".
Payment method. Set to "WECHATPAY_CN".
WeChat user Open ID.
1{2 "checkoutId": "1582438693268947023",3 "type": "MINI_PROGRAM",4 "method": "WECHATPAY_CN",5 "userId": "oFGqK6w1kZyjDTtNAcOXBDHAa8CY"6}
Response Parameters
Checkout session type.
Base64-encoded data to pass to the mini program API.
"SUCCESS" if the request succeeded.
Error code.
Error message.
Debug message (sandbox only).
WeChat Pay Mini Program Frontend
Use base64 decode on the data parameter and pass the result to the mini program API.
1var base64decoded = base64Decode(dataParameter);2var payload = JSON.parse(base64decoded);3wx.requestPayment({4 ...payload,5 success: function (res) { console.log("success", res); },6 fail: function (res) { console.log("fail", res); },7 complete: function (res) { console.log("complete", res); }8});
Mode: FPX
Method: GET
URL: https://open.revenuemonster.my/v3/payment/fpx-bank
Sandbox URL: https://sb-open.revenuemonster.my/v3/payment/fpx-bank
FPX Bank Codes:
| Code | Name |
|---|---|
| ABB0233:B2C | Affin Bank |
| ABMB0212:B2C | Alliance Bank (Personal) |
| AGRO01:B2C | AGRONet |
| AMBB0209:B2C | AmBank |
| BCBB0235:B2C | CIMB Bank |
| BIMB0340:B2C | Bank Islam |
| BKRM0602:B2C | Bank Rakyat |
| BMMB0341:B2C | Bank Muamalat |
| BSN0601:B2C | Bank Simpanan Nasional |
| HLB0224:B2C | Hong Leong Bank |
| HSBC0223:B2C | HSBC |
| KFH0346:B2C | Kuwait Finance House |
| MB2U0227:B2C | Maybank2U |
| MBB0228:B2C | Maybank2E |
| OCBC0229:B2C | OCBC |
| PBB0233:B2C | Public Bank |
| RHB0218:B2C | RHB Bank |
| SCB0216:B2C | Standard Chartered Bank |
| UOB0226:B2C | United Oversea Bank |
Request Parameters
Checkout ID from the Hosted Payment Checkout response.
Checkout type. Set to "URL".
Payment method. Set to "FPX_MY".
FPX bank code from the table above.
1{2 "checkoutId": "1687166508263303064",3 "method": "FPX_MY",4 "type": "URL",5 "fpx": {6 "bankCode": "TEST0021"7 }8}
Response Parameters
Checkout session type.
FPX payment URL to redirect the customer to.
"SUCCESS" if the request succeeded.
Error code.
Error message.
Debug message (sandbox only).
Mode: GoBiz / Paydee / Mastercard
Request Parameters
Checkout ID from the Hosted Payment Checkout response.
Checkout type. Set to "URL".
Payment method (e.g., MASTERCARD_MY, GOBIZ_MY).
GoBiz payment type.
1{2 "checkoutId": "1687168234460362061",3 "method": "MASTERCARD_MY",4 "type": "URL"5}
Response Parameters
Checkout session type.
Payment URL.
"SUCCESS" if the request succeeded.
Error code.
Error message.
Debug message (sandbox only).
{% endraw %}