Skip to main content

Calculate Spending Reward

Calculate the number of spending-reward points a given sale amount would yield, based on the merchant's loyalty rules.

When to Use

Use this endpoint when:

  • Showing customers the points they would earn before payment
  • Previewing rewards in a checkout flow

How to Use

Endpoint
POST/v3/loyalty/spending-reward/calculate

POST to /v3/loyalty/spending-reward/calculate with currencyType and amount. Read the points value from the response.


Request Parameters

currencyTypeSTRING

Currently MYR only

Example: MYR

amountINTEGER

Amount Sales

Example: 300

Response Parameters

itemOBJECT

Point object

pointINTEGER

Loyalty point given to customers.

Example: 3

codeSTRING

Successfully call this endpoint. If fail, will return error code object (Refer Appendix 1: Error Codes)

Example: "SUCCESS"

Currency notation (currently only support MYR)