Spending Loyalty Point
Award spending-loyalty points to a member based on a sales amount. Uses the merchant's loyalty point rules to compute the reward.
When to Use
▾
Use this endpoint when:
- Awarding points proportional to spend after a non-auto-give payment
- Implementing manual loyalty-point awarding for non-WeChat wallets
Only WeChat Pay + WeChat OA loyalty program supports auto-give points during payment. All other wallets DO NOT support auto-give points. Use the merchant app / terminal app or this endpoint to award points manually for each payment.
How to Use
▾
/v3/loyalty/spending-rewardPOST to /v3/loyalty/spending-reward with currencyType, amount, and the member identifier.
Request Parameters
▾
Currently MYR only
Example: MYR
Transaction amount to calculate loyalty points earned.
Example: 100
"ID" ,"PHONENUMBER" or "QRCODE"
Example: Use phone number , ID or QR Code to give loyalty point(s).
Member ID if type "ID" being provided.
Example: "2777058682717858418"
Country code if type "PHONENUMBER" being provided.
Example: "60"
Phone number if type "PHONENUMBER" being provided.
Example: "172826990"
1curl --location --request POST "{{open_base_path}}/v3/loyalty/spending-reward" \2--header "Content-Type: application/json" \3--header "Authorization: Bearer {{clientToken}}" \4--header "X-Signature: sha256 Sty3LNcKA8+WlMHtAgIY+y1xbwnzKsN0UdyKaW+yYIgcTkBAtF7G5Lx251qQITURJ4wiXPDODxhs1nFVmBBing==" \5--header "X-Nonce-Str: VYNknZohxwicZMaWbNdBKUrnrxDtaRhN" \6--header "X-Timestamp: 1528450585" \7--data "{8 \"currencyType\": \"MYR\",9 \"amount\": 100,10 \"type\": \"PHONENUMBER\",11 \"countryCode\": \"60\",12 \"phoneNumber\": \"176473298\"13}"
1curl --location --request POST "{{open_base_path}}/v3/loyalty/spending-reward" \2--header "Content-Type: application/json" \3--header "Authorization: Bearer {{clientToken}}" \4--header "X-Signature: sha256 Sty3LNcKA8+WlMHtAgIY+y1xbwnzKsN0UdyKaW+yYIgcTkBAtF7G5Lx251qQITURJ4wiXPDODxhs1nFVmBBing==" \5--header "X-Nonce-Str: VYNknZohxwicZMaWbNdBKUrnrxDtaRhN" \6--header "X-Timestamp: 1528450585" \7--data "{8 \"currencyType\": \"MYR\",9 \"amount\": 100,10 \"type\": \"QRCODE\"11}"
1curl --location --request POST "https://sb-open.revenuemonster.my/v3/loyalty/spending-reward" \2--header "Content-Type: application/json" \3--header "Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjIwMTgtMDMtMTMiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOlsiKiJdLCJleHAiOjE1MjE2MjkyNTYsImlhdCI6MTUyMTYyMjA1NywiaXNzIjoiaHR0cHM6Ly9zYi1vYXV0aC5yZXZlbnVlbW9uc3Rlci5teSIsImp0aSI6IkVod0tFRTlCZFhSb1FXTmpaWE56Vkc5clpXNFF5cmYza3EzTDY4QnoiLCJuYmYiOjE1MjE2MjIwNTcsInN1YiI6IkVoUUtDRTFsY21Ob1lXNTBFSlhWemQzd3JhcVRPUklRQ2dSVmMyVnlFSXlKcUl6dnlNUFZjUSJ9.dJknY9MZHLNrKx1p7gZxS0_oA3uXLWplDU1r1dpwxIbmdB6yw4tQBTXKlWArDfKLlBDn6v22_gT5Px7sdCMj7e5M9eRoJoMnoPnslgYpmJJ5kjqAbKU7dUxKb1OzFLrvmtSK9r-FRLVtMFHioWYpwgSvSPBgZ6lAYkUyDzH7aKadFYtQcBuJR0hlq2CXtP0mzbHOeu2q6giONf3E5-XqS8lLRtuHPAbJ7_YFwo0Oe2zc6h05IOocmx_NvBVPfDBnuygTU063h70Q987MYeGDV_Os4N6N_I4b-GoHprEPtmntB1RJPrFrY28hvvoUfDHXHZVXT1GlrsozrkWV4EjbTw" \4--header "X-Signature: sha256 Sty3LNcKA8+WlMHtAgIY+y1xbwnzKsN0UdyKaW+yYIgcTkBAtF7G5Lx251qQITURJ4wiXPDODxhs1nFVmBBing==" \5--header "X-Nonce-Str: VYNknZohxwicZMaWbNdBKUrnrxDtaRhN" \6--header "X-Timestamp: 1528450585" \7--data "{8 \"currencyType\": \"MYR\",9 \"amount\": 100,10 \"type\": \"ID\",11 \"memberId\": \"2777058682717858418\"12}"
Response Parameters
▾
Successfully call this endpoint. If fail, will return error code object (Refer Appendix 1: Error Codes)
Example: "SUCCESS"
1{2"code": "SUCCESS"3}
1{2"item": {3 "id": "83f575034d45f776b8e1fed1a26e2fee",4 "qrCodeUrl": "https://dev-rm-api.ap.ngrok.io/qr/4118165203679668885/loyalty/d3008719d04cab91c53eb0b5d8cc4ee6"5},6"code": "SUCCESS"7}