# Create and Manage Projects
source: https://developer.mastercard.com/mastercard-developers-api/documentation/tutorials-and-guides/create-and-manage-projects/index.md

###### Time to complete: *30 minutes* {#time-to-complete-30-minutes}

## Overview {#overview}

Follow the steps in this tutorial to create a project, add keys/credentials to the project and request production access.
1. Log in to [Mastercard Developers](https://developer.mastercard.com/dashboard) and navigate to your **Account** page.
2. In your Account page, go to the Developers API Keys section and click **Add key**.
3. **Choose Key Creation Method:**
   * **Option 1: Browser Keystore**
     1. Select **Generate key**.
     2. Enter a **Key name** and **Key password**.
     3. If prompted, review and accept the **Mastercard Developers API Terms \& Conditions** to proceed.
     4. Click **Create key**.
     5. Click **Download key** to download the [signing key](https://developer.mastercard.com/platform/documentation/security-and-authentication/using-oauth-1a-to-access-mastercard-apis/#the-signing-key) as a PKCS#12 keystore. Download and save your key file in a secure location. Once you exit this screen, you won't be able to download it.
     6. Get your [consumer key](https://developer.mastercard.com/platform/documentation/security-and-authentication/using-oauth-1a-to-access-mastercard-apis/#the-consumer-key) from the Developers API Keys section of your Account page.
   * **Option 2: Certificate Signing Request (CSR)**
     1. Select **Upload a CSR**.
     2. Enter a **Key name** and click **Add an attachment** to upload your CSR file.
     3. If prompted, review and accept the **Mastercard Developers API Terms \& Conditions** to proceed.
     4. Click **Create Key**.
     5. Get your [consumer key](https://developer.mastercard.com/platform/documentation/security-and-authentication/using-oauth-1a-to-access-mastercard-apis/#the-consumer-key) from the Developers API Keys section of your Account page.

**Key Limits and Status:**

* After adding a key, its status will appear as **Pending**. You will receive an email notification once the key is approved, after which you can start sending requests to Developers API.
* You can add a maximum of **2 keys**.
* If a key request is declined, you must revoke the declined key before adding a new one.

*** ** * ** ***

Start using the Developers API without the need to write any code. Run the Developers API Postman Collection to explore and test all the endpoints.
> To get started using the Postman collection, you will need a [Postman account](https://identity.getpostman.com/signup?addAccount=1), and you can optionally download the [Postman desktop application](https://www.postman.com/downloads/).

1. Extract the signing key (private key) from your PKCS#12 keystore using the following command (use the passphrase protecting your PKCS#12 file):
   * OpenSSL

   ```OpenSSL
   openssl pkcs12 -in 'mykey.p12' -nocerts -nodes -passin pass:{password} | openssl rsa -out mykey.pem
   ```

   Expected result:  

   ```java
   -----BEGIN RSA PRIVATE KEY-----
   MIIEpQIBAAKCAQEAzSdC+wm6Dv4ynlhU5tuMLMsX7AeMWoysQKAaCDCStEWUHyj4
   K84X+ZQH0kIJkpWS0M1+vWHTSAu0QvHNDPRIJKMNE2cCRVKApVZ8jQ9DhFkVYE0j
   AhggCNQTJ0kXDBvc1mZPOJDmXusvHIG3BbRSE6ohZHoUXAuAg4bbwZwmvgDgMrmN
   9A9upgMrVZMfrCWeKiBUKoGnwGwUf0iMiHXJhD1Wjdtf0+VAsZNI7r05n9FTHmiC
   ...
   YlR8szTbz1WEx//hU5Ea2sfcKmPDTNWQnx0IgSmPu5I9qf7KJxSYhOk=
   -----END RSA PRIVATE KEY-----
   ```

2. Click the following links to open the files in a new tab:   
   [mastercard_developers_api_postman.json](https://static.developer.mastercard.com/content/mastercard-developers-api/swagger/mastercard_developers_api_postman.json) (23KB)   
   [mastercard_developers_api_postman_environment.json](https://static.developer.mastercard.com/content/mastercard-developers-api/swagger/mastercard_developers_api_postman_environment.json) (562B)
3. Copy the content from each tab, paste it into a text editor (e.g., Notepad), and save as:
   * `mastercard_developers_api_postman.json` for the collection.
   * `mastercard_developers_api_postman_environment.json` for the environment.
4. In Postman, click **Import** and import **mastercard_developers_postman.json** and **mastercard_developers_postman_environment.json** :

   ![Import Postman Collection](https://static.developer.mastercard.com/content/mastercard-developers-api/uploads/postman-import-button.png)
5. Click **Environments** , then select **Mastercard Developers** . Copy the Consumer Key from the Developers API keys section of your Account page and update the `consumerKey` variable. Use the private key extracted in step 1 and update the `privateKey` variable.

   ![Postman Environment](https://static.developer.mastercard.com/content/mastercard-developers-api/uploads/postman-environment-keys_3.png)
6. You can then test the other endpoints by clicking **Send** on individual requests, or **Run collection**.

*** ** * ** ***

Call [POST /projects](https://developer.mastercard.com/mastercard-developers-api/documentation/api-reference/index.md) including all the required details for project creation.

Diagram createproject

API Reference: `POST /projects`

Some services require additional details when you create a project --- for example, customerId, BIN range, or ICA. These additional fields are defined in a configuration schema associated with the service.

To determine whether a service requires additional fields, check if a `configSchemaId` is included in the service details.

###### Step 3a: Check if the service has a configuration schema {#step-3a-check-if-the-service-has-a-configuration-schema}

1. Call the [GET /services](https://developer.mastercard.com/mastercard-developers-api/documentation/api-reference/index.md) endpoint.

2. Check if the `configSchemaId` is returned under `SANDBOX` environment within the service details.

* If the `configSchemaId` is present under the SANDBOX environment, it means you need to include additional fields when creating a project.
* If not present, you can create the project without config fields.

Example:

```JSON
{
  "id": 2016,
  "name": "MDES Customer Service",
  "environments": [
    {
      "name": "PRODUCTION",
      "credentialTypes": [
        "CLIENT_ENCRYPTION"
      ],
      "restrictions": [],
      "configSchemaId": "2302ed74-529f-7550-e063-8c909a0a4ead"
    },
    {
      "name": "SANDBOX",
      "credentialTypes": [],
      "restrictions": [],
      "configSchemaId": "2302ed74-5283-7550-e063-8c909a0a4ead"
    }
  ]
}
```

###### Step 3b: Retrieve the configuration schema {#step-3b-retrieve-the-configuration-schema}

1. If a `configSchemaId` is returned, use the corresponding `serviceId` and call the [GET /services/{service_id}/config-schemas?configType=PROJECT_SANDBOX](https://developer.mastercard.com/mastercard-developers-api/documentation/api-reference/index.md) endpoint.

2. The [GET /services/{service_id}/config-schemas?configType=PROJECT_SANDBOX](https://developer.mastercard.com/mastercard-developers-api/documentation/api-reference/index.md) endpoint returns a schema that tells you exactly which fields you need to include in your project creation request --- including field names, types, accepted values, and which fields are required.

Each field in the response will include details such as:

* `inputType`: the input format (e.g., string, email, number)
* `enum` : the accepted values (if any)
* `required` : whether the field is mandatory


API Reference: `GET /services/{service_id}/config-schemas`

**Example request**:

    GET /services/2106/config-schemas?configType=PROJECT_SANDBOX

**Example response**:

```json

[
    {
        "id": "2302ed74-529f-7550-e063-8c909a0a4ead",
        "type": "PROJECT_SANDBOX",
        "schema": {
            "type": "object",
            "title": "Provide more details",
            "properties": {
                "entityName": {
                    "type": "string",
                    "title": "Entity Name"
                },
                "Address": {
                    "type": "string",
                    "title": "Address"
                },
                "Phone": {
                    "type": "string",
                    "title": "Phone"
                },
                "customerId": {
                    "type": "string",
                    "title": "Customer ID"
                },
                "mastercardProjectNumber": {
                    "type": "string",
                    "title": "Mastercard Project Number"
                },
                "securityOfficerEmail": {
                    "type": "string",
                    "title": "Security Officer Email"
                },
                "securityOfficerContactName": {
                    "type": "string",
                    "title": "Security Officer Contact Name"
                }
            },
            "required": [
                "entityName",
                "customerId",
                "mastercardProjectNumber",
                "securityOfficerEmail",
                "securityOfficerContactName"
            ]
        },
        "resourceId": 2106
    }
]
```

###### Step 3c: Create the project including config fields {#step-3c-create-the-project-including-config-fields}

Once you know which fields are required, include them in the config object of your [POST /projects](https://developer.mastercard.com/mastercard-developers-api/documentation/tutorials-and-guides/create-and-manage-projects/(/documentation/api-reference/)/index.md) request.

**Example request**:

```JSON
{
  "type": "OAUTH10A",
  "name": "testproject",
  "environment": "SANDBOX",
  "company": null,
  "service": {
    "serviceId": 2106,
    "credentials": [],
    "config": {
      "Entity Name": "Organization",
      "Address": "Snoldelevvej 20",
      "Phone": "1233121212",
      "Customer IDICAs": "121222",
      "Mastercard Project Number": "456",
      "Security Officer Email": "securityofficeremail.com",
      "Security Officer Contact Name": "securityofficeremail.com"
    }
  },
  "credential": {
    "type": "SIGNING",
    "alias": "keyalias",
    "csr": "-----BEGIN CERTIFICATE REQUEST-----\r\nMIICtTCCAZ0CAQAwcDEMMAoGA1UEBhMDTi9BMQwwCgYDVQQIEwNOL0ExDDAKBgNV\r\nBAcTA04vQTEWMBQGA1UEAxMNTWFzdGVyQ2FyZEtleTEXMBUGA1UECxMOTWFzdGVy\r\nQ2FyZCBBUEkx----END CERTIFICATE REQUEST-----\r\n"
  },
  "commercialCountries": [
    "USA"
  ]
}
```

After successful project creation, the Developers API returns the project details including the credentials required to call your service/API. You will receive an email notification once the project is successfully created.   
Optionally you can call [GET /projects/{project_id}](https://developer.mastercard.com/mastercard-developers-api/documentation/api-reference/index.md) to view the status of your project creation.

Diagram createproject-dc-tutorial

*** ** * ** ***

Project credentials are service-agnostic and are used to authenticate your request to access Mastercard Services. To add a project credential, [call POST /projects/{project_id}/credentials](https://developer.mastercard.com/mastercard-developers-api/documentation/api-reference/index.md).

API Reference: `POST /projects/{project_id}/credentials`

Diagram addcred

*** ** * ** ***

Before you request production access, ensure you have fulfilled all the requirements that entitle you to access a production environment. To request production access, call [POST /projects/{project_id}/environments](https://developer.mastercard.com/mastercard-developers-api/documentation/api-reference/index.md).

API Reference: `POST /projects/{project_id}/environments`

Diagram requestprod

Some services require additional details when you request production access --- for example, customerId, BINs, or ICA. These additional fields are defined in a configuration schema associated with the service.

To determine whether a service requires additional fields, check if a `configSchemaId` is included in the service details.

###### Step 5a: Check if the service has a configuration schema {#step-5a-check-if-the-service-has-a-configuration-schema}

1. Call the [GET /services](https://developer.mastercard.com/mastercard-developers-api/documentation/api-reference/index.md) endpoint.

2. Check if the `configSchemaId` is returned under the `PRODUCTION` environment within the service details.

* If the `configSchemaId` is present under the PRODUCTION environment, it means you need to include additional fields when requesting production access.
* If not present, you can request production access without config fields.

Example:

```JSON
{
  "id": 2016,
  "name": "MDES Customer Service",
  "environments": [
    {
      "name": "PRODUCTION",
      "credentialTypes": [
        "CLIENT_ENCRYPTION"
      ],
      "restrictions": [],
      "configSchemaId": "2302ed74-529f-7550-e063-8c909a0a4ead"
    },
    {
      "name": "SANDBOX",
      "credentialTypes": [],
      "restrictions": [],
      "configSchemaId": "2302ed74-5283-7550-e063-8c909a0a4ead"
    }
  ]
}
```

###### Step 5b: Retrieve the configuration schema {#step-5b-retrieve-the-configuration-schema}

1. If a `configSchemaId` is returned, use the corresponding `serviceId` and call the [GET /services/{service_id}/config-schemas?configType=PROJECT_PRODUCTION](https://developer.mastercard.com/mastercard-developers-api/documentation/api-reference/index.md) endpoint.

2. The [GET /services/{service_id}/config-schemas?configType={configType}](https://developer.mastercard.com/mastercard-developers-api/documentation/api-reference/index.md) endpoint returns a schema that tells you exactly which fields you need to include in your production access request --- including field names, types, accepted values, and which fields are required.

Each field in the response will include details such as:

* `inputType`: the input format (e.g., string, email, number)
* `enum` : the accepted values (if any)
* `required` : whether the field is mandatory


API Reference: `GET /services/{service_id}/config-schemas`

**Example request**:

    GET /services/2106/config-schemas?configType=PROJECT_PRODUCTION

**Example response**:

```json

[
    {
        "id": "2302ed74-529f-7550-e063-8c909a0a4ead",
        "type": "PROJECT_PRODUCTION",
        "schema": {
            "type": "object",
            "title": "Provide more details",
            "properties": {
                "entityName": {
                    "type": "string",
                    "title": "Entity Name"
                },
                "Address": {
                    "type": "string",
                    "title": "Address"
                },
                "Phone": {
                    "type": "string",
                    "title": "Phone"
                },
                "customerId": {
                    "type": "string",
                    "title": "Customer ID"
                },
                "mastercardProjectNumber": {
                    "type": "string",
                    "title": "Mastercard Project Number"
                },
                "securityOfficerEmail": {
                    "type": "string",
                    "title": "Security Officer Email"
                },
                "securityOfficerContactName": {
                    "type": "string",
                    "title": "Security Officer Contact Name"
                }
            },
            "required": [
                "entityName",
                "customerId",
                "mastercardProjectNumber",
                "securityOfficerEmail",
                "securityOfficerContactName"
            ]
        },
        "resourceId": 2106
    }
]
```

###### Step 5c: Request production access including config fields {#step-5c-request-production-access-including-config-fields}

Once you know which fields are required, include them in the config object of your [POST /projects/{project_id}/environments](https://developer.mastercard.com/mastercard-developers-api/documentation/tutorials-and-guides/create-and-manage-projects/(/documentation/api-reference/)/index.md) request.

**Example request**:

```JSON

  {
  "name": "PRODUCTION",
  "credential": {
    "type": "SIGNING",
    "environment": "PRODUCTION",
    "alias": "keyalias",
    "csr": "-----BEGIN CERTIFICATE REQUEST-----\r\nMIICtTCCAZ0CAQAwcDEMMAoGA1UEBhMDTi9BMQwwCgYDVQQIEwNOL0ExDDAKBgNV\r\nBAcTA04vQTEWMBQGA1UEAxMNTWFzdGVyQ2FyZEtleTEXMBUGA1UECxMOTWFzdGVy\r\nQ2FyZCBBUEkxEzARBgNVBAoTCk1hc3RlckNhcmQwggEiMA0GCSqGSIb3DQEBAQUA\r\nA4IBDwAwggEKAoIBAQ=\r\n-----END CERTIFICATE REQUEST-----\r\n"
  },
  "serviceDetails": [
    {
      "serviceId": 2106,
      "config": {
        "Entity Name": "Organization",
        "Address": "Snoldelevvej 20",
        "Phone": "1233121212",
        "Customer IDICAs": "121222",
        "Mastercard Project Number": "456",
        "Security Officer Email": "securityofficeremail.com",
        "Security Officer Contact Name": "securityofficeremail.com"
      },
      "credentials": [
        {
          "type": "CLIENT_ENCRYPTION",
          "alias": "mdes-customer-service-ClientEnc1743490635185"
        }
      ]
    }
  ]
}
```

After successful submission, the Developers API returns the status of your production access request. You will receive an email notification once production access is granted.   
Optionally you can call [GET /projects/{project_id}](https://developer.mastercard.com/mastercard-developers-api/documentation/api-reference/index.md) to view the status of your project creation.

Diagram createproject-dc-prod-tutorial

Production keys are generated instantaneously, but they still need to be approved for production environment access before you can go live. Once your production access request has been reviewed, you will receive a notification confirming your access has been approved or denied.
Tip: Company verification is one of the requirements to approve your production access request. To learn more about company verification, see [Company Verification](https://developer.mastercard.com/platform/documentation/getting-started-with-mastercard-apis/managing-your-account/company-verification-via-connect-linking/)

*** ** * ** ***

After you create a project, you can add additional services to it. To add a service, call [POST /projects/{project_id}/services](https://developer.mastercard.com/mastercard-developers-api/documentation/api-reference/index.md).

API Reference: `POST /projects/{project_id}/services`

*** ** * ** ***

