Skip to main content

Transaction QR

note
  • Display a QR code for user to scan and pay

  • Transaction QR Sequence Diagram

Example of Create Transaction QR


Step 1 : Create a QR Code

Get the QR Code URL qrCodeUrl from the response endpoint

Example of QR Code URL: https://dev-rm-api.ap.ngrok.io/payment/unified?code=a669adc3b06fe5cef977cc762f40ce8c

Step 2 : User Fill Amount / PreFill Amount

If "isPreFillAmount": false, user will be prompted to key-in amount for payment.


If "isPreFillAmount": true, user will be directly prompted for payment.

Step 3 : Insert Pin

Step 4 : User will receive a payment status notification

Step 5 : Redirect to Merchant Page

After payment is complete, the user will be redirected to a URL link set at redirectUrl.

Step 6 : Payment History

Users can view their transaction history in their own wallet application

Step 7 : Merchants can view their transaction record in Merchant Portal

After payment is complete, merchants can view their transaction in Merchant Portal.


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

note

To create Static/Dynamic QR code for user scanning merchant's display QR.

Request Parameters

ParameterTypeRequiredDescriptionExample
amountUintYesAmount of order in cent. Only required when "isPrefillAmount" = true. (min RM 0.10 or amount: 10)100
currencyTypeStringYesCurrency notation (currently only support MYR)"MYR"
method[]StringNoRM currently supported method["WECHATPAY_CN","WECHATPAY_MY",
"BOOST_MY","ALIPAY_CN",
"PRESTO_MY" ]
expiryObjectNoObject of expiry(Refer to explanation below)
orderObjectYesObject of order(Refer to explanation below)
redirectUrlStringNoURL to redirect after payment is made. Default is ""."https://www.apple.com/my/iphone/"
typeStringYes"STATIC" (for permanent use) or "DYNAMIC" (for one-time use)"STATIC"
storeIdStringYesID of the store to create QR code"10946114768247530"
isPreFillAmountBoolNoTo indicate QR code has pre-fill amount. Default is false. (i.e. Amount will be shown directly on user's wallet without keying-in)true

Expiry object (expiry):
ParameterTypeRequiredDescriptionExample
typeStringYes"DYNAMIC" (days from now), "FIX" (specific fixed date) or "PERMANENT" (never expire)"PERMANENT"
dayUintNoOnly required by "DYNAMIC" expiry type. To indicate number of days from now until expiry.3
expiredAtDateTimeNoOnly required by "FIXED". To indicate specific expiry date."2020-10-07T17:44:26.679908+08:00"

Order object (order):
ParameterTypeRequiredDescriptionExample
detailStringYesOrder details, max: 600"1 x iPhone X; 2 x SAMSUNG S8"
titleStringYesOrder title, max: 32"Sales"
additionalDataStringYesOrder additional data, max: 128"Sales for customer xxx at branch xxx."

Example Request

curl --location --request POST "https://sb-open.revenuemonster.my/v3/payment/transaction/qrcode" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjIwMTgtMDMtMTMiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOlsiKiJdLCJleHAiOjE1MjE2MjkyNTYsImlhdCI6MTUyMTYyMjA1NywiaXNzIjoiaHR0cHM6Ly9zYi1vYXV0aC5yZXZlbnVlbW9uc3Rlci5teSIsImp0aSI6IkVod0tFRTlCZFhSb1FXTmpaWE56Vkc5clpXNFF5cmYza3EzTDY4QnoiLCJuYmYiOjE1MjE2MjIwNTcsInN1YiI6IkVoUUtDRTFsY21Ob1lXNTBFSlhWemQzd3JhcVRPUklRQ2dSVmMyVnlFSXlKcUl6dnlNUFZjUSJ9.dJknY9MZHLNrKx1p7gZxS0_oA3uXLWplDU1r1dpwxIbmdB6yw4tQBTXKlWArDfKLlBDn6v22_gT5Px7sdCMj7e5M9eRoJoMnoPnslgYpmJJ5kjqAbKU7dUxKb1OzFLrvmtSK9r-FRLVtMFHioWYpwgSvSPBgZ6lAYkUyDzH7aKadFYtQcBuJR0hlq2CXtP0mzbHOeu2q6giONf3E5-XqS8lLRtuHPAbJ7_YFwo0Oe2zc6h05IOocmx_NvBVPfDBnuygTU063h70Q987MYeGDV_Os4N6N_I4b-GoHprEPtmntB1RJPrFrY28hvvoUfDHXHZVXT1GlrsozrkWV4EjbTw" \
--header "X-Signature: sha256 pLZz2vnRYHKPUd28gz+f3gIPimH+dHu1xNZqBqlNVQFOdDY1UPpA8S9lIHb4vUhQlEqLS/jJp4zETKA0q4qIlA==" \
--header "X-Nonce-Str: mpnbwsaizkwaykemxfolmmhvyzvrgnnh" \
--header "X-Timestamp: 15347569119413" \
--data "{\"amount\":100,\"currencyType\":\"MYR\",\"expiry\":{\"type\":\"PERMANENT\"},\"isPreFillAmount\":true,\"method\": [\"WECHATPAY\"],\"order\":{\"detail\":\"detail\",\"title\":\"title\"},\"redirectUrl\":\"https://www.baidu.com/\",\"storeId\":\"10946114768247530\",\"type\":\"DYNAMIC\"}"

Response Parameters

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

Transaction object (item):
ParameterTypeDescriptionExample
storeObjectStore object(Refer to explanation below)
typeString"DYNAMIC" (days from now), "FIXED" (specific fixed date) or "PERMANENT" (never expire)"PERMANENT"
isPreFillAmountBoolTo indicate QR code has pre-fill amounttrue
currencyTypeStringCurrency notation"MYR"
amountUintAmount of order in cent. Only required when "isPrefillAmount" = true.100
platformStringCurrently only support "OPEN_API""OPEN_API"
method[]StringRM currently supported method["WECHATPAY_CN","WECHATPAY_MY",
"BOOST_MY","ALIPAY_CN",
"PRESTO_MY"]
expiryObjectObject of expiry(Refer to explanation above)
codeStringEmbedded code in QR"c8ff3df0605a5f20cd6476661072eade"
statusString"VALID" (always valid for static QR) or "REDEEMED" (only applicable to dynamic QR)"VALID"
qrCodeUrlStringEmbedded URL in QR"https://dev-rm-api.ap.ngrok.io/payment/unified?code=c8ff3df0605a5f20cd6476661072eade"
redirectUrlStringRedirect URL after QR payment is made"https://www.apple.com/my/iphone/"
orderObjectOrder object(Refer to explanation below)
createdAtDateTimeCreation date time of transaction"2018-03-21T06:41:22Z"
updatedAtDateTimeLast update date time of transaction"2018-03-21T06:41:22Z"

Store object (store):
ParameterTypeDescriptionExample
idStringStore ID"6170506694335521334"
nameStringStore Name"REVENUE MONSTER"
addressLine1StringStore Address 1"B-5-30, 5th Floor, Block Bougainvillea,"
addressLine2StringStore Address 2"PJU 6A, Lebuhraya SPRINT, 10 Boulevard,"
postCodeStringPostcode of store"47400"
cityStringCity of store"Petaling Jaya"
stateStringState of store"Selangor"
countryStringCountry of store"Malaysia"
countryCodeStringCountry code of store contact number"60"
phoneNumberStringPhone number of store"377334080"
geoLocationObject of [Float]Geo Location (latitude and longtitude) of store{"latitude": 3.1349857, "longitude": 101.6136659 }
statusStringCurrent status of store"ACTIVE"
createdAtDateTimeCreation date time of store"2018-02-12T08:53:13Z"
updatedAtDateTimeLast update date time of store"2018-02-12T08:53:13Z"

Expiry object (expiry):
ParameterTypeDescriptionExample
typeString"DYNAMIC" (days from now), "FIX" (specific fixed date) or "PERMANENT" (never expire)"PERMANENT"
dayUintOnly required by "DYNAMIC" expiry type. To indicate number of days from now until expiry.3
expiredAtDateTimeOnly required by "FIXED". To indicate specific expiry date."2020-10-07T17:44:26.679908+08:00"

Order object (order):
ParameterTypeDescriptionExample
detailsStringOrder details, max: 600"1 x iPhone X; 2 x SAMSUNG S8"
titleStringOrder title, max: 32"Sales"
additionalDataStringOrder additional data, max: 128"Sales for customer xxx at branch xxx."

Example Response

{
"item": {
"store": {
"id": "10946114768247530",
"name": "One Utama",
"addressLine1": "ANYTHING",
"addressLine2": "",
"postCode": "48484",
"city": "KUALA LUMPUR",
"state": "W.P. KUALA LUMPUR",
"country": "MALAYSIA",
"countryCode": "60",
"phoneNumber": "12312341234",
"geoLocation": {
"latitude": 0,
"longitude": 0
},
"status": "ACTIVE",
"createdAt": "2018-06-03T08:53:48Z",
"updatedAt": "2018-06-03T08:53:48Z"
},
"type": "DYNAMIC",
"isPreFillAmount": true,
"currencyType": "MYR",
"amount": 100,
"platform": "OPEN_API",
"method": ["WECHATPAY"],
"expiry": {
"type": "PERMANENT",
"day": 0,
"expiredAt": "2050-12-31T23:59:59Z"
},
"code": "237fff27513b29ddd364e595d6c2eaf2",
"status": "VALID",
"qrCodeUrl": "https://sb-api.revenuemonster.my/payment/unified?code=237fff27513b29ddd364e595d6c2eaf2",
"redirectUrl": "https://www.baidu.com/",
"order": {
"title": "title",
"detail": "detail"
},
"createdAt": "2018-08-20T09:27:47.68849666Z",
"updatedAt": "2018-08-20T09:27:47.688496777Z"
},
"code": "SUCCESS"
}
note

If you don't receive any response please ingestion Query Status By Order ID