Skip to main content

Notifications API Documentation

This document provides a comprehensive overview of all notification types sent by the system, focusing on the tab field and data object structure.


1. PLAN_PURCHASE_SUCCESS

Sent when a user successfully purchases a plan and receives points.

Notification Object

{
"tab": "wallet",
"data": {
"points": "500",
"planName": "Premium Plan", // optional
"planId": "507f1f77bcf86cd799439011", // optional
"provider": "razorpay", // optional: "razorpay" | "stripe" | "manual"
"content": "{\"points\":500,\"planName\":\"Premium Plan\",\"planId\":\"507f1f77bcf86cd799439011\",\"provider\":\"razorpay\"}"
}
}

2. PRODUCT_APPROVAL_STATUS

Sent when a product's approval status changes (PENDING, APPROVED, REJECTED, WARNING).

Notification Object

{
"tab": "seller",
"data": {
"productId": "507f1f77bcf86cd799439011",
"status": "APPROVED", // "PENDING" | "APPROVED" | "REJECTED" | "WARNING"
"rejectionReason": "Image quality issue", // optional
"content": "{\"productId\":\"507f1f77bcf86cd799439011\",\"status\":\"APPROVED\"}"
}
}

3. TOURNAMENT_ENDING_SOON

Sent when a tournament is ending soon (hours or days before end).

Notification Object

{
"tab": "seller",
"data": {
"productId": "507f1f77bcf86cd799439011",
"tournamentId": "507f1f77bcf86cd799439012", // optional
"hoursLeft": "24",
"productName": "Gaming Tournament", // optional
"earlyTerminationAchieved": "1", // optional
"content": "{\"productId\":\"507f1f77bcf86cd799439011\",\"tournamentId\":\"507f1f77bcf86cd799439012\",\"hoursLeft\":24,\"productName\":\"Gaming Tournament\",\"earlyTerminationAchieved\":true}"
}
}

4. TOURNAMENT_ENDED

Sent when a tournament ends (either successfully or unfilled).

Notification Object

{
"tab": "seller",
"data": {
"productId": "507f1f77bcf86cd799439011",
"tournamentId": "507f1f77bcf86cd799439012", // optional
"status": "OVER", // "OVER" | "UNFILLED"
"refund": "0", // "1" if refund, "0" otherwise
"content": "{\"productId\":\"507f1f77bcf86cd799439011\",\"tournamentId\":\"507f1f77bcf86cd799439012\",\"status\":\"OVER\",\"refund\":false}"
}
}

5. TOURNAMENT_WON

Sent to the winner when they win a tournament.

Notification Object

{
"tab": "winner",
"data": {
"productId": "507f1f77bcf86cd799439011",
"tournamentId": "507f1f77bcf86cd799439012", // optional
"productName": "Gaming Tournament", // optional
"content": "{\"productId\":\"507f1f77bcf86cd799439011\",\"tournamentId\":\"507f1f77bcf86cd799439012\",\"productName\":\"Gaming Tournament\"}"
}
}

6. TOURNAMENT_COMPLETED_SELLER

Sent to seller when tournament completes and winner is declared.

Notification Object

{
"tab": "seller",
"data": {
"productId": "507f1f77bcf86cd799439011",
"winnerId": "507f1f77bcf86cd799439013", // optional
"productName": "Gaming Tournament", // optional
"content": "{\"productId\":\"507f1f77bcf86cd799439011\",\"winnerId\":\"507f1f77bcf86cd799439013\",\"productName\":\"Gaming Tournament\"}"
}
}

7. FULFILLMENT_VERIFIED

Sent to seller when admin verifies fulfillment and credits wallet.

Notification Object

{
"tab": "WalletScreen",
"data": {
"productId": "507f1f77bcf86cd799439011",
"amount": "500", // optional
"content": "{\"productId\":\"507f1f77bcf86cd799439011\",\"amount\":500}"
}
}

8. RECEIVER_CONFIRMED

Sent to seller when receiver confirms delivery.

Notification Object

{
"tab": "seller",
"data": {
"productId": "507f1f77bcf86cd799439011",
"content": "{\"productId\":\"507f1f77bcf86cd799439011\"}"
}
}

9. SELLER_UPDATE_PROOF

Sent to winner when seller updates delivery proof.

Notification Object

{
"tab": "winner",
"data": {
"productId": "507f1f77bcf86cd799439011",
"tournamentId": "507f1f77bcf86cd799439012", // optional
"content": "{\"productId\":\"507f1f77bcf86cd799439011\",\"tournamentId\":\"507f1f77bcf86cd799439012\"}"
}
}

10. SUBSCRIPTION_ACTIVATED

Sent when a subscription is successfully activated.

Notification Object

