Allocating Rewards Using EnKash APIs
Create Single User
Create Multiple Users
1. Obtain Onboarding Identifiers
Field | Description |
---|---|
companyId | Unique ID assigned to your company by EnKash. |
cardAccountId | Reward account ID associated with your company. |
partnerId | Partner ID assigned during onboarding. |
2. Create Reward Account and Allocate Points
transactionType
: CR
(Credit)type
: ALLOCATE_POINT
Field | Description |
---|---|
firstName | Employee's first name |
email | Employee's email address |
mobile | Employee's mobile number |
gender | Employee's gender (M/F) |
title | Employee's title (Mr/Mrs/Ms) |
loadAmount | Initial points to be credited |
{
"companyId": "CEK1PU9AOO",
"cardAccountId": "CAQL8YCV3",
"transactionCode": "ALLOCATION",
"transactionType": "CR",
"type": "ALLOCATE_POINT",
"email": "xyz2@gmail.com",
"mobile": "9600098867",
"title": "Mr",
"firstName": "hedfdfg",
"gender": "M",
"loadAmount": 11,
"uniqueReferenceNum": "TEST234236"
}
3. Topup Existing Reward Account
transactionType
: CR
(Credit)type
: ALLOCATE_POINT
Field | Description |
---|---|
enkashCardId | Unique card ID (required if cardAccountId not used) |
cardAccountId | Unique reward account ID (required if enkashCardId not used) |
loadAmount | Points to be credited |
email / mobile | (Optional) User identifiers for validation |
4. Unallocate / Debit Points
transactionType
: DR
(Debit)type
: UNALLOCATE_POINT
Field | Description |
---|---|
enkashCardId | Unique card ID (required if cardAccountId not used) |
cardAccountId | Unique reward account ID (required if enkashCardId not used) |
loadAmount | Points to be debited |
5. Validate the Response
cardAccount
details. Verify that the pgReferenceNumber
in the response matches your uniqueReferenceNumber
.{
"code": 0,
"message": "Success",
"payload": {
"enKashCardId": "EKC04AZHXP",
"enkashCardTxnId": "ECTRSZJ8CRJ2E",
"pgReferenceNumber": "TEST234236",
"otbBalance": 11,
"maskedNumber": "XXXX XXXX XXXX 8867",
...
}
}
Reference Number Mapping
Parameter | Where It’s Used | Purpose |
---|---|---|
uniqueReferenceNumber | Request payload | Identifies the transaction uniquely (client side) |
pgReferenceNumber | Response payload | EnKash's confirmation reference for traceability |
These must match to confirm the transaction has been successfully tracked
Data Schema
Field | Type | Description |
---|---|---|
companyId | string | Unique EnKash company ID (provided on onboarding) |
cardAccountId | string | EnKash reward account ID |
transactionCode | enum | Type of transaction (e.g., ALLOCATION ) |
transactionType | enum | Direction of transaction (CR or DR ) |
type | enum | Transaction purpose (ALLOCATE_POINT , UNALLOCATE_POINT ) |
email | string | Email ID of the cardholder |
mobile | string | Mobile number of the cardholder |
title | string | Title of the cardholder (Mr/Mrs/Ms) |
firstName | string | First name of the cardholder |
gender | string | Gender (M/F). |
loadAmount | number | Amount of points to credit or debit |
uniqueReferenceNumber | string | Unique identifier from the partner for traceability |