Skip to main content

Verify Signature

note
  • Verify Signature is used to verify your signature.
info
  • Data object needs to be sorted, the Nested object also needs to be sorted.

Step 1 : Response Parameter

Method : POST

note
  • Refer to which API endpoint you are calling , below response parameter is just an EXAMPLE

Example of Web/Mobile Payment

ParameterTypeDescriptionExample
itemObjectitem object(Refer to explanation below)
codeStringSuccessfully call this endpoint. If fail, will return error code object (Refer Appendix 1: Error Codes)"SUCCESS"

item Object (item):
ParameterTypeDescriptionExample
checkoutIdStringCode to identify web payment url"1617985392758071583"
urlStringExample to form checkout URL. Note: to change base URL to desired URL."https://sb-pg.revenuemonster.my/v2/checkout?checkoutId=1617985392758071583"

Example Response

{
"item": {
"checkoutId": "1617985392758071583",
"url": "https://sb-pg.revenuemonster.my/v2/checkout?checkoutId=1617985392758071583"
},
"code": "SUCCESS"
}
info
  • Sort the above json key alphabetically and make it compact

Step 2 : Encode the data using Base64 format

note

eyJpdGVtIjp7ImNoZWNrb3V0SWQiOiIxNjE3OTg1MzkyNzU4MDcxNTgzIiwidXJsIjoiaHR0cHM6Ly9zYi1wZy5yZXZlbnVlbW9uc3Rlci5teS92Mi9jaGVja291dD9jaGVja291dElkPTE2MTc5ODUzOTI3NTgwNzE1ODMifSwiY29kZSI6IlNVQ0NFU1MifQ==

Step 3: Construct plain text parameters

info
  • if the body is empty then the data parameter can be skip
  • if it's verifying our callback then the requestUrl can be skip
ParameterTypeRequiredDescriptionExample
dataStringYesBase64 data body from Step 2.Refer to Step 2
methodStringYesHTTP call method used"post"
nonceStrStringYesGet from Response Header"VYNknZohxwicZMaWbNdBKUrnrxDtaRhN"
requestUrlStringYesAPI URL that you call must be exactly the same, together with URL.https://sb-open.revenuemonster.my/v3/payment/online
signTypeStringYesSign Type, prefer SHA-256"sha256"
timestampStringYesGet from Response Header"1527407052"

Example

note

data=eyJpdGVtIjp7ImNoZWNrb3V0SWQiOiIxNjE3OTg1MzkyNzU4MDcxNTgzIiwidXJsIjoiaHR0cHM6Ly9zYi1wZy5yZXZlbnVlbW9uc3Rlci5teS92Mi9jaGVja291dD9jaGVja291dElkPTE2MTc5ODUzOTI3NTgwNzE1ODMifSwiY29kZSI6IlNVQ0NFU1MifQ==&method=post&nonceStr=VYNknZohxwicZMaWbNdBKUrnrxDtaRhN&signType=sha256&timestamp=1527407052&requestUrl=https://sb-open.revenuemonster.my/v3/payment/online

info
  • Verify the content string using public key ( Can get From Merchant Portal => Developer => Applications => Server public key)