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.
Parameter | Description | Type | Required/Optional | Sample Value |
---|---|---|---|---|
identity | Identifies the user associated with the wallet. | String | Required | KMN@123 |
walletId | Unique identifier assigned to each user wallet within the application. | String | Required | wallet_123 |
page | Page 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. | Number | Optional | 1 |
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
pointsExpiring
ObjectThe 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.
Parameter | Description | Type | Sample Value |
---|---|---|---|
pointsExpiringSoon | Total points expiring on the earliest upcoming expiry date. | Numeric | 60 |
earliestExpiryTimestamp | The earliest expiry date of points getting expired (sorted in ascending order). | DateTime | "2024-12-13T12:12:12Z" |
pointsExpiringList | List of points expiring. | Array of objects | |
points | Points expiring on the respective expiry date. | Numeric | 20 |
expiryTimestamp | The expiry date of respective points. | DateTime | 2024-12-13T12:12:12Z |
allTransactions
Object
allTransactions
ObjectThe 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 Field | Definition | Type | Sample Value |
---|---|---|---|
txnSource | Source through which the wallet transaction occurred. The following are the possible sources:
| String | CAMPAIGN , API , MANUAL ,CASHBACKCOUPON , SYSTEM |
description | Description of the wallet transaction. | String | Points debited for late payment |
type | Wallet transaction type indicating the nature of the transaction. The following are the possible values:
| String | CREDIT , DEBIT , EXPIRED , PENDING |
tnxId | Transaction ID assigned to a respective wallet transaction. | String | wl_MRCJSqtH9akcvzvK |
allTransactions | List of all transactions. | Array of objects | |
points | Wallet points debited or credited against each transaction. | Numeric | 20 |
txnTimestamp | Date and Time when the transaction was created. | DateTime | 2024-12-13T12:12:12Z |
promisedPoints
Object
promisedPoints
ObjectThe 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.
Key | Description | Type | Sample Value |
---|---|---|---|
promisedPointsList | List of points yet to be credited to the user wallet. | Array | |
activationTimestamp | Date and Time on which associated points will be credited or activated. | DateTime | 2024-12-13T12:12:12Z |
points | Points that are pending and will be activated based on the activationTimestamp . | Numeric | 30 |
totalPromisedPoints | Total points that are yet to be credited to the user wallet. | Numeric | 100 |
Errors
To know the errors applicable to the Get Wallet Transactions API, refer to API Error Cases.
Updated 1 day ago