# Parameters to Retrieve Program Transaction History
source: https://developer.mastercard.com/donations/documentation/parameters/track-donations-param/prog-trans-hist/index.md

## Method to Retrieve a Program Transaction History {#method-to-retrieve-a-program-transaction-history}

|    Method    |                   Endpoint                   |
|--------------|----------------------------------------------|
| ~~POST~~ GET | /donations/programs/{programId}/transactions |

Note: ~~The Entire Request Body need not to be encrypted!~~

## Path parameters {#path-parameters}

|     Name      |  Type  |                                    Description                                    |    Notes     |
|---------------|--------|-----------------------------------------------------------------------------------|--------------|
| **programId** | string | Unique ID of the program generated by Mastercard when a new program is onboarded. | **Required** |

## Request parameters {#request-parameters}

|         Name          |    Type    |                                                                Description                                                                |    Notes     |
|-----------------------|------------|-------------------------------------------------------------------------------------------------------------------------------------------|--------------|
| **fromDate**          | string     | The date to start the search. In YYYY-MM-DD format.                                                                                       | **Required** |
| **toDate**            | string     | The date to end the search. In YYYY-MM-DD format.                                                                                         | **Required** |
| **~~cardId~~**        | ~~string~~ | \~\~Unique ID for the card on file. Generated by Mastercard at the time the card was added. \~\~                                          | ~~Optional~~ |
| **charityId**         | string     | The charity's unique identifier. Assigned by Mastercard at the time the charity was onboarded.                                            | Optional     |
| **donorId**           | string     | Unique ID of the donor generated by Mastercard when a new donor is enrolled.                                                              | Optional     |
| **donationType**      | string     | The type of donation. Options include: **One-Time** , **Micro** , **Monthly** , **Roundup** or don't pass param so it defaults to **ALL** | Optional     |
| **transactionStatus** | string     | The status of transaction. Options include: **ALL** , **SUCCESS** , **FAILURE** and **PENDING** , defaults to **ALL**                     | Optional     |
| **offset**            | integer    | default is 0                                                                                                                              | Optional     |
| **limit**             | integer    | default is 2000                                                                                                                           | Optional     |

### Response Body {#response-body}

A successful request returns the HTTP `200 (Success)` status code and a JSON response body wrapped inside a **`data`** object.

*** ** * ** ***

### ~~Earlier Response Structure~~ (Deprecated) {#earlier-response-structure-deprecated}

|             Name             |  Type   |                     Description                      |
|------------------------------|---------|------------------------------------------------------|
| ~~**limit**~~                | integer | ~~The page size of the total items.~~                |
| ~~**offset**~~               | integer | ~~The starting index of the page size total items.~~ |
| ~~**totalTransactions**~~    | integer | ~~The total number of items available in database.~~ |
| ~~**filteredTransactions**~~ | integer | ~~The total number of items in the result.~~         |
| ~~**realTimeTransaction**~~  | object  | ~~Real-time transaction details.~~                   |
| ~~**recurringTransaction**~~ | object  | ~~Recurring transaction details.~~                   |
| ~~**transactions**~~         | object  | ~~The items returned in the response.~~              |

*** ** * ** ***

### data (Current Response Structure) {#data-current-response-structure}

