# File-based scoring basics
source: https://developer.mastercard.com/carbon-calculator-china/documentation/file-based-scoring-basics/index.md

The Carbon Calculator China service is integrated through file‑based delivery, using NGFT or GFT rather than real‑time APIs.

## Client authentication {#client-authentication}

| Integration Type |                                                                                                                                                                                      Details                                                                                                                                                                                      |
|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| NGFT Integration | For client authentication over different file transfer mechanisms using NGFT, refer to the [Mastercard File Exchange User Guide V2.2.2](https://trc-techresource.mastercard.com/r/bundle/m_fxusg_en-us/page/d/en-US/pvd1747164178802.html) on the [TRC](https://developer.mastercard.com/carbon-calculator-china/documentation/terminologies/index.md#technical-resource-center). |
| GFT Integration  | For client authentication over different file transfer mechanisms using GFT, refer to the [File Transfer Manual](https://trc-techresource.mastercard.com/r/bundle/m_fb_en-us/page/d/en-US/jfv1723730939965.html) on the [TRC](https://developer.mastercard.com/carbon-calculator-china/documentation/terminologies/index.md#technical-resource-center).                           |

## Encryption {#encryption}

|   Encryption Type    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
|----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Transport Encryption | The transport between client applications and Mastercard is secured using [TLS / SSL](https://en.wikipedia.org/wiki/Transport_Layer_Security), which means data is secured by default when transmitted across networks. However, Mastercard additionally uses end-to-end payload encryption to encrypt sensitive data such as Personally Identifying Information (PII). Note: Visit [Securing Sensitive Data Using Payload Encryption](https://developer.mastercard.com/platform/documentation/security-and-authentication/securing-sensitive-data-using-payload-encryption/) to learn more about our encryption methods.                                                                                                                                                                                                                                                                                                                                                                                                                      |
| File Encryption      | Mastercard uses Pretty Good Privacy (PGP) to encrypt and decrypt files sent over NGFT and GFT. The issuer needs to use the PGP encryption private key to authenticate and decrypt the file after receiving it from Carbon Calculator. * **Encryption using NGFT integration**: In this integration type, NGFT applies PGP encryption after receiving the file and then securely transmits the encrypted file to the issuer. * **Encryption using GFT integration**: In this integration type, GFT applies PGP encryption after receiving the file and then securely transmits the encrypted file to the issuer. <br /> Note: Refer to the *Onboarding to the File Exchange - MTF application* section in the [Mastercard File Exchange User Guide V2.2.2](https://trc-techresource.mastercard.com/r/bundle/m_fxusg_en-us/page/d/en-US/pvd1747164178802.html) on the [TRC](https://developer.mastercard.com/carbon-calculator-china/documentation/terminologies/index.md#technical-resource-center) to learn more about our encryption methods. |

## How to consume the service? {#how-to-consume-the-service}

You receive the carbon scores through file transfers using [NGFT](https://developer.mastercard.com/carbon-calculator-china/documentation/index.md#ngft-integration) or [GFT](https://developer.mastercard.com/carbon-calculator-china/documentation/index.md#gft-integration) integrations. For more details, refer to the [File Transfer Applications](https://developer.mastercard.com/carbon-calculator-china/documentation/file-based-scoring-protocols/index.md) section.

## Environment descriptions {#environment-descriptions}

|               Environment                |                  Base URL                   |                                                                                                                                                              Description                                                                                                                                                              |
|------------------------------------------|---------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Sandbox - Mastercard Test Facility (MTF) | `https://sandbox.api.mastercard.com/carbon` | The pre-production test environment contains the latest pre-release or released version, intended for full integration testing before moving to production. The China issuer must have a corresponding MTF or test environment on their side. Mastercard recommends to complete testing in the MTF first before moving to production. |
| Production                               | `https://api.mastercard.com/carbon`         | The production environment contains the latest production release. You can request approval to obtain the production keys. Once approved, you can proceed to complete testing in the production environment before launching your solution.                                                                                           |

## Next steps {#next-steps}

Now that you have an understanding of the service's authentication and encryption, proceed to the [Quick Start Guide](https://developer.mastercard.com/carbon-calculator-china/documentation/quick-start-guide/index.md) section.