{
"tab": "wallet",
"data": {
"planName": "Monthly Premium", // optional
"planId": "507f1f77bcf86cd799439011", // optional
"content": "{\"planName\":\"Monthly Premium\",\"planId\":\"507f1f77bcf86cd799439011\"}"
}
}

11. SUBSCRIPTION_CANCELLED

Sent when a subscription is cancelled.

Notification Object

{
"tab": "wallet",
"data": {
"planName": "Monthly Premium", // optional
"planId": "507f1f77bcf86cd799439011", // optional
"content": "{\"planName\":\"Monthly Premium\",\"planId\":\"507f1f77bcf86cd799439011\"}"
}
}

12. ADMIN_REWARD_GRANTED

Sent when admin grants a reward to a user.

Notification Object

{
"tab": "WalletScreen",
"data": {
"points": "100",
"country": "IN",
"category": "bonus", // optional
"content": "{\"points\":\"100\",\"country\":\"IN\",\"category\":\"bonus\"}"
}
}

13. SELLER_ADDRESS_UPDATE

Sent to receiver when seller updates pickup address.

Notification Object

{
"tab": "Acknowledgement",
"data": {
"productId": "507f1f77bcf86cd799439011",
"tournamentId": "507f1f77bcf86cd799439012", // optional
"content": "{\"productId\":\"507f1f77bcf86cd799439011\",\"tournamentId\":\"507f1f77bcf86cd799439012\"}"
}
}

14. PRACTICE_ARENA_WON

Sent to winner of a practice arena.

Notification Object

{
"tab": "arena-winner",
"data": {
"arenaId": "507f1f77bcf86cd799439011",
"content": "{\"arenaId\":\"507f1f77bcf86cd799439011\",\"arenaName\":\"Speed Arena\"}"
}
}

15. RECEIVER_ADDRESS_UPDATE

Sent to seller when receiver updates delivery address.

Notification Object

{
"tab": "seller",
"data": {
"productId": "507f1f77bcf86cd799439011",
"content": "{\"productId\":\"507f1f77bcf86cd799439011\"}"
}
}

16. FULFILLMENT_VERIFIED_ADMIN

Sent when admin verifies fulfillment. This notification is sent to both seller and receiver with different tabs.

For Seller

{
"tab": "wallet",
"data": {
"productId": "507f1f77bcf86cd799439011",
"amount": "500", // optional
"content": "{\"productId\":\"507f1f77bcf86cd799439011\",\"amount\":500}"
}
}

For Receiver

{
"tab": "winner",
"data": {
"productId": "507f1f77bcf86cd799439011",
"tournamentId": "507f1f77bcf86cd799439012", // optional
"content": "{\"productId\":\"507f1f77bcf86cd799439011\",\"tournamentId\":\"507f1f77bcf86cd799439012\"}"
}
}

17. ADMIN_CUSTOM

Custom notification sent by admin with arbitrary content.

Notification Object

{
"tab": "wallet", // one of: "seller", "winner", "wallet", "arena-winner"
"data": {
"content": "{...}" // arbitrary JSON data provided by admin
}
}

Tab Values Summary

The tab field indicates which screen/section the notification belongs to in the mobile app:

Tab ValueDescriptionUsed By
walletWallet/wallet-related screensPLAN_PURCHASE_SUCCESS, SUBSCRIPTION_ACTIVATED, SUBSCRIPTION_CANCELLED, FULFILLMENT_VERIFIED_ADMIN (seller)
WalletScreenWallet screenFULFILLMENT_VERIFIED, ADMIN_REWARD_GRANTED
sellerSeller dashboard/listingsPRODUCT_APPROVAL_STATUS, TOURNAMENT_ENDING_SOON, TOURNAMENT_ENDED, TOURNAMENT_COMPLETED_SELLER, RECEIVER_CONFIRMED, RECEIVER_ADDRESS_UPDATE
winnerWinner/receiver fulfillment screensTOURNAMENT_WON, SELLER_UPDATE_PROOF, FULFILLMENT_VERIFIED_ADMIN (receiver)
AcknowledgementAcknowledgement/fulfillment screensSELLER_ADDRESS_UPDATE
arena-winnerPractice arena winner screensPRACTICE_ARENA_WON

Notes

  1. Optional Fields: Fields marked as "optional" may or may not be present depending on the context.

  2. Content Field: Most notifications include a content field containing a JSON string with additional structured data. This provides redundancy and allows for easier parsing on the client side.

  3. IDs Format: All ID fields (productId, tournamentId, userId, etc.) are MongoDB ObjectId strings.

  4. Boolean Values: Boolean values in data fields are typically sent as strings:

    • "1" for true
    • "0" for false
  5. Numbers: Numeric values (points, amount, hoursLeft) are sent as strings in the data object.