Skip to main content

Online Payment

Online payment allow business to accept online payments through our web applications. With Revenue Monster's Online Payment, customer can enter payment details or select e-wallet options to complete the payment process from their smartphones and website.

info

Online payment is an online payment method and it's subscription will based on online subscription rate.


Example of Web Payment

image

Example of Mobile Payment

Hosted Payment Checkout

Method : POST
URL : https://open.revenuemonster.my/v3/payment/online
Sandbox URL : https://sb-open.revenuemonster.my/v3/payment/online

note
  • To create a unified payment checkout page for your website and mobile.
  • Data object needs to be sorted, the Nested object also needs to be sorted.

Request Parameters

ParameterTypeValidationRequiredDescription
storeIdStringYesStore ID
redirectUrlStringURLYesExample of Redirect URL Response
notifyUrlStringURLYesExample of Notify URL Response
layoutVersionStringENUM("v1", "v2", "v3", "v4")Yes
typeStringENUM("WEB_PAYMENT", "MOBILE_PAYMENT")YesCheckout session type
method[]StringNoPayment methods
order.idStringLength(24)YesOrder ID
order.titleStringLength(32)YesOrder Title
order.currencyTypeStringENUM("MYR")YesOrder Currency Type ( currently supported MYR only)
order.amountUint64YesOrder Amount
order.detailStringLength(600)NoOrder Detail
order.additionalDataStringLength(128)NoOrder Additional Data
customer.userIdStringConditionalRequired when the tokenization is enabled
customer.emailStringNo
customer.countryCodeStringNo
customer.phoneNumberStringNo

Response Parameters

ParameterTypeValidationDescription
item.checkoutIdStringCheckout session id
item.urlStringCheckout session url
codeStringENUM("SUCCESS")Determine request have success
error.codeStringError code
error.messageStringError message
error.debugStringDebug message ( sandbox only )

Advance: Individual Payment Checkout

After you have the checkout session url from the checkout api.

Example: https://sb-pg.revenuemonster.my/v4/checkout?checkoutId=1548316308361173347

Redirect Response

info

Redirect URL to redirect your customer back to your page after payment, it's can be any of the URL ( deeplink, browser url, server url ) as long as the browser itself can go and process.

Method : GET

ParameterTypeValidationRequiredDescription
statusStringEnum("SUCCESS", "FAILED", "CANCELLED", "EXPIRED")YesPayment Status
orderIdStringYesPayment Order ID
reasonStringNoPayment fail reason

Notify Response

info

Notify URL or Callback URL to inform server on transaction status after payment made.

Notify will call only when the transaction is success, fail and refund will not fired a notify to your server. We suggest you to do a query transaction to get full transaction info if you need full info, for notify will only response the partial transaction info.

Reference: Query Transaction

Method : POST

ParameterTypeValidationRequiredDescription
eventTypeENUM("PAYMENT_WEB_ONLINE")YesNotify event type
data.storeJSONTransaction Object: StoreNoStore details
data.referenceIdStringNoReference ID
data.transactionIdStringYesTransaction ID
data.terminalIdStringNoTerminal ID
data.currencyTypeStringENUM("MYR")YesCurrency Type ( currently supported MYR only)
data.balanceAmountUint64YesRemaining balance amount for initiate refund
data.finalAmountUint64YesAmount after all deductions ( voucher, membership)
data.platformStringENUM("TERMINAL", "MOBILE_APP", "OPEN_API", "WEB_LOYALTY")YesTransaction platform
data.typeStringAppendix: TypeYesTransaction type
data.methodStringAppendix: MethodYesTransaction payment method
data.regionStringAppendix: RegionYesTransaction pament region
data.statusStringAppendix: StatusYesTransaction payment status
data.transactionAtStringRFC3339NoTransaction payment date time ( exists only when SUCCESS )
data.createdAtStringRFC3339YesTransaction created date time
data.updatedAtStringRFC3339YesTransaction last updated date time
data.payee.userIdStringNoPayment provider user id
data.payee.subUserIdStringNoPayment provider sub user id
data.order.idStringYesOrder ID
data.order.titleStringLength(32)YesOrder Title
data.order.currencyTypeStringENUM("MYR")YesOrder Currency Type ( currently supported MYR only)
data.order.amountUint64YesOrder Amount
data.order.detailStringLength(600)NoOrder Detail
data.order.additionalDataStringLength(128)NoOrder Additional Data

