Get Wallet Transactions

Learn how to use Get Wallet Transactions API to retrieve detailed user wallet transaction logs for efficient wallet management.

Overview

The Get Wallet Transactions API allows you to retrieve wallet transaction details for a specific user. You can integrate this API at relevant touchpoints within the application to display transaction details on the user interface.

This API provides the following information:

  • Transaction History: Includes a comprehensive log of all wallet transactions, that is, credits, debits, and expirations processed through various sources linked to the user wallet.
  • Promised Points Transactions: Displays points yet to be credited to the user wallet based on their activation date. This allows users to monitor points scheduled for future credit. For example, if a user earns 100 points for a transaction with a 7-day activation period, these points remain in the Pending bucket until the activation period ends. After 7 days, they move to Active status and become redeemable.
  • Expiring Points: Displays points nearing expiration along with their expiry dates, helping users track and redeem them in time to avoid losing benefits.

Base URL

Here is an example base URL from the account in the India region:

https://in1.api.clevertap.com/1/promo/transactions

Region

To identify the API endpoint for the region of your account, refer to Region.

Headers

For more information about API headers used while processing API requests, refer to Headers.

HTTP Method

GET

Query Parameters

The API requires the following query parameters: source_id and wallet_Id. No body parameters are required.

ParameterDescriptionTypeRequired/OptionalSample Value
identityIdentifies the user associated with the wallet.StringRequiredKMN@123
walletIdUnique identifier assigned to each user wallet within the application.StringRequiredwallet_123
pagePage number for paginated results. The default value is 1. The wallet transaction details are returned in a paginated format. You must pass the page number as a query parameter to retrieve specific pages. Each page can include a maximum of 20 transactions.NumberOptional1

Sample Request

Here is an example HTTP request to the Get Wallet Transactions API, including headers needed to authenticate the request:

GET /https://in1.api.clevertap.com/1/promo/transactions?identity=User2 HTTP/1.1
Authorization: Basic {API Key: Secret Key}

Sample Response

The Get Wallet Transactions API response depends on query parameters, pagination settings, and transaction sources. The API returns an array of objects, with each object containing details about a specific transaction for the given wallet_Id.

The following sample response returns the paginated list of transaction details:

{
    "status": "success",
    "record": {
        "promisedPoints": {
            "totalPromisedPoints": 100,
            "promisedPointsList": [
              {
                    "activationTimestamp": 1745955587,
                    "points": 80
                },
                {
                    "activationTimestamp": 1747647827,
                    "points": 20
                }
            ]
        },
        "pointsExpiring": {
            "earliestExpiryTimestamp": 1745955587,
            "pointsExpiringSoon": 80,
            "pointsExpiringList": [
                {
                    "expiryTimestamp": 1745955587,
                    "points": 80
                },
                {
                    "expiryTimestamp": 1747647827,
                    "points": 20
                },
                {
                    "expiryTimestamp": 1747763379,
                    "points": 20
                }
            ]
        },
        "allTransactions": [
            {
                "txnTimestamp": 1740045465,
                "txnSource": "CAMPAIGN",
                "description": "Points earned through a campaign",
                "type": "CREDIT",
                "tnxId": "wl_xever6SPInBqgy7jCKNA6",
                "points": 1000
            },
            {
                "txnTimestamp": 1740045454,
                "txnSource": "SYSTEM",
                "description": "Points expired automatically by system",
                "type": "EXPIRED",
                "tnxId": "wl_Ggch4bzySYenYHVTzYnOC",
                "points": 1000
            },
            {
                "txnTimestamp": 1738179788,
                "txnSource": "API",
                "description": "Points redeemed to purchase a voucher",
                "type": "DEBIT",
                "tnxId": "wl_lVFrctre248UC7eh2elfH",
                "points": 20
            },
            {
                "txnTimestamp": 1738179587,
                "txnSource": "API",
                "description": "Reward points for subscription",
                "type": "CREDIT",
                "tnxId": "wl_XQYyLsRrzwhVp1eYpwNJT",
                "points": 100
            },
          {
                "txnTimestamp": 1738179587,
                "txnSource": "CASHBACKCOUPON",
                "description": "Points earned for redeeming FLAT500 coupon",
                "type": "CREDIT",
                "tnxId": "wl_XQYyLsRrzwhVp1eYpwNJT",
                "points": 100
            }
        ]
    }
}

The sections below provide a detailed breakdown of the response payload for the Get Wallet Details API.

pointsExpiring Object

The pointsExpiring object returns details about reward points nearing expiry. It includes information such as the total points expiring soon, the earliest expiry date, and a detailed list of points with their respective expiry timestamps.

ParameterDescriptionTypeSample Value
pointsExpiringSoonTotal points expiring on the earliest upcoming expiry date.Numeric60
earliestExpiryTimestampThe earliest expiry date of points getting expired (sorted in ascending order).DateTime"2024-12-13T12:12:12Z"
pointsExpiringListList of points expiring.Array of objects
pointsPoints expiring on the respective expiry date.Numeric20
expiryTimestampThe expiry date of respective points.DateTime2024-12-13T12:12:12Z

allTransactions Object

The allTransactions object returns the complete transaction history of the wallet, including credits, debits, expired, and pending transactions. Each transaction entry provides comprehensive details such as the transaction source, type, description, timestamp, and points involved.

Response FieldDefinitionTypeSample Value
txnSourceSource through which the wallet transaction occurred. The following are the possible sources:
  • Campaign: Transaction originated from a promotional campaign.
  • API: Transaction triggered via API integration.
  • Manual: Transaction added or updated manually by an administrator.
  • Cashback Coupon: Transaction that reflects cashback awarded to the user as part of a coupon redemption.
  • System: Transaction automatically generated by the system, for example, coupon expiration
StringCAMPAIGN, API, MANUAL,CASHBACKCOUPON, SYSTEM
descriptionDescription of the wallet transaction.StringPoints debited for late payment
typeWallet transaction type indicating the nature of the transaction. The following are the possible values:
  • Credit: Points added to the wallet.
  • Debit: Points deducted from the wallet.
  • Expired: Points that have reached their expiry date and are no longer valid.
  • Pending: Points awaiting activation or clearance.
StringCREDIT, DEBIT, EXPIRED, PENDING
tnxIdTransaction ID assigned to a respective wallet transaction.Stringwl_MRCJSqtH9akcvzvK
allTransactionsList of all transactions.Array of objects
pointsWallet points debited or credited against each transaction.Numeric20
txnTimestampDate and Time when the transaction was created.DateTime2024-12-13T12:12:12Z

promisedPoints Object

The promisedPoints object returns reward points that have yet to be credited to the wallet. It specifies the activation timestamp for promised points, a breakdown of individual entries, and the total promised points awaiting activation.

KeyDescriptionTypeSample Value
promisedPointsListList of points yet to be credited to the user wallet.Array
activationTimestampDate and Time on which associated points will be credited or activated.DateTime2024-12-13T12:12:12Z
pointsPoints that are pending and will be activated based on the activationTimestamp.Numeric30
totalPromisedPointsTotal points that are yet to be credited to the user wallet.Numeric100

Errors

To know the errors applicable to the Get Wallet Transactions API, refer to API Error Cases.