Reward

To obtain reward balance of customer, we utilize the reward API.

The reward model

The reward model contains the information required for initiating a reward balance API. Either email or phonenumber is required.

Properties

  • Name
    email
    Type
    string
    Description

    The email of the customer

  • Name
    phonenumber
    Type
    string
    Description

    The phone number of the customer


POST/custom/rewards

Get reward balance

This endpoint allows you to obtain reward balance of customer.

Required attributes

  • Name
    email
    Type
    string
    Description

    The email of the customer

  • Name
    phonenumber
    Type
    string
    Description

    The phone number of the customer

Request

POST
/custom/rewards
curl -X POST https://stagingapi.platform.poweredbytandym.com/custom/rewards \
  -H 'content-type:application/json' \
  -H 'apiKey:{YOURPAY_API_KEY}' \
  -d '{
        "email":"test@example.com",
        "phonenumber":"2001001232",
      }'

Success Response

{
  "rewards_balance": 200
}

Error Response

{
  "errorcode": "REQUEST_UNSUCCESSFUL",
  "errormessage": "Request is not successful!"      
}