Query Payment Checkout

caution

Please note that payment checkout isn't the payment transaction info, while payment checkout will only return the checkout information like status, amount, redirectUrl but for more information about the success payment checkout transaction you can query transcation using Query By Transaction ID with the response of this API transactionId.

Method : GET
URL : https://open.revenuemonster.my/v3/payment/online?checkoutId={checkoutId}
Sandbox URL : https://sb-open.revenuemonster.my/v3/payment/online?checkoutId={checkoutId}

Request Parameters

ParameterTypeValidationDescription
checkoutIdQueryParamYesPayment checkout id

Response Paramters

ParameterTypeValidationDescription
codeStringENUM("SUCCESS")Determine request have success
error.codeStringError code
error.messageStringError message
error.debugStringDebug message ( sandbox only )
item.idStringPayment checkout id
item.typeStringENUM("WEB_PAYMENT", "WEB_MOBILE_PAYMENT", "MOBILE_PAYMENT")Payment checkout type
item.transactionIdStringPayment transaction id, you can query transaction using Query Transaction
item.order.idStringLength(24)Order ID
item.order.titleStringLength(32)Order Title
item.order.currencyTypeStringENUM("MYR")Order Currency Type ( currently supported MYR only)
item.order.amountUint64Order Amount
item.order.detailStringLength(600)Order Detail
item.order.additionalDataStringLength(128)Order Additional Data
item.platformStringENUM("OPEN_API")Payment checkout platform
item.methodStringAppendix: MethodPayment checkout available methods
item.redirectUrlStringURLPayment redirect url including cancel and fail
item.notifyUrlStringURLPayment notify url
item.startAtStringRFC3339Payment checkout start date time
item.statusStringENUM("SUCCESS", "FAILED", "CANCELLED", "EXPIRED")Payment checkout status
item.createdAtStringRFC3339Payment checkout created date time
item.updatedAtStringRFC3339Payment checkout last updated date time

Direct Payment Checkout

Method : POST
URL : https://open.revenuemonster.my/v3/payment/online/checkout
Sandbox URL : https://sb-open.revenuemonster.my/v3/payment/online/checkout

note
  • With this you can create payment checkout with your own ui design page
  • There's two mode qrcode & url, most of the times URL is preferred over QRCode
  • For assets information you may take from Github. :::

Please note that direct payment checkout is required you to perform API call to let us know that your payment checkout is still active. So the API call for Query Payment Checkout is required else the payment status will not keep updated until our system perform a pre-timeout check. Suggested API interval check will be 3 to 5 seconds or even longer based on your use cases. :::

Mode: URL

Request Parameters

ParameterTypeValidationRequiredDescription
checkoutIdStringYesCheckout ID
typeStringENUM("URL")YesCheckout type url
methodStringAppendix: MethodYesCheckout method
Example Request
{
"checkoutId": "1582438693268947023",
"type": "URL",
"method": "ALIPAYPLUS_MY"
}

Response Paramters

ParameterTypeValidationDescription
item.typeStringENUM("URL")Checkout session type
item.urlStringCheckout session url
codeStringENUM("SUCCESS")Determine request have success
error.codeStringError code
error.messageStringError message
error.debugStringDebug message ( sandbox only )

Mode: QRCode

Decode your Image using Base64
Using qrCodeImageBase64 URL to generate a QR Code
What user will receive
Once user scan the QR Code it will display

Request Parameters

ParameterTypeValidationRequiredDescription
checkoutIdStringYesCheckout ID
typeStringENUM("QRCODE")YesCheckout type qrcode
methodStringAppendix: MethodYesCheckout method
Example Request
{
"checkoutId": "1582438693268947023",
"type": "QRCODE",
"method": "MAYBANK_MY"
}

Response Paramters

ParameterTypeValidationDescription
item.typeStringENUM("QRCODE")Checkout session type
item.qrcode.base64ImageString
item.qrcode.dataString
codeStringENUM("SUCCESS")Determine request have success
error.codeStringError code
error.messageStringError message
error.debugStringDebug message ( sandbox only )

Mode: DuitNow QR

Request Parameters

