# View Aggregate Transaction Footprints
source: https://developer.mastercard.com/carbon-calculator/documentation/use-cases/aggregate_txn_footprint/index.md

The **View Aggregate Transaction Footprints** service allows the issuer to fetch aggregate transaction footprints for their registered consumers' PAN based on past payment transactions.

* The aggregate footprints can be requested either for weekly or monthly periods.
* The aggregate carbon footprint can be requested for multiple FPAN based on duration based aggregate types(refer NOTE section).

The issuer can use this response data directly and show it to the respective consumers.

### Sample Screenshots {#sample-screenshots}

The following screenshots show the sample screens that can be rendered using this service:
![Aggregate_carbon](https://static.developer.mastercard.com/content/carbon-calculator/Images/usecases/Aggregate.png)

## Pre-requisites {#pre-requisites}

Following are the pre-requisites for the issuer to use this service:

1. A PAN should be registered.
2. The issuer should have `payment_card_id` stored for the requesting consumer.

Note:   

* For a recently registered PAN, the historical transaction footprints will be available after **24-36 hours of registration** . There are schedulers available to fetch historical transactions which are configurable to run at some pre-defined intervals. **Although these intervals are subject to change, they Mostly run within 24 hours**.

* Maximum **5 FPAN** allowed for aggregate transaction footprints.

* Aggregate type for which aggregate needs to be calculated. Supported values are:

  * **1** (Calculate the weekly aggregate for the previous 26 weeks)

  * **2** (Calculate the monthly aggregate for the previous 12 months)

  * **3** (Calculate the monthly category-wise aggregate for the previous 12 months)

* The supported date range can not exceed **26 weeks for weekly aggregate** and **12 months for monthly aggregate**. This is an optional field. If the default date is not provided, then this date range will be picked.

* In order to retrieve aggregated carbon footprint for multiple PANs, the "crossPANAggregate" field should be sent with value 'Y' in request. This is an optional field and if not provided, the default value will be considered as 'N'.

Tip: To create your project on Mastercard Developers, refer to the [Before You Start](https://developer.mastercard.com/carbon-calculator/documentation/index.md#before-you-start) section for more information.

## Sequence Diagram {#sequence-diagram}

The following sequence diagram shows the order of events for a solution that uses the `/payment-cards/transaction-footprints/aggregates` endpoint.

Diagram aggregate-carbon

**Following are the execution steps:**

1. Consumer requests to view the aggregate transaction footprints for the payment card.
2. The issuer app sends the request to the issuer server.
3. The issuer server sends the request to `/payment-cards/transaction-footprints/aggregates` service with corresponding paymentCardIds.
4. The Carbon Calculator application validates the request and the `paymentCardIds`.
5. The Carbon Calculator application fetches the data as per request.
6. The Carbon Calculator application sends the aggregate transaction footprints to the issuer server.
7. The issuer server sends the aggregate transaction footprints to the issuer app.
8. The issuer app displays aggregate transaction footprints to the consumer.

<br />

You will receive an error response for an invalid request or any missing request parameter. Note: For more information about the error codes, refer to [Code and Formats](https://developer.mastercard.com/carbon-calculator/documentation/code-and-formats/index.md).

## Endpoint {#endpoint}


API Reference: `GET /payment-cards/transaction-footprints/aggregates`

