Get Wallet Details

Learn how to use the Get Wallet Details API to access user wallet information.

Overview

The Get Wallet Details API fetches user wallet information, including the wallet balance, reward points, and pending/expired points. This API can be integrated into your application at key touch points to provide seamless access to wallet data within your application user interface.

This API is designed to offer the following two key components:

  • Wallet Definition: Provides the following essential wallet configuration details necessary for accurate wallet identification and display within your application:
    • Wallet Name
    • Loyalty Points Name
    • Wallet ID
  • Wallet Ledger Balance: Provides a detailed breakdown of the user's wallet activity for display within the application user interface, as follows:
    • Active Points
    • Promised Points
    • Credited Points
    • Expired Points
    • Redeemed Points

Using these insights, you can present an up-to-date and transparent view of the user's wallet activity within your application.

Base URL

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

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

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

ParameterDescriptionTypeSample ValueRequired/Optional
identityIdentifies the user associated with the wallet.StringKMN@123Required

Sample Request

Here is an example HTTP request to the Get Wallet Details API showing the headers needed to authenticate the request:

GET /https://in1.api.clevertap.com/1/promo/wallets?identity=User-2 HTTP/1.1
Authorization: Basic {API Key: Secret Key}

Sample Response

The sample request returns an array of wallet objects, as shown in the following sample JSON response:

{
    "status": "success",
    "records": [
        {
            "walletId": 1000,
            "walletName": "Super wallet",
            "loyaltyPointsName": "Coin",
            "totalRedeemedPoints": 1000,
            "totalCreditedPoints": 2000,
            "activePoints": 500,
            "totalPromisedPoints": 500,
            "expiredPoints": 500
    }
  ]
}

On a successful API call, the system fetches the API response and provides the following response fields passed in the request body:

KeyDefinitionTypeSample Value
walletIdUnique wallet ID assigned by CleverTap for a specific wallet created on your CleverTap dashboard.Stringwaty_XbgBcerLwjoMhAGcmAHhZ
walletNameName of the wallet.StringSuper wallet
loyaltyPointsNameName of the currency associated with the wallet.StringCoin
totalRedeemedPointsTotal points redeemed from the user wallet via the Debit Wallet API and the CleverTap dashboard.Numeric20
totalCreditedPointsTotal points rewarded to the user from all sources.Numeric20
activePointsCurrent active wallet points held by a given user.Numeric40
totalPromisedPointsTotal points rewarded to a user but not yet credited to the user’s wallet.Numeric10
expiredPointsTotal number of unused points expired in the user's wallet.Numeric5

Errors

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