ParameterTypeValidationRequiredDescription
checkoutIdStringYesCheckout ID
typeStringENUM("DUITNOW_QRCODE")YesCheckout type qrcode
methodStringENUM("MAYBANK_MY")YesCheckout method
Example Request
{
"checkoutId": "1687168234460362061",
"method": "MAYBANK_MY",
"type": "DUITNOW_QRCODE"
}

Response Paramters

ParameterTypeValidationDescription
item.typeStringENUM("QRCODE")Checkout session type
item.qrcode.base64ImageString
item.qrcode.dataString
codeStringENUM("SUCCESS")Determine request have success
error.codeStringError code
error.messageStringError message
error.debugStringDebug message ( sandbox only )

Mode: Alipay Mini Program

Request Parameters

ParameterTypeValidationRequiredDescription
checkoutIdStringYesCheckout ID
typeStringENUM("MINI_PROGRAM")YesCheckout type qrcode
methodStringAppendix: MethodYesCheckout method
Example Request
{
"checkoutId": "1582438693268947023",
"type": "MINI_PROGRAM",
"method": "ALIPAY_CN"
}

Response Paramters

ParameterTypeValidationDescription
item.typeStringENUM("MINI_PROGRAM")Checkout session type
item.dataStringBase64 encoded data for pass to mini program
codeStringENUM("SUCCESS")Determine request have success
error.codeStringError code
error.messageStringError message
error.debugStringDebug message ( sandbox only )

Alipay Mini Program Frontend

note

Use base64 decode data paramter, and pass into mini program api.

my.tradePay({
orderStr: <
< decoded base64 from url parameter >>,
success
:
(res) => {
console.log("success", res)
},
fail
:
(res) => {
console.log("error", res)
},
})
;

Mode: WechatPay Mini Program

note

Before start integration, you will need contact us via support@revenuemonster.my and inform us to bind your "Mini Program App ID / 小程序 App ID" to your account once binded then we will inform you and can proceed with the developmen.

Request Parameters

ParameterTypeValidationRequiredDescription
checkoutIdStringYesCheckout ID
typeStringENUM("MINI_PROGRAM")YesCheckout type qrcode
methodStringAppendix: MethodYesCheckout method
userIdStringYesWechat User Open ID
Example Request
{
"checkoutId": "1582438693268947023",
"type": "MINI_PROGRAM",
"method": "WECHATPAY_CN",
"userId": "oFGqK6w1kZyjDTtNAcOXBDHAa8CY"
}

Response Paramters

ParameterTypeValidationDescription
item.typeStringENUM("MINI_PROGRAM")Checkout session type
item.dataStringBase64 encoded data for pass to mini program
codeStringENUM("SUCCESS")Determine request have success
error.codeStringError code
error.messageStringError message
error.debugStringDebug message ( sandbox only )

WechatPay Mini Program Frontend

note

Use base64 decode data paramter, and pass into mini program api.

var base64decoded = "<< decoded base64 from url parameter >>";
var payload = JSON.parse(base64decoded);
wx.requestPayment({
...payload,
'success': function (res) {
console.log("success", res)
},
'fail': function (res) {
console.log("fail", res)
},
'complete': function (res) {
console.log("complete", res)
}
});

Mode: FPX

FPX Bank Codes via API
Method : GET
URL : https://open.revenuemonster.my/v3/payment/fpx-bank
Sandbox URL : https://sb-open.revenuemonster.my/v3/payment/fpx-bank

