# Quick Start Guide
source: https://developer.mastercard.com/small-business-credit-analytics/documentation/quick-start-guide/index.md

## Starting Using SBCA Metrics {#starting-using-sbca-metrics}

Use this guide to go from account setup to your first successful Sandbox request for Small Business Credit Analytics. You will create a project, generate credentials, make a test call, and prepare the same project for Production access.
Tip: Prefer a no-code option? You can also make this first call using the [Postman Collection](https://developer.mastercard.com/small-business-credit-analytics/documentation/postman-collection/index.md) instead of curl. Either way, the steps below are the fastest path to a working Sandbox request.

### Before you begin {#before-you-begin}

To make your first Sandbox call, you will need:

* A [Mastercard Developers](https://developer.mastercard.com/) account.
* A Small Business Credit Analytics project with **Sandbox credentials** (`.p12` file, consumer key, keystore password) --- see [Step 2](https://developer.mastercard.com/small-business-credit-analytics/documentation/quick-start-guide/index.md#step-2-create-a-project-and-generate-sandbox-credentials).
* An **OAuth 1.0a signer** or Mastercard client library to sign requests --- see [Step 3a](https://developer.mastercard.com/small-business-credit-analytics/documentation/quick-start-guide/index.md#step-3a-configure-oauth-10a-signing).
* A REST client (curl, Postman, or Insomnia) to send the request.

## Step 1: Get access to the API {#step-1-get-access-to-the-api}

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.
3. Open your [My Projects](https://developer.mastercard.com/dashboard) page and start a new project. Sandbox access is open, so you can begin testing as soon as your project credentials are generated.

## 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 gives you mocked data so you can validate your integration before requesting Production access.

### Create a Project {#create-a-project}

1. Go to your [My Projects](https://developer.mastercard.com/dashboard) dashboard.
2. Click the **Create New Project** button in the upper-right portion of the screen, as shown below. ![](https://static.developer.mastercard.com/content/small-business-credit-analytics/uploads/tutorials/creating_sandbox_project/create_project.png)

### Add Small Business Credit Analytics API to Your Project {#add-small-business-credit-analytics-api-to-your-project}

3. Enter a descriptive name of your project.
4. Type to search in API service dropdown list and select the **Small Business Credit Analytics API** option.
5. Type to search in Commercial countries dropdown list and select the country/countries to access merchant data.
6. Click **Proceed** to continue to the next step, as shown below. ![](https://static.developer.mastercard.com/content/small-business-credit-analytics/uploads/tutorials/creating_sandbox_project/select_an_api.png)

### Set Project Credentials {#set-project-credentials}

7. Enter **Key alias** and **Keystore password**.
8. Click **Proceed** to generate keys. ![](https://static.developer.mastercard.com/content/small-business-credit-analytics/uploads/tutorials/creating_sandbox_project/set_project_credentials.png)

### Download Sandbox Credentials {#download-sandbox-credentials}

9. After the project is successfully created, the Sandbox .p12 access credentials will be available for download as shown in the screenshot below:
10. Click the **Download key file** button to download a zip file containing the .p12 file required for OAuth authentication in Sandbox. Please save this file in a safe place as you won't be able to download it later.
11. Click on **Open project** to start working with the API in Sandbox. Note: You are required to capture the Keystore password and key alias shown on the screen. The Keystore password is used in conjunction with the .p12 file and Client ID for OAuth authentication. ![](https://static.developer.mastercard.com/content/small-business-credit-analytics/uploads/tutorials/creating_sandbox_project/download_sandbox_credentials.png)

## Step 3: Make your first Sandbox request {#step-3-make-your-first-sandbox-request}

Once you have Sandbox credentials, make a simple GET request to confirm that your project is set up correctly.

### Step 3a: Configure OAuth 1.0a signing {#step-3a-configure-oauth-10a-signing}

Before you run the request, set up request signing:

1. Load your Sandbox `.p12` file and keystore password into a Mastercard OAuth signer or [client library](https://developer.mastercard.com/platform/documentation/security-and-authentication/using-oauth-1a-to-access-mastercard-apis/#client-libraries).
2. Provide your Sandbox **consumer key** and the **private key** used to sign requests.
3. Confirm your signer generates `oauth_timestamp`, `oauth_nonce`, and `oauth_signature` on each call.

For full authentication details, see [API Basics --- Client Authentication](https://developer.mastercard.com/small-business-credit-analytics/documentation/api-basics/index.md#client-authentication).

### Step 3b: Send the request {#step-3b-send-the-request}

This first-call example uses `GET /matches`, so you can verify access, OAuth signing, and the Sandbox base URL before moving on to Metrics calls.

**Example Request (cURL):**

```bash
curl --request GET \
  --url "https://sandbox.api.mastercard.com/small-business/credit-analytics/locations/matches?country_code=USA&company_name=Artisan+Emporium&street_address=2000+Purchase+St&postal_code=10577&city=Purchase&state_province_region=NY" \
  --header "Authorization: OAuth oauth_consumer_key=\"YOUR_CONSUMER_KEY\", oauth_signature_method=\"RSA-SHA256\", oauth_timestamp=\"1709596800\", oauth_nonce=\"a1b2c3d4e5f6\", oauth_version=\"1.0\", oauth_signature=\"YOUR_COMPUTED_SIGNATURE\""
```

**Expected Response:**

```json
[
  {
    "locationId": "a1b2c3d4-0000-1234-abcd-000000000001",
    "matchRank": 1,
    "merchantName": "Artisan Emporium",
    "streetAddress": "2000 Purchase St",
    "city": "Purchase",
    "state": "NY",
    "postalCode": "10577",
    "countryCode": "USA"
  }
]
```

**Validate your first call:**

|       Check        |                           Expected                            |                     Confirms                      |
|--------------------|---------------------------------------------------------------|---------------------------------------------------|
| HTTP status code   | `200 OK`                                                      | OAuth credentials and request signing are correct |
| `locationId` field | Non-empty UUID (e.g., `a1b2c3d4-0000-1234-abcd-000000000001`) | Request parameters processed correctly            |

A `200 OK` response containing a `locationId` confirms your credentials, OAuth signing, and Sandbox connectivity are all working. You are ready to proceed to Metrics calls or explore more test scenarios.
Tip: **Troubleshooting your first call:**

* `401 DECLINED` --- Your consumer key or signing key does not match. Re-download your `.p12` file from the project dashboard and verify the keystore password.
* For any other Error Codes refer [Codes and Formats](https://developer.mastercard.com/small-business-credit-analytics/documentation/code-and-formats/index.md)
Note: No test data setup is required once Sandbox keys are downloaded. You can refer to the [Testing](https://developer.mastercard.com/small-business-credit-analytics/documentation/testing/index.md) section for testing the Small Business Credit Analytics APIs.

## Step 4: Promote the same project to production {#step-4-promote-the-same-project-to-production}

Once your project is working in Sandbox, request Production access for that same project.

### Pre-production checklist {#pre-production-checklist}

Before requesting Production access, confirm that all of the following are complete:

| # |                              Requirement                               |                            How to verify                            |
|---|------------------------------------------------------------------------|---------------------------------------------------------------------|
| 1 | Successful Sandbox `GET /matches` call returning a valid `locationId`  | HTTP `200 OK` with a non-empty UUID in the response                 |
| 2 | Successful Sandbox `GET /metrics/{location_id}` call returning metrics | HTTP `200 OK` with a `metricsLists` array containing metric entries |
| 3 | OAuth 1.0a signing working end-to-end                                  | No `401 DECLINED` errors on any Sandbox call                        |

**Required artifacts --- have these ready before you begin:**

* Your company's legal business name and address
* A key alias name that identifies the Production environment and keystore password for the Production `.p12` file and store this file in a secure location.

Note: **Before you begin:** All the checklist items mentioned above must pass. See [Testing](https://developer.mastercard.com/small-business-credit-analytics/documentation/testing/index.md) for Sandbox test cases covering both endpoints.

### Transition your project from Sandbox to Production {#transition-your-project-from-sandbox-to-production}

1. Navigate to your project under My projects menu.
2. Click the **Request Production Access** button, in the Project APIs section.

![](https://static.developer.mastercard.com/content/small-business-credit-analytics/uploads/tutorials/moving_to_production/request_production_access.png)
3. Fill in your profile details like Name, Company Info and Legal Business address.  

4. Click **Proceed** to go to next step.
![](https://static.developer.mastercard.com/content/small-business-credit-analytics/uploads/tutorials/moving_to_production/complete_your_profile.png)
5. Enter a descriptive name for the key which identifies its purpose and environment in the `Key Alias` field.   

6. Enter a password used to encrypt the keys that the customer will receive in the `Keystore Password` field.   

7. Click **Proceed** to generate private key for production access. That will be used for the Small Business Credit Analytics API calls.
![](https://static.developer.mastercard.com/content/small-business-credit-analytics/uploads/tutorials/moving_to_production/create_production_key.png).   

8. Click **Download key file** button to download a zip file containing the .p12 file required for OAuth authentication in Production. Please save this file in a safe place as you won't be able to download it later.   

9. Once you complete this process, the Mastercard API Support team will review and approve your request for Production access.   

10. You will receive an email from Mastercard Developers to your registered email address, depending upon the outcome of the review.   
Tip: **Production access is confirmed** when you receive an approval email from Mastercard Developers and can successfully authenticate against the production base URL using your production credentials.


Note: Production access requests are reviewed within 3--5 working days. You will receive an approval or rejection email to your registered email address. ![](https://static.developer.mastercard.com/content/small-business-credit-analytics/uploads/tutorials/moving_to_production/confirm_and_download_keys.png)

<br />

Note: If you have not received a response within 5 working days, contact [Mastercard support](mailto:advisors.help@mastercard.com?subject=SBCA:%20Production%20Access%20Escalation) with subject line "SBCA: Production Access Escalation --- \[Your Project Name\]" and include your project's Sandbox Client ID.

11. **Update your application configuration** Switch the base URL from Sandbox to Production:

* Sandbox: `https://sandbox.api.mastercard.com/small-business/credit-analytics/locations`
* Production: `https://api.mastercard.com/small-business/credit-analytics/locations`

Update your application to use the Production consumer key, signing key.
Note: OAuth 1.0a authentication work the same way in Sandbox and Production. The main changes are the Production key set, the Production approval state, and the Production base URL.

### Production go-live verification {#production-go-live-verification}

After receiving the approval email and updating your configuration, confirm production readiness:

| # |                                  Check                                   |                                                                                         Expected result                                                                                          |
|---|--------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1 | Authenticate against Production base URL                                 | No `401 DECLINED` error                                                                                                                                                                          |
| 2 | `GET /matches` and `GET /metrics/{location_id}` returns a valid response | HTTP `200 OK` with merchant match results                                                                                                                                                        |
| 3 | Error responses match expected format                                    | `4xx` errors return the standard `Errors.Error[]` structure --- see [Code and Formats](https://developer.mastercard.com/small-business-credit-analytics/documentation/code-and-formats/index.md) |

Once all checks pass, your application is live.

## Next Steps {#next-steps}

Continue with the documentation that matches your next task:

* [API Reference](https://developer.mastercard.com/small-business-credit-analytics/documentation/api-reference/index.md) for endpoint details
* [API Basics](https://developer.mastercard.com/small-business-credit-analytics/documentation/api-basics/index.md) for authentication, encryption, and client configuration
* [Reference App](https://developer.mastercard.com/small-business-credit-analytics/documentation/reference-app/index.md) application which shows typical usage of the APIs
* [Testing](https://developer.mastercard.com/small-business-credit-analytics/documentation/testing/index.md) for additional request scenarios