|    Name    |  Type   |                                                                                                    Description                                                                                                    |
|------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **limit**  | integer | The page size of the total items.                                                                                                                                                                                 |
| **offset** | integer | The starting index of the page.                                                                                                                                                                                   |
| **total**  | integer | **(New)** Total number of transactions available in the database.                                                                                                                                                 |
| **count**  | integer | **(New)** Number of transactions returned in the current response.                                                                                                                                                |
| **items**  | array   | **(New)** List of transaction objects returned in the response. See [items](https://developer.mastercard.com/donations/documentation/parameters/track-donations-param/prog-trans-hist/index.md#items) attributes. |

*** ** * ** ***

### ~~Deprecated Child Attributes~~ {#deprecated-child-attributes}

#### ~~realTimeTransaction~~ {#realtimetransaction}

|             Name             |  Type   |                        Description                         |
|------------------------------|---------|------------------------------------------------------------|
| ~~**totalTransactions**~~    | integer | ~~The total number of items available in database.~~       |
| ~~**filteredTransactions**~~ | integer | ~~The total number of items in the result.~~               |
| ~~**transactions**~~         | object  | ~~The details of the donation transaction in the result.~~ |

*** ** * ** ***

#### ~~recurringTransaction~~ {#recurringtransaction}

|             Name             |  Type   |                       Description                       |
|------------------------------|---------|---------------------------------------------------------|
| ~~**totalTransactions**~~    | integer | ~~The total number of items available in database.~~    |
| ~~**filteredTransactions**~~ | integer | ~~The total number of items in the result.~~            |
| ~~**transactions**~~         | object  | ~~The details of donation transactions in the result.~~ |

*** ** * ** ***

### items {#items}

The `items` array contains individual donation transaction records.

|              Name              |  Type  |                                     Description                                     |
|--------------------------------|--------|-------------------------------------------------------------------------------------|
| **charityName**                | string | The name of the charity that received the donation.                                 |
| **primaryAccountNumberSuffix** | string | The last four digits of the payment card used to make the donation.                 |
| **donationType**               | string | The type of donation (e.g., `ONE-TIME`, `ROUNDUP`, `MICRO`, `MONTHLY`).             |
| **date**                       | string | The date of the transaction in `YYYY-MM-DD` format.                                 |
| **updatedDate**                | string | The last updated date of the transaction in `YYYY-MM-DD` format.                    |
| **amount**                     | number | The amount of the donation.                                                         |
| **currency**                   | string | The currency associated with the donation, in ISO 4217 format (e.g., `EUR`, `USD`). |
| **paymentNetwork**             | string | The payment network used for the transaction (e.g., `mastercard`).                  |
| **clientId**                   | string | The client's unique identifier assigned by Mastercard.                              |
| **programId**                  | string | The program's unique identifier assigned by Mastercard.                             |
| **donorId**                    | string | Unique identifier of the donor generated by Mastercard.                             |
| **cardId**                     | string | Unique identifier for the card on file.                                             |
| **charityId**                  | string | Unique identifier of the charity that received the donation.                        |
| **transactionId**              | string | Unique transaction identifier generated by Mastercard.                              |
| **orderId**                    | string | Unique order identifier generated by Mastercard.                                    |
| **transactionStatus**          | string | Status of the transaction (e.g., `SUCCESS`, `FAILURE`).                             |

*** ** * ** ***

### Example Response {#example-response}

```json
{
  "data": {
    "limit": 1000,
    "offset": 0,
    "total": 602,
    "count": 602,
    "items": [
      {
        "charityName": "Save the Children",
        "primaryAccountNumberSuffix": "1111",
        "donationType": "ONE-TIME",
        "date": "2022-11-07",
        "updatedDate": "2022-11-07",
        "amount": 10,
        "currency": "EUR",
        "paymentNetwork": "mastercard",
        "clientId": "4dG5GoNZizSe_hDkUULGvYoaK9jmbEZsQbGxg-CA7fca22dc",
        "programId": "da28a815-fd25-4df4-8b60-1a735d81e473",
        "donorId": "10d212f0-198e-466e-8d9b-ac26746f7fb4",
        "cardId": "d518967d-2b76-4d83-8fad-b9c43cdba076",
        "charityId": "9a2e0ca5-e574-440e-af0a-5f58c035d7e8",
        "transactionId": "OTrPjQjNS3SC0d-BCPeb1Q",
        "orderId": "84b57c00-63b8-4392-afc6-a1286f02ccd8",
        "transactionStatus": "FAILURE"
      }
    ]
  }
}
```

