Skip to main content

Refund

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

note

Refund returns funds to the customer before settlement.
(Before money is settled with the merchant.)

Example of Refund

Request Parameters

ParameterTypeRequiredDescriptionExample
transactionIdStringYesTransaction ID generated from Revenue Monster."180730103903010431152179"
refundObjectYesObject of refund(Refer to explanation below)
reasonStringYesRefund reason"Wrong Item"

Refund object (refund):
ParameterTypeRequiredDescriptionExample
typeStringYesFully or partial refund. "FULL" or "PARTIAL""FULL"
currencyTypeStringYesCurrency notation (currently only support MYR)"MYR"
amountUintYesAmount of order in cent100

Example Request

curl --location --request POST "https://sb-open.revenuemonster.my/v3/payment/refund" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjIwMTgtMDMtMTMiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOlsiKiJdLCJleHAiOjE1MjE2MjkyNTYsImlhdCI6MTUyMTYyMjA1NywiaXNzIjoiaHR0cHM6Ly9zYi1vYXV0aC5yZXZlbnVlbW9uc3Rlci5teSIsImp0aSI6IkVod0tFRTlCZFhSb1FXTmpaWE56Vkc5clpXNFF5cmYza3EzTDY4QnoiLCJuYmYiOjE1MjE2MjIwNTcsInN1YiI6IkVoUUtDRTFsY21Ob1lXNTBFSlhWemQzd3JhcVRPUklRQ2dSVmMyVnlFSXlKcUl6dnlNUFZjUSJ9.dJknY9MZHLNrKx1p7gZxS0_oA3uXLWplDU1r1dpwxIbmdB6yw4tQBTXKlWArDfKLlBDn6v22_gT5Px7sdCMj7e5M9eRoJoMnoPnslgYpmJJ5kjqAbKU7dUxKb1OzFLrvmtSK9r-FRLVtMFHioWYpwgSvSPBgZ6lAYkUyDzH7aKadFYtQcBuJR0hlq2CXtP0mzbHOeu2q6giONf3E5-XqS8lLRtuHPAbJ7_YFwo0Oe2zc6h05IOocmx_NvBVPfDBnuygTU063h70Q987MYeGDV_Os4N6N_I4b-GoHprEPtmntB1RJPrFrY28hvvoUfDHXHZVXT1GlrsozrkWV4EjbTw" \
--header "X-Signature: sha256 ZtQhyfkgMLY2FCxQeVQPljczzijPoC7zWH087erdAm1h2x2A0B+GQ9Fk89VbvMB9400m8SFBDRz5XgEVaqPh7Q==" \
--header "X-Nonce-Str: VYNknZohxwicZMaWbNdBKUrnrxDtaRhN" \
--header "X-Timestamp: 1527407052" \
--data "{
\"transactionId\": \"180730103903010431152179\",
\"refund\": {
\"type\": \"FULL\",
\"currencyType\": \"MYR\",
\"amount\": 100
},
\"reason\": \"test\"
}"

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)
referenceIdStringTransaction ID (from WeChat server)""
transactionIdStringTransaction ID (from RM server)"152161448229438994"
terminalIdStringID of terminal for payment"19382734937293"
currencyTypeStringCurrency notation"MYR"
balanceAmountUintSales Amount123
orderObjectOrder object(Refer to explanation below)
payeeObjectObject of userID made payment (payment sender){"userId": "o74f0wjjzv9eKRu1fccrZswVFnOQ"}
platformStringCurrently only support "OPEN_API""OPEN_API"
methodStringRM currently supported methodALL
typeStringCurrently only support "QUICKPAY""QUICKPAY"
statusStringStatus returned from WeChat server"SUCCESS"
regionStringRegion of wallet, "MALAYSIA" or "CHINA""MALAYSIA"
transactionAtDateTimeTransaction date time (from wallet server)"2018-08-02T09:34:53Z"
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"

Order object (order):
ParameterTypeDescriptionExample
idStringOrder ID (from Merchant), max: 24"134850717797247290"
titleStringOrder title, max: 32"Sales"
detailStringOrder details, max: 600"1 x iPhone X; 2 x SAMSUNG S8"
amountUintAmount of order in cent100

Example Response

{
"item": {
"store": {
"id": "10946114768247530",
"name": "One Utama",
"addressLine1": "200, ABCD",
"addressLine2": "",
"postCode": "48482",
"city": "AMPANG",
"state": "W.P. KUALA LUMPUR",
"country": "MALAYSIA",
"countryCode": "60",
"phoneNumber": "12312341234",
"geoLocation": {
"latitude": 0,
"longitude": 0
},
"status": "ACTIVE",
"createdAt": "2018-06-28T03:24:52Z",
"updatedAt": "2018-06-28T03:24:52Z"
},
"referenceId": "1010014200000026201807306110047703",
"transactionId": "180730103903010431152179",
"order": {
"id": "12344333233414",
"title": "title",
"detail": "desc",
"amount": 100
},
"terminalId": "19382734937293",
"payee": {
"userId": "o74f0wsssZBWis4rJWyDCWmEF-ig"
},
"currencyType": "MYR",
"balanceAmount": 0,
"platform": "OPEN_API",
"method": "WECHATPAY",
"transactionAt": "2018-07-30T10:39:06Z",
"type": "QUICK_PAY",
"status": "FULL_REFUNDED",
"region": "MALAYSIA",
"createdAt": "2018-07-30T10:39:03Z",
"updatedAt": "2018-07-30T10:39:37.462943554Z"
},
"code": "SUCCESS"
}