# Payment Cards - Profiles
source: https://developer.mastercard.com/carbon-calculator/documentation/use-cases/payment_cards_profiles/index.md

The **Profiles** service calculates a climate profile based on the answers from a survey obtained from the surveys service. That profile will be stored with the provided payment card.
This process involves a meticulous analysis of user-provided answers to generate a comprehensive and nuanced representation of their climate preferences and perspectives

## Pre-requisites {#pre-requisites}

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

* The payment card should be successfully enrolled and active.
* Read and understood the [Payload Encryption](https://developer.mastercard.com/platform/documentation/security-and-authentication/securing-sensitive-data-using-payload-encryption/) guide for secure data communication with the API. Carbon Calculator API is using [Mastercard Encryption](https://developer.mastercard.com/platform/documentation/security-and-authentication/securing-sensitive-data-using-payload-encryption/#mastercard-encryption) with option of entire payload encryption. To understand how to encrypt a request object, refer to the [Build an end-to-end application](https://developer.mastercard.com/carbon-calculator/tutorial/api-testing/step18/index.md) tutorial.
* The issuer must call the GET surveys API to get the survey questions, complete the survey using [surveyjs.io](https://surveyjs.io/), and generate a JSON response containing the answers to the survey questions. The response JSON strings should be changed to the values as mentioned in the specification which then can be used as the request body for the profiles endpoint. Refer [Surveys](https://developer.mastercard.com/carbon-calculator/documentation/use-cases/engagement-services/surveys/index.md) to know more.

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/{payment_card_id}/profiles` endpoint.

Diagram payment-card-profiles

**Following are the execution steps:**

1. The consumer completes the surveys according to personal lifestyle.
2. The issuer app requests the issuer server to get the climate profile of the consumer based on the survey answers.
3. The issuer server requests the Carbon Calculator application to get the climate profile of the consumer.
4. The Carbon Calculator application validates the request.
5. The Carbon Calculator application calculates the climate profile.
6. The Carbon Calculator application sends the climate profile details to the issuer server.
7. The issuer server persists the climate profile for user.
8. The issuer server sends the profile details to issuer.
9. The issuer app requests payement card profile registration to the issuer server along with the user's climate profile and payment card ID.
10. The issuer server sends the payment card profile request to the Carbon Calculator application.
11. The Carbon Calculator application validates the payment card ID.
12. The Carbon Calculator application stores the climate profile with the payment card ID.
13. The Carbon Calculator application responds with the payment card profile details.
14. The issuer server sends the payment card profile details to the issuer app.

<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/{payment_card_id}/profiles`

