Referral Codes
Partners can create and manage referral codes for tracking user acquisitions and providing referral bonuses.Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /v1/kyc/referral-codes | Create a new referral code |
GET | /v1/kyc/referral-codes | List referral codes |
GET | /v1/kyc/referral-codes/{code} | Validate a specific code |
Create Referral Code
Create a new referral code for tracking.Request
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
userId | string | Yes | Partner user ID creating the code |
referralCode | string | Yes | The referral code string |
category | string | No | Category for grouping codes |
Response
List Referral Codes
Retrieve referral codes with optional filtering.Request
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
userId | string | No | Filter by partner user ID |
category | string | No | Filter by category |
code | string | No | Filter by specific code |
cursor | string | No | Pagination cursor |
limit | integer | No | Results per page (default: 20) |
Response
Response Fields
| Field | Type | Description |
|---|---|---|
referralCodes | array | List of referral code objects |
nextCursor | string | Cursor for next page (if more results) |
eof | boolean | True if this is the last page |
Referral Code Object
| Field | Type | Description |
|---|---|---|
referralCode | string | The referral code |
userId | string | Partner user who created the code |
isvId | string | Partner organization ID |
usedCount | string | Number of times code has been used |
category | string | Code category (if set) |
Validate Referral Code
Check if a referral code is valid and get associated information.Request
Response
Response Fields
| Field | Type | Description |
|---|---|---|
isValid | boolean | Whether the code is valid |
userId | string | Partner user who owns the code (if valid) |
amount | object | Referral bonus amount (if applicable) |
Invalid Code Response
Using Referral Codes in KYC
Pass the referral code when starting KYC verification:Best Practices
- Use descriptive codes - Make codes easy to remember and associate with campaigns
- Track usage - Monitor
usedCountto measure campaign effectiveness - Use categories - Group codes by campaign, partner tier, or time period
- Validate before display - Check code validity before showing to users
- Handle pagination - Use
cursorfor large code lists

