# Carbon Calculator China
source: https://developer.mastercard.com/carbon-calculator-china/documentation/index.md

## Overview {#overview}

The Carbon Calculator China service empowers issuers to provide consumers visibility into the environmental impact of their cross-border spending in China. The issuers receive detailed insights into the carbon footprints generated by transactions made with Mastercard cards, enabling them to take informed, sustainability-driven actions.

The solution uses a file-based scoring methodology, eliminating the need for the issuers or customers to register payment cards. The service calculates carbon scores for all transactions linked to the issuer's BINs registered during onboarding to the Mastercard Developer.

Carbon Calculator securely transmits the scores to the issuers using Next Gen File Transfer (NGFT) and Global File Transfer (GFT) protocols. The issuers can choose to integrate with either NGFT or GFT to access carbon scores for their BINs:

* **NGFT Integration**: The issuers who integrate Carbon Calculator using NGFT receive the scored CSV file directly from NGFT.
* **GFT Integration**: The issuers who integrate Carbon Calculator using GFT receive the scored CSV file directly from GFT.

## How it works {#how-it-works}

### NGFT integration {#ngft-integration}

This diagram shows the flow between Carbon Calculator and the issuer-integration using NGFT.

![NGFT-Integration](https://static.developer.mastercard.com/content/carbon-calculator-china/uploads/how-it-works-ngft.png)
* **DWH**: The Mastercard Data Warehouse (DWH) that stores all cleared transactions made from Mastercard cards.
* **Carbon Calculator**: The Carbon Calculator application that calculates and generates the carbon scores for each consumer.
* **CSV Scores File**: The CSV file with the carbon score that Carbon Calculator generates.
* **NGFT**: Next Gen File Transfer (NGFT) protocol used to transfer the CSV file to the issuer.
* **Issuer**: The financial institution that uses the Mastercard Carbon Calculator services.
1. The Carbon Calculator application fetches the cleared transactions from DWH for the BIN ranges registered by the issuer.
2. It generates the carbon scores for the fetched transactions.
3. It generates a CSV file with the scored transactions.
4. It uploads the CSV file to NGFT.
5. The issuer downloads the CSV file from NGFT to view the carbon scores.

*** ** * ** ***

### GFT integration {#gft-integration}

This diagram shows the flow between Carbon Calculator and the issuer-integration using GFT.

![GFT-Integration](https://static.developer.mastercard.com/content/carbon-calculator-china/uploads/how-it-works.png)
* **DWH**: The Mastercard Data Warehouse (DWH) that stores all cleared transactions made from Mastercard cards.
* **Carbon Calculator**: The Carbon Calculator application that calculates and generates the carbon scores for each consumer.
* **CSV Scores File**: The CSV file with the carbon score that Carbon Calculator generates.
* **NGFT**: Next Gen File Transfer (NGFT) protocol used to transfer the CSV file to the issuer.
* **GFT**: Global File Transfer (GFT) protocol used to transfer the CSV file to the issuer.
* **Issuer**: The financial institution that uses the Mastercard Carbon Calculator services.
1. The Carbon Calculator application fetches the cleared transactions from DWH for the BIN ranges registered by the issuer.
2. It generates the carbon scores for the fetched transactions.
3. It generates a CSV file with the scored transactions.
4. It uploads the CSV file to NGFT.
5. NGFT forwards the CSV file to GFT.
6. The issuer downloads the CSV file from GFT to view the carbon scores.

## Good to know {#good-to-know}

> * **Onboarding Information:** Onboarding is done through creating an account on [Mastercard Developers](https://developer.mastercard.com/) and activating Sandbox/Production project credentials.
> * **Terminologies:** For the definition of various terminologies used in this documentation, refer to the [Acronymns and terminologies](https://developer.mastercard.com/carbon-calculator-china/documentation/terminologies/index.md) section.
> * **Transaction Footprint Calculation:** For more details on how Carbon Calculator calculates the carbon scores, refer to the [Transaction footprint calculation](https://developer.mastercard.com/carbon-calculator-china/documentation/use-cases/transaction-footprint-calculation/index.md) section.
> * **File Reference and Error Codes:** Carbon Calculator returns the carbon scores in a CSV file. For more details about the CSV file structure and format, refer to the [File reference and error codes](https://developer.mastercard.com/carbon-calculator-china/documentation/file-reference-error-codes/index.md) section.

## Next steps {#next-steps}

Now that you have an understanding of the services authentication and encryption, proceed to the [File-based scoring basics](https://developer.mastercard.com/carbon-calculator-china/documentation/file-based-scoring-basics/index.md) section to learn how to create your project and register your BINs.
