> 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 (Merchant)

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

The API endpoint retrieves the cashback history of a user for a specific merchant. It provides detailed information about the cashback received from transactions with a particular merchant.

### Request Body

- `merchant_id` (string): The ID of the merchant whose transactions are being queried.
    
- `page` (integer): The page of the transaction history to present. Each page presents a subset of transaction records.
    

### Response

- `merchant` (array): Contains the user's cash back records for a merchant. It includes fields like `user_id`, `merchant_name`, `user_cashback_total`, `user_cashback`, `total_spent`, `loyalty_percentage`, `loyalty_min_transaction`, `loyalty_max_cashback`, `category`, `address1`, `city_name`, `state_code`, `state_name`, `postcode`, and `merchant_image_url`.
    
- `transactions` (array): Lists individual transactions. Each object includes details such as the `merchant`, `earned`, `spent`, `loyalty_percentage`, `type`, and `created_at` date.

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

## Request

### Query parameters

- `api_token` (string, optional)

### Body (application/json)

This endpoint expects an object.

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

## Response

### 200

Transaction History - Cashback (Merchant)

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

## Types

### ApiV2UsersTransactionsHistoryMerchantCashbackPostRequestBodyContentApplicationJsonSchemaData

- `merchant_id` (string, optional)
- `page` (integer, optional)

### ApiV2UsersTransactionsHistoryMerchantCashbackPostResponsesContentApplicationJsonSchemaData

- `merchant` (list of ApiV2UsersTransactionsHistoryMerchantCashbackPostResponsesContentApplicationJsonSchemaDataMerchantItems, optional)
- `transactions` (list of ApiV2UsersTransactionsHistoryMerchantCashbackPostResponsesContentApplicationJsonSchemaDataTransactionsItems, optional)

### ApiV2UsersTransactionsHistoryMerchantCashbackPostResponsesContentApplicationJsonSchemaDataMerchantItems

- `user_id` (string, optional)
- `merchant_name` (string, optional)
- `user_cashback_total` (string, optional)
- `user_cashback` (string, optional)
- `total_spent` (string, optional)
- `loyalty_percentage` (string, optional)
- `loyalty_min_transaction` (string, optional)
- `loyalty_max_cashback` (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)

### ApiV2UsersTransactionsHistoryMerchantCashbackPostResponsesContentApplicationJsonSchemaDataTransactionsItems

- `merchant` (string, optional)
- `earned` (string, optional)
- `spent` (string, optional)
- `loyalty_percentage` (string, optional)
- `type` (string, optional)
- `created_at` (string, optional)

## Examples

**Request**

```json
{
  "api": "user-transaction-history-merchant-cashback",
  "data": {
    "merchant_id": "79e22245-cd28-4e53-86d0-96cd2b728ac",
    "page": 1
  }
}
```

**Response**

```json
{
  "message": "Cashback transactions have been loaded",
  "api": "user-transaction-history-merchant-cashback",
  "status": "success",
  "data": {
    "merchant": [
      {
        "user_id": "79e22245-cd28-4e53-86d0-96cd2b728ac",
        "merchant_name": "The Shoe Bar & Cafe ",
        "user_cashback_total": "25.49",
        "user_cashback": "13.41",
        "total_spent": "268.00",
        "loyalty_percentage": "5.00",
        "loyalty_min_transaction": "0.00",
        "loyalty_max_cashback": "0.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"
      }
    ],
    "transactions": [
      {
        "merchant": "The Shoe Bar & Cafe ",
        "earned": "0.55",
        "spent": "11.00",
        "loyalty_percentage": "5.00",
        "type": "LITT card",
        "created_at": "2023-08-30 06:16:07"
      },
      {
        "merchant": "The Shoe Bar & Cafe ",
        "earned": "0.60",
        "spent": "12.00",
        "loyalty_percentage": "5.00",
        "type": "LITT card",
        "created_at": "2023-05-10 06:03:27"
      },
      {
        "merchant": "The Shoe Bar & Cafe ",
        "earned": "4.98",
        "spent": "99.50",
        "loyalty_percentage": "5.00",
        "type": "LITT card",
        "created_at": "2022-12-04 06:03:22"
      },
      {
        "merchant": "The Shoe Bar & Cafe ",
        "earned": "0.45",
        "spent": "9.00",
        "loyalty_percentage": "5.00",
        "type": "LITT card",
        "created_at": "2022-10-04 08:39:10"
      },
      {
        "merchant": "The Shoe Bar & Cafe ",
        "earned": "0.90",
        "spent": "18.00",
        "loyalty_percentage": "5.00",
        "type": "LITT card",
        "created_at": "2022-10-04 06:50:43"
      },
      {
        "merchant": "The Shoe Bar & Cafe ",
        "earned": "5.93",
        "spent": "118.50",
        "loyalty_percentage": "5.00",
        "type": "LITT card",
        "created_at": "2022-09-23 04:37:26"
      }
    ]
  }
}
```

**SDK Code**

```python Digital Wallet_transactionHistoryCashbackMerchant_example
import requests

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

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

payload = {
    "api": "user-transaction-history-merchant-cashback",
    "data": {
        "merchant_id": "79e22245-cd28-4e53-86d0-96cd2b728ac",
        "page": 1
    }
}
headers = {"Content-Type": "application/json"}

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

print(response.json())
```

```javascript Digital Wallet_transactionHistoryCashbackMerchant_example
const url = 'https://tbd/api/v2/users/transactions/history/merchant-cashback?api_token=%7B%7Btoken%7D%7D';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"api":"user-transaction-history-merchant-cashback","data":{"merchant_id":"79e22245-cd28-4e53-86d0-96cd2b728ac","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_transactionHistoryCashbackMerchant_example
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"api\": \"user-transaction-history-merchant-cashback\",\n  \"data\": {\n    \"merchant_id\": \"79e22245-cd28-4e53-86d0-96cd2b728ac\",\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_transactionHistoryCashbackMerchant_example
require 'uri'
require 'net/http'

url = URI("https://tbd/api/v2/users/transactions/history/merchant-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-merchant-cashback\",\n  \"data\": {\n    \"merchant_id\": \"79e22245-cd28-4e53-86d0-96cd2b728ac\",\n    \"page\": 1\n  }\n}"

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

```java Digital Wallet_transactionHistoryCashbackMerchant_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/merchant-cashback?api_token=%7B%7Btoken%7D%7D")
  .header("Content-Type", "application/json")
  .body("{\n  \"api\": \"user-transaction-history-merchant-cashback\",\n  \"data\": {\n    \"merchant_id\": \"79e22245-cd28-4e53-86d0-96cd2b728ac\",\n    \"page\": 1\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp Digital Wallet_transactionHistoryCashbackMerchant_example
using RestSharp;

var client = new RestClient("https://tbd/api/v2/users/transactions/history/merchant-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-merchant-cashback\",\n  \"data\": {\n    \"merchant_id\": \"79e22245-cd28-4e53-86d0-96cd2b728ac\",\n    \"page\": 1\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Digital Wallet_transactionHistoryCashbackMerchant_example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "api": "user-transaction-history-merchant-cashback",
  "data": [
    "merchant_id": "79e22245-cd28-4e53-86d0-96cd2b728ac",
    "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/merchant-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()
```