> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.littglobal.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.littglobal.com/_mcp/server.

# Transaction History - Cashback

POST TBD/api/v2/users/transactions/history/cashback
Content-Type: application/json

This API endpoint fetches the cashback history of a user per merchant, including the total cashback earned from each merchant, total amount spent, loyalty percentage, category of the merchant, and address. It also provides a page-based mechanism to handle a large amount of data.

### Request Body

- `page` (integer): Which page of the transaction history to present. Each page contains a set number of transaction records.
    

### Response

- `user_cashback_total` (string): The total cashback received by the user.
    
- `merchants` (array): An array of objects, each detailing data on a specific merchant. Each object includes `merchant_id`, `merchant_name`, `merchant_username`, `cashback_total`, `total_spent`, `loyalty_percentage`, `category`, `address1`, `city_name`, `state_code`, `state_name`, `postcode`, and `merchant_image_url`.

Reference: https://docs.littglobal.com/litt-white-label/api-reference/digital-wallet/transaction-history-cashback

## Request

### Query parameters

- `api_token` (string, optional)

### Body (application/json)

This endpoint expects an object.

- `api` (string, optional)
- `data` (ApiV2UsersTransactionsHistoryCashbackPostRequestBodyContentApplicationJsonSchemaData, optional)

## Response

### 200

Transaction History - Cashback

- `message` (string, optional)
- `api` (string, optional)
- `status` (string, optional)
- `data` (ApiV2UsersTransactionsHistoryCashbackPostResponsesContentApplicationJsonSchemaData, optional)

## Types

### ApiV2UsersTransactionsHistoryCashbackPostRequestBodyContentApplicationJsonSchemaData

- `page` (integer, optional)

### ApiV2UsersTransactionsHistoryCashbackPostResponsesContentApplicationJsonSchemaData

- `user_cashback_total` (string, optional)
- `merchants` (list of ApiV2UsersTransactionsHistoryCashbackPostResponsesContentApplicationJsonSchemaDataMerchantsItems, optional)

### ApiV2UsersTransactionsHistoryCashbackPostResponsesContentApplicationJsonSchemaDataMerchantsItems

- `merchant_id` (string, optional)
- `merchant_name` (string, optional)
- `merchant_username` (string, optional)
- `cashback_total` (string, optional)
- `total_spent` (string, optional)
- `loyalty_percentage` (string, optional)
- `category` (string, optional)
- `address1` (string, optional)
- `city_name` (string, optional)
- `state_code` (string, optional)
- `state_name` (string, optional)
- `postcode` (string, optional)
- `merchant_image_url` (string, optional)

## Examples

**Request**

```json
{
  "api": "user-transaction-history-cashback",
  "data": {
    "page": 1
  }
}
```

**Response**