{
"item": {
"ABB0233:B2C": {
"code": "ABB0233:B2C",
"isOnline": true,
"name": "Affin Bank"
},
"ABMB0212:B2C": {
"code": "ABMB0212:B2C",
"isOnline": true,
"name": "Alliance Bank (Personal)"
},
"AGRO01:B2C": {
"code": "AGRO01:B2C",
"isOnline": true,
"name": "AGRONet"
},
"AMBB0209:B2C": {
"code": "AMBB0209:B2C",
"isOnline": true,
"name": "AmBank"
},
"BCBB0235:B2C": {
"code": "BCBB0235:B2C",
"isOnline": true,
"name": "CIMB Bank"
},
"BIMB0340:B2C": {
"code": "BIMB0340:B2C",
"isOnline": true,
"name": "Bank Islam"
},
"BKRM0602:B2C": {
"code": "BKRM0602:B2C",
"isOnline": true,
"name": "Bank Rakyat"
},
"BMMB0341:B2C": {
"code": "BMMB0341:B2C",
"isOnline": true,
"name": "Bank Muamalat"
},
"BSN0601:B2C": {
"code": "BSN0601:B2C",
"isOnline": true,
"name": "Bank Simpanan Nasional"
},
"HLB0224:B2C": {
"code": "HLB0224:B2C",
"isOnline": true,
"name": "Hong Leong Bank"
},
"HSBC0223:B2C": {
"code": "HSBC0223:B2C",
"isOnline": true,
"name": "HSBC"
},
"KFH0346:B2C": {
"code": "KFH0346:B2C",
"isOnline": true,
"name": "Kuwait Finance House"
},
"MB2U0227:B2C": {
"code": "MB2U0227:B2C",
"isOnline": true,
"name": "Maybank2U"
},
"MBB0228:B2C": {
"code": "MBB0228:B2C",
"isOnline": true,
"name": "Maybank2E"
},
"OCBC0229:B2C": {
"code": "OCBC0229:B2C",
"isOnline": true,
"name": "OCBC"
},
"PBB0233:B2C": {
"code": "PBB0233:B2C",
"isOnline": true,
"name": "Public Bank"
},
"RHB0218:B2C": {
"code": "RHB0218:B2C",
"isOnline": true,
"name": "RHB Bank"
},
"SCB0216:B2C": {
"code": "SCB0216:B2C",
"isOnline": true,
"name": "Standard Chartered Bank"
},
"UOB0226:B2C": {
"code": "UOB0226:B2C",
"isOnline": true,
"name": "United Oversea Bank"
}
},
"code": "SUCCESS"
}
FPX Bank Codes
CodeName
ABB0233:B2CAffin Bank
ABMB0212:B2CAlliance Bank (Personal)
AGRO01:B2CAGRONet
AMBB0209:B2CAmBank
BCBB0235:B2CCIMB Bank
BIMB0340:B2CBank Islam
BKRM0602:B2CBank Rakyat
BMMB0341:B2CBank Muamalat
BSN0601:B2CBank Simpanan Nasional
HLB0224:B2CHong Leong Bank
HSBC0223:B2CHSBC
KFH0346:B2CKuwait Finance House
MB2U0227:B2CMaybank2U
MBB0228:B2CMaybank2E
OCBC0229:B2COCBC
PBB0233:B2CPublic Bank
RHB0218:B2CRHB Bank
SCB0216:B2CStandard Chartered Bank
UOB0226:B2CUnited Oversea Bank

Request Parameters

ParameterTypeValidationRequiredDescription
checkoutIdStringYesCheckout ID
typeStringENUM("URL")YesCheckout type qrcode
methodStringENUM("FPX_MY")YesCheckout method
fpx.bankCodeStringYesFPX Bank code
Example Request
{
"checkoutId": "1687166508263303064",
"method": "FPX_MY",
"type": "URL",
"fpx": {
"bankCode": "TEST0021"
}
}

Response Paramters

ParameterTypeValidationDescription
item.typeStringENUM("QRCODE")Checkout session type
item.urlStringFPX Payment URL
codeStringENUM("SUCCESS")Determine request have success
error.codeStringError code
error.messageStringError message
error.debugStringDebug message ( sandbox only )

Mode: GoBiz / Paydee

Request Parameters

ParameterTypeValidationRequiredDescription
checkoutIdStringYesCheckout ID
typeStringENUM("URL")YesCheckout type qrcode
methodStringENUM("GOBIZ_MY", "PAYDEE_MY")YesCheckout method
gobiz.typeStringENUM("UNIVERSAL_PAYMENT")YesGoBiz Payment Type
Example Request
{
"checkoutId": "1687168234460362061",
"method": "GOBIZ_MY",
"type": "URL",
"gobiz": {
"type": "UNIVERSAL_PAYMENT"
}
}

Response Paramters

ParameterTypeValidationDescription
item.typeStringENUM("URL")Checkout session type
item.urlStringGoBiz Payment URL
codeStringENUM("SUCCESS")Determine request have success
error.codeStringError code
error.messageStringError message
error.debugStringDebug message ( sandbox only )