# Quick Start Guide
source: https://developer.mastercard.com/consent-management/documentation/quick-start-guide/index.md

## Overview {#overview}

Use this guide to go from account setup to your first successful Sandbox request for Consent Management \& Enrollment. You will create a project, generate credentials, make a test call, and prepare the same project for Production access.
Tip: For the fastest path to a working Sandbox request, start with the [Postman Collections](https://developer.mastercard.com/consent-management/documentation/developer-tools/postman-collection/index.md) page. You can use it to test Sandbox and Production flows before you write any code.

### Prerequisites {#prerequisites}

Before you begin, confirm the following:

* You have a Mastercard Developers account.
* You can sign in to your dashboard and create projects.
* You know whether your use case is single-card enrollment, bulk-card enrollment, or both.

### Checklist {#checklist}

|                                                                             #                                                                              |      Step      |                                                                                                        What to do                                                                                                        |
|------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [1](https://developer.mastercard.com/consent-management/documentation/quick-start-guide/index.md#step-1-get-access-to-mastercard-developers)               | Access         | Get access to Mastercard Developers.                                                                                                                                                                                     |
| [2](https://developer.mastercard.com/consent-management/documentation/quick-start-guide/index.md#step-2-create-a-project-and-generate-sandbox-credentials) | Project        | Create a Mastercard Developers project and get access to Consent Management \& Enrollment.                                                                                                                               |
| [3](https://developer.mastercard.com/consent-management/documentation/quick-start-guide/index.md#step-3-authentication)                                    | Authentication | Create a Mastercard OAuth signer.                                                                                                                                                                                        |
| [4](https://developer.mastercard.com/consent-management/documentation/quick-start-guide/index.md#step-4-make-your-first-sandbox-request)                   | First call     | Send your first Sandbox request using the Sandbox base URL and OAuth 1.0a signing.                                                                                                                                       |
| 5                                                                                                                                                          | Validation     | Use the sample response and [Testing](https://developer.mastercard.com/consent-management/documentation/testing/index.md) page to validate test data, positive flows, and negative flows.                                |
| 6                                                                                                                                                          | Production     | After Sandbox validation is complete, use the [Onboarding Checklist](https://developer.mastercard.com/consent-management/documentation/tutorials-and-guides/onboarding-checklist/index.md) to request Production access. |

## Step 1. Get access to Mastercard Developers {#step-1-get-access-to-mastercard-developers}

1. Go to [Mastercard Developers](https://developer.mastercard.com/) and create an account.
2. Activate your account by opening the link sent to your email address and log in.

## Step 2. Create a Project and Generate Sandbox Credentials {#step-2-create-a-project-and-generate-sandbox-credentials}

Create a Mastercard Developers project to generate your Sandbox credentials. Sandbox provides mocked data so that you can validate your integration before requesting Production access.

### Project Details {#project-details}

1. Click **Create new project** on your [My Projects](https://stage.developer.mastercard.com/dashboard) page. ![BIN Lookup Project Creation](https://static.developer.mastercard.com/content/consent-management/img/project-details.png)
2. Enter a project name.
3. Indicate whether you are creating the project on behalf of a client.
4. In the **Select at least one API** field, choose **Consents API** and click **Proceed** . If you intend to use additional services, such as [Transaction Notifications](https://developer.mastercard.com/product/transaction-notifications/) or [Insight Tokens](https://developer.mastercard.com/product/insight-tokens/), along with Consent Management \& Enrollment, add them in this step.

### Project Credentials {#project-credentials}

1. On the **Project Credentials** page, create a key alias and keystore password for your OAuth keys, record them securely, and click **Proceed**.

   ![BIN Lookup Project Credentials](https://static.developer.mastercard.com/content/consent-management/img/project-credentials.png)

### Additional Credentials {#additional-credentials}

1. Click Create Project on the **Additional Credentials** page.
2. Download the OAuth 1.0a key file and store in a safe place.
3. Click **Open Project** . ![Project creation confirmation with key download links](https://static.developer.mastercard.com/content/consent-management/img/project-creation.png)

### Save the values you will need {#save-the-values-you-will-need}

1. From the project dashboard, record the Sandbox consumer key. ![Sandbox consumer key](https://static.developer.mastercard.com/content/consent-management/img/consumer-key.png)

## Step 3. Authentication {#step-3-authentication}

Use OAuth 1.0a for all Consent Management \& Enrollment API requests.

For detailed setup guidance, use:

* [API Basics](https://developer.mastercard.com/consent-management/documentation/api-basics/index.md)
* [Using OAuth 1.0a to Access Mastercard APIs](https://developer.mastercard.com/platform/documentation/security-and-authentication/using-oauth-1a-to-access-mastercard-apis/)

## Step 4. Make Your First Sandbox Request {#step-4-make-your-first-sandbox-request}

Use a simple consent creation request to validate your Sandbox base URL, OAuth signing, and request format.

### curl example {#curl-example}

```bash
curl --request POST \
   --url https://sandbox.api.mastercard.com/openapis/authentication/consents \
   --header 'Content-Type: application/json' \
   --header 'Authorization: OAuth <signed_header>' \
   --data '{
      "cardDetails": {
         "pan": "2303779951000297",
         "expiryMonth": 12,
         "expiryYear": 2027,
         "cvc": "123",
         "cardholderName": "John"
      },
      "consents": [
         {
            "name": "notification",
            "details": {}
         }
      ]
   }'
```

### Successful Response Example {#successful-response-example}

A successful request returns a card reference and authentication status that indicates the card is ready for the next authentication step.

```json
{
  "cardReference": "9ce4fd0d-0fdb-4367-9854-fb2c6fa66eb1",
  "auth": {
    "type": "THREEDS",
    "params": {
      "threeDSServerTransId": "127-2373202372-2t6728"
    },
    "status": "AUTH_READY_TO_START"
  },
  "consents": [
    {
      "id": "12345",
      "status": "REQAUTH",
      "name": "notification",
      "details": {}
    }
  ]
}
```

Warning: The curl example above does not include OAuth signing. For a working curl call, use the [Postman Collection](https://developer.mastercard.com/consent-management/documentation/developer-tools/postman-collection/index.md) or the [Python example](https://developer.mastercard.com/consent-management/documentation/quick-start-guide/index.md#python-example) which handles signing using the `MCSigner` helper class described in [Authentication](https://developer.mastercard.com/consent-management/documentation/quick-start-guide/index.md#step-3-authentication).

### Python example {#python-example}

```python
import json
import requests
from requests.auth import AuthBase

import oauth1.authenticationutils as authenticationutils
from oauth1.signer import OAuthSigner


class MCSigner(AuthBase):
      def __init__(self, consumer_key, signing_key):
            self.signer = OAuthSigner(consumer_key, signing_key)

      def __call__(self, request):
            self.signer.sign_request(request.url, request)
            return request


consumer_key = "<sandbox_consumer_key>"
signing_key = authenticationutils.load_signing_key("./project-sandbox.p12", "<keystore_password>")
signer = MCSigner(consumer_key, signing_key)

payload = {
      "cardDetails": {
            "pan": "2303779951000297",
            "expiryMonth": 12,
            "expiryYear": 2027,
            "cvc": "123",
            "cardholderName": "John",
      },
      "consents": [{"name": "notification", "details": {}}],
}

response = requests.post(
   "https://sandbox.api.mastercard.com/openapis/authentication/consents",
      data=json.dumps(payload),
      headers={"content-type": "application/json"},
      auth=signer,
)

print(response.status_code)
print(response.text)
```

## Next Steps {#next-steps}

Now that you have successfully connected to the Consent Management \& Enrollment API, here are some next steps:

* **API Reference:** Review the full [API specification](https://developer.mastercard.com/consent-management/documentation/api-reference/index.md).
* **Go to Production:** When you are ready, follow the [onboarding checklist](https://developer.mastercard.com/consent-management/documentation/tutorials-and-guides/onboarding-checklist/index.md) to request production access.