```json
{
  "message": "Cashback transactions have been loaded",
  "api": "user-transaction-history-cashback",
  "status": "success",
  "data": {
    "user_cashback_total": "25.49",
    "merchants": [
      {
        "merchant_id": "79e22245-cd28-4e53-86d0-96cd2b728ac",
        "merchant_name": "The Shoe Bar & Cafe ",
        "merchant_username": "theshoeperth",
        "cashback_total": "13.41",
        "total_spent": "268.00",
        "loyalty_percentage": "5.00",
        "category": "Bars & Restaurants",
        "address1": "376 - 420 Wellington Street",
        "city_name": "Perth",
        "state_code": "WA",
        "state_name": "Western Australia",
        "postcode": "6050",
        "merchant_image_url": "https://d1zm7p5dmuuq6t.cloudfront.net/1353513e-28db-4c21-b022-3126cc25c830/image/96a1b10b-4e26-43ec-89d9-dbd6d09f5975.jpg"
      },
      {
        "merchant_id": "c116ad0e-6340-4980-ac2a-c03ea200dd3a",
        "merchant_name": "The Left Bank",
        "merchant_username": "the_left_bank",
        "cashback_total": "3.83",
        "total_spent": "76.50",
        "loyalty_percentage": "5.00",
        "category": "Bars & Restaurants",
        "address1": "15 Riverside Road",
        "city_name": "East",
        "state_code": "WA",
        "state_name": "Western Australia",
        "postcode": "6158",
        "merchant_image_url": "https://d1zm7p5dmuuq6t.cloudfront.net/1353513e-28db-4c21-b022-3126cc25c830/image/34b49617-d4c2-44c0-91b8-d3f3e2613f4b.jpg"
      },
      {
        "merchant_id": "df9be21-dc33-41c3-a827-fcb17d64ee86",
        "merchant_name": "The Wembley Hotel ",
        "merchant_username": "thewembleyhotel",
        "cashback_total": "3.55",
        "total_spent": "71.00",
        "loyalty_percentage": "5.00",
        "category": "Bars & Restaurants",
        "address1": "344 Cambridge Street",
        "city_name": "Wembley",
        "state_code": "WA",
        "state_name": "Western Australia",
        "postcode": "6014",
        "merchant_image_url": "https://d1zm7p5dmuuq6t.cloudfront.net/1353513e-28db-4c21-b022-3126cc25c830/image/589fbaaa-ad3a-4370-93a0-27c448bdbd48.jpg"
      },
      {
        "merchant_id": "e1abfa12-242-4e7d-afe7-d96b5f646d4b",
        "merchant_name": "Northbridge Brewing Co ",
        "merchant_username": "nbcbeerland",
        "cashback_total": "3.47",
        "total_spent": "69.30",
        "loyalty_percentage": "5.00",
        "category": "Bars & Restaurants",
        "address1": "44 Lake Street",
        "city_name": "Northbridge",
        "state_code": "WA",
        "state_name": "Western Australia",
        "postcode": "6003",
        "merchant_image_url": "https://d1zm7p5dmuuq6t.cloudfront.net/1353513e-28db-4c21-b022-3126cc25c830/image/eae39753-c9d9-4efc-9698-9b541c118165.jpg"
      },
      {
        "merchant_id": "970be51e-7a4-43bc-9c03-d43f6607d3fa",
        "merchant_name": "Sanity Entertainment",
        "merchant_username": "sanityau",
        "cashback_total": "1.18",
        "total_spent": "23.68",
        "loyalty_percentage": "5.00",
        "category": "Event & Entertainment",
        "address1": "1187 The Horsley Drive",
        "city_name": "Wetherill",
        "state_code": "NSW",
        "state_name": "New South Wales",
        "postcode": "2164",
        "merchant_image_url": "https://d1zm7p5dmuuq6t.cloudfront.net/1353513e-28db-4c21-b022-3126cc25c830/image/181e16c4-dfd-4e53-b1e8-d7c8e68b6d2.jpg"
      },
      {
        "merchant_id": "LITT",
        "merchant_name": "LITT",
        "merchant_username": "LITT",
        "cashback_total": "0.05",
        "total_spent": "1.00",
        "loyalty_percentage": "0.00",
        "category": "Others",
        "address1": "1109 Hay Street",
        "city_name": "West",
        "state_code": "WA",
        "state_name": "Western Australia",
        "postcode": "6005",
        "merchant_image_url": "https://d1zm7p5dmuuq6t.cloudfront.net/1353513e-28db-4c21-b022-3126cc25c830/profile/81f7404c-3901-47c5-92aa-699cff49985f.jpg"
      }
    ]
  }
}
```

**SDK Code**

```python Digital Wallet_transactionHistoryCashback_example
import requests

url = "https://tbd/api/v2/users/transactions/history/cashback"

querystring = {"api_token":"{{token}}"}

payload = {
    "api": "user-transaction-history-cashback",
    "data": { "page": 1 }
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers, params=querystring)

print(response.json())
```

```javascript Digital Wallet_transactionHistoryCashback_example
const url = 'https://tbd/api/v2/users/transactions/history/cashback?api_token=%7B%7Btoken%7D%7D';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"api":"user-transaction-history-cashback","data":{"page":1}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Digital Wallet_transactionHistoryCashback_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://tbd/api/v2/users/transactions/history/cashback?api_token=%7B%7Btoken%7D%7D"

	payload := strings.NewReader("{\n  \"api\": \"user-transaction-history-cashback\",\n  \"data\": {\n    \"page\": 1\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Digital Wallet_transactionHistoryCashback_example
require 'uri'
require 'net/http'

url = URI("https://tbd/api/v2/users/transactions/history/cashback?api_token=%7B%7Btoken%7D%7D")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"api\": \"user-transaction-history-cashback\",\n  \"data\": {\n    \"page\": 1\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Digital Wallet_transactionHistoryCashback_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://tbd/api/v2/users/transactions/history/cashback?api_token=%7B%7Btoken%7D%7D")
  .header("Content-Type", "application/json")
  .body("{\n  \"api\": \"user-transaction-history-cashback\",\n  \"data\": {\n    \"page\": 1\n  }\n}")
  .asString();
```

```php Digital Wallet_transactionHistoryCashback_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://tbd/api/v2/users/transactions/history/cashback?api_token=%7B%7Btoken%7D%7D', [
  'body' => '{
  "api": "user-transaction-history-cashback",
  "data": {
    "page": 1
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Digital Wallet_transactionHistoryCashback_example
using RestSharp;

var client = new RestClient("https://tbd/api/v2/users/transactions/history/cashback?api_token=%7B%7Btoken%7D%7D");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"api\": \"user-transaction-history-cashback\",\n  \"data\": {\n    \"page\": 1\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Digital Wallet_transactionHistoryCashback_example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "api": "user-transaction-history-cashback",
  "data": ["page": 1]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://tbd/api/v2/users/transactions/history/cashback?api_token=%7B%7Btoken%7D%7D")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```