# Testing
source: https://developer.mastercard.com/identity-insights-solutions/documentation/testing/index.md

This section provides the testing guides for your API integration in the sandbox environment.

## Test Cases {#test-cases}

This tutorial explains different test cases to verify positive and negative scenarios for the Identity Insights Solutions API endpoints.

| **Test Case ID** |        **Test Type**         |    **Test Type Details**    |   **Input**   | **Output** |                                   **Test Success Criteria**                                   |
|------------------|------------------------------|-----------------------------|---------------|------------|-----------------------------------------------------------------------------------------------|
| 1                | Customer input validation    | All fields                  | Customer Data | Variable   | All inputs are correctly formatted, 200 response is returned and match customer expectations. |
| 2                | Simulating 400 client errors | Omitting the required field | Customer Data | Variable   | Provided data input returns the expected output, simulating the desired error message.        |
| 3                | Simulating 400 client errors | Incorrect length/format     | Customer Data | Variable   | Provided data input returns the expected output, simulating the desired error message.        |

#### Choose a testing method {#choose-a-testing-method}

Choose a testing method that best matches how you want to validate requests:

* [Postman Collection](https://developer.mastercard.com/identity-insights-solutions/documentation/developer-tools/postman-collection/index.md) Postman Collection --- pre-built requests with OAuth and encryption configured.
* [Reference Application](https://developer.mastercard.com/identity-insights-solutions/documentation/developer-tools/reference-app/index.md) Reference Application --- a working implementation you can run and inspect.
* Custom API client generated as per guidance in [API Basics](https://developer.mastercard.com/identity-insights-solutions/documentation/api-basics/index.md).

#### Use case fields criteria {#use-case-fields-criteria}

Refer to the [Request Body Model.](https://developer.mastercard.com/identity-insights-solutions/documentation/api-reference/index.md)

#### The following are the sample request, and responses for the Test cases validations for both positive and negative test scenarios. {#the-following-are-the-sample-request-and-responses-for-the-test-cases-validations-for-both-positive-and-negative-test-scenarios}

#### Introduction {#introduction}

The endpoint allows the client to obtain insights for all possible transactions regardless of card brand.

#### Pre-requisites {#pre-requisites}

Refer to the [Tutorials and Guides](https://developer.mastercard.com/identity-insights-solutions/documentation/tutorials-and-guides/index.md) for details.

#### Sandbox test data for the endpoint {#sandbox-test-data-for-the-endpoint}

It is not permitted to use real-world identity data when testing in Sandbox.

Remove a mandatory field, or submit a field that does not comply with the schema

#### Sample Request and Response with required fields {#sample-request-and-response-with-required-fields}

**Identity Insights For Transaction**
**Request**

```json
{
  "workflowId": 1
}
```

**Response**

```json

{
  "alerts": [],
  "requestId": "",
  "responseId": "b6ab37ac-05ce-43fa-8e10-c79f627c43f7",
  "warnings": [],
  "identityInsights": {
    "riskScore": {
      "current": {
        "reasonCode": "JA"
      }
    }
  },
  "ipInsights": {
    "carrier": {},
    "riskScore": {
      "current": {}
    }
  },
  "primaryPersonInsights": {
    "address": {
      "validityLevel": "missing_address"
    },
    "emailAddress": {
      "riskScore": {
        "current": {}
      }
    }
  },
  "secondaryPersonInsights": {
    "address": {
      "validityLevel": "missing_address"
    }
  }
}
```

**Identity Insights Risk Score**
**Request**

```json
{
  "workflowId": 2
}
```

**Response**

```json
{
  "alerts": [],
  "requestId": "",
  "responseId": "12e5864e-6dfa-487b-a298-42cdfac681fa",
  "warnings": [],
  "identityInsights": {
    "riskScore": {
      "current": {
        "reasonCode": "JA"
      }
    }
  }
}
```

**Identity Insights For Datasharing**
**Request**

```json
{
  "merchantDetails": {
    "name": "Acme Inc"
  },
  "paymentMethodDetails": {
    "cardBin": "123456",
    "cardLast4": "4242"
  },
  "transactionDetails": {
    "amount": "12345",
    "currencyCode": "840",
    "currencyExponent": "2",
    "purchaseDate": "20220721173228",
    "transactionType": "02"
  }
}
```

**Response**

```json
{
  "responseId": "ace0706a-4230-4283-aec3-11b8c86371aa",
  "datashareReceivedStatus": "success"
}
```

#### Sample Request and Response with required and optional fields {#sample-request-and-response-with-required-and-optional-fields}

**Identity Insights For Transaction**
**Request**

```json
{
  "accountDetails": {
    "accAgeInd": "05",
    "accChange": "20260325",
    "accPwChange": "20260325",
    "txnActivityDay": "234",
    "txnActivityYear": "10"
  },
  "deviceDetails": {
    "colorDepth": 24,
    "deviceId": "04",
    "deviceLatitude": "40.7128",
    "deviceLongitude": "74.0060",
    "deviceType": "01",
    "language": "zh-TW",
    "screenHeight": "820",
    "screenWidth": "1024",
    "sdkAppID": "550e8400-e29b-41d4-a716-446655440000",
    "sdkMajorVersion": 12,
    "sdkMinorVersion": 0,
    "sdkModel": "iPhone",
    "timeZone": "600",
    "userAgent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 7.0; InfoPath.3; .NET CLR 3.1.40767; Trident/6.0; en-IN)",
    "ipAddress": "198.51.100.42"
  },
  "endCustomerReferenceId": "45342",
  "merchantDetails": {
    "acquirerBin": "54349600",
    "acquirerMerchantId": "ACME123456",
    "categoryCode": "0742",
    "countryCode": "840",
    "name": "Acme Inc"
  },
  "merchantTrustAssessment": {
    "additionalSignals": "R",
    "merchantRiskScore": "0",
    "refundGuarantee": true
  },
  "primaryPersonDetails": {
    "address": {
      "city": "Houston",
      "country": "840",
      "postCode": "63124",
      "state": "TX",
      "streetLine1": "912 Uclan Dr",
      "streetLine2": "Apt 34"
    },
    "emailAddress": "john@mastercard.com",
    "name": "Waidong L Syrws",
    "phoneNumber1": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    },
    "phoneNumber2": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    }
  },
  "requestId": "14cda309-f33b-4ff7-b8cf-3dbf87b2a232",
  "secondaryPersonDetails": {
    "address": {
      "city": "Houston",
      "country": "840",
      "postCode": "63124",
      "state": "TX",
      "streetLine1": "912 Uclan Dr",
      "streetLine2": "Apt 34"
    },
    "emailAddress": "ted@mastercard.com",
    "name": "Waidong L Syrws",
    "phoneNumber1": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    }
  },
  "paymentMethodDetails": {
    "accountNumber": "5434960000000000000",
    "cardBin": "54349600",
    "cardExpiryDate": "2311",
    "cardLast4": "4242",
    "isCardOnFile": true
  },
  "transactionDetails": {
    "amount": "12345",
    "currencyCode": "840",
    "currencyExponent": "2",
    "itemCount": 3,
    "purchaseDate": "20220721173228",
    "recurringPaymentDetails": {
      "expiryDate": "20260325",
      "frequency": "345"
    },
    "shippingIndicator": "02",
    "topItemBrand": "Samsung",
    "topItemCost": "12345",
    "transactionType": "02"
  },
  "workflowId": 1
}
```

**Response**

```json

{
  "alerts": [],
  "requestId": "14cda309-f33b-4ff7-b8cf-3dbf87b2a232",
  "responseId": "86342b47-c1ca-43de-a6d4-ec1ed3ae831d",
  "warnings": [
    "Account Number: Is invalid"
  ],
  "deviceInsights": {
    "application": "IE",
    "platform": "Windows",
    "riskScore": {
      "current": {
        "value": 1.0
      }
    },
    "type": "Other"
  },
  "identityInsights": {
    "ipWithDevice": {
      "firstSeen": "0"
    },
    "riskScore": {
      "current": {
        "reasonCode": "AA",
        "value": 491.0
      }
    }
  },
  "ipInsights": {
    "carrier": {
      "city": "Reserved"
    },
    "connectionType": "cable-dsl",
    "isProxy": true,
    "lastSeen": "2026-10-16",
    "riskScore": {
      "current": {
        "value": 0.894
      }
    }
  },
  "primaryPersonInsights": {
    "address": {
      "validityLevel": "valid_to_country"
    },
    "emailAddress": {
      "domainProvider": {
        "creationDate": "1994-07-27"
      },
      "firstSeen": "0",
      "isDisposable": false,
      "isValid": true,
      "lastSeen": "0",
      "matchToName": "not-found",
      "riskScore": {
        "current": {
          "value": 0.804
        }
      }
    },
    "phoneNumber1": {
      "carrier": {
        "name": "T-Mobile Usa"
      },
      "isValid": true,
      "lineType": "mobile",
      "matchToName": "not-found"
    },
    "phoneNumber2": {
      "carrier": {
        "name": "T-Mobile Usa"
      },
      "isValid": true,
      "lineType": "mobile",
      "matchToName": "not-found"
    }
  },
  "secondaryPersonInsights": {
    "address": {
      "validityLevel": "valid_to_country"
    }
  },
  "datashareReceivedStatus": "success"
}
```

**Identity Insights Risk Score**
**Request**

```json
{
  "accountDetails": {
    "accAgeInd": "05",
    "accChange": "20260325",
    "accPwChange": "20260325",
    "txnActivityDay": "234",
    "txnActivityYear": "10"
  },
  "deviceDetails": {
    "colorDepth": 24,
    "deviceId": "04",
    "deviceLatitude": "40.7128",
    "deviceLongitude": "74.0060",
    "deviceType": "01",
    "language": "zh-TW",
    "screenHeight": "820",
    "screenWidth": "1024",
    "sdkAppID": "550e8400-e29b-41d4-a716-446655440000",
    "sdkMajorVersion": 12,
    "sdkMinorVersion": 0,
    "sdkModel": "iPhone",
    "timeZone": "600",
    "userAgent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 7.0; InfoPath.3; .NET CLR 3.1.40767; Trident/6.0; en-IN)",
    "ipAddress": "198.51.100.42"
  },
  "endCustomerReferenceId": "45342",
  "merchantDetails": {
    "acquirerBin": "54349600",
    "acquirerMerchantId": "ACME123456",
    "categoryCode": "0742",
    "countryCode": "840",
    "name": "Acme Inc"
  },
  "merchantTrustAssessment": {
    "additionalSignals": "R",
    "merchantRiskScore": "0",
    "refundGuarantee": true
  },
  "primaryPersonDetails": {
    "address": {
      "city": "Houston",
      "country": "840",
      "postCode": "63124",
      "state": "TX",
      "streetLine1": "912 Uclan Dr",
      "streetLine2": "Apt 34"
    },
    "emailAddress": "john@mastercard.com",
    "name": "Waidong L Syrws",
    "phoneNumber1": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    },
    "phoneNumber2": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    }
  },
  "requestId": "14cda309-f33b-4ff7-b8cf-3dbf87b2a232",
  "secondaryPersonDetails": {
    "address": {
      "city": "Houston",
      "country": "840",
      "postCode": "63124",
      "state": "TX",
      "streetLine1": "912 Uclan Dr",
      "streetLine2": "Apt 34"
    },
    "emailAddress": "ted@mastercard.com",
    "name": "Waidong L Syrws",
    "phoneNumber1": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    }
  },
  "paymentMethodDetails": {
    "accountNumber": "5434960000000000000",
    "cardBin": "54349600",
    "cardExpiryDate": "2311",
    "cardLast4": "4242",
    "isCardOnFile": true
  },
  "transactionDetails": {
    "amount": "12345",
    "currencyCode": "840",
    "currencyExponent": "2",
    "itemCount": 3,
    "purchaseDate": "20220721173228",
    "recurringPaymentDetails": {
      "expiryDate": "20260325",
      "frequency": "345"
    },
    "shippingIndicator": "02",
    "topItemBrand": "Samsung",
    "topItemCost": "12345",
    "transactionType": "02"
  },
  "workflowId": 2
}
```

**Response**

```json
{
  "alerts": [],
  "requestId": "14cda309-f33b-4ff7-b8cf-3dbf87b2a232",
  "responseId": "5a7d8d92-2167-46b6-ac3e-ff3fc70ca0e5",
  "warnings": [
    "Account Number: Is invalid"
  ],
  "identityInsights": {
    "riskScore": {
      "current": {
        "reasonCode": "AA",
        "value": 491.0
      }
    }
  },
  "datashareReceivedStatus": "success"
}
```

**Identity Insights For Datasharing**
**Request**

```json
{
  "accountDetails": {
    "accAgeInd": "03",
    "accChange": "20260325",
    "accPwChange": "20260325",
    "txnActivityDay": "234",
    "txnActivityYear": "10"
  },
  "deviceDetails": {
    "colorDepth": 24,
    "deviceId": "04",
    "deviceLatitude": "40.7128",
    "deviceLongitude": "74.0060",
    "deviceType": "04",
    "language": "zh-TW",
    "screenHeight": "820",
    "screenWidth": "1024",
    "sdkAppID": "550e8400-e29b-41d4-a716-446655440000",
    "sdkMajorVersion": 12,
    "sdkMinorVersion": 0,
    "sdkModel": "iPhone",
    "timeZone": "600",
    "userAgent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 7.0; InfoPath.3; .NET CLR 3.1.40767; Trident/6.0; en-IN)",
    "ipAddress": "198.51.100.42"
  },
  "endCustomerReferenceId": "45342",
  "merchantDetails": {
    "acquirerBin": "444444",
    "acquirerMerchantId": "ACME123456",
    "categoryCode": "0742",
    "countryCode": "840",
    "name": "Acme Inc"
  },
  "merchantTrustAssessment": {
    "additionalSignals": "R",
    "merchantRiskScore": "0",
    "refundGuarantee": true
  },
  "primaryPersonDetails": {
    "address": {
      "city": "Houston",
      "country": "840",
      "postCode": "63124",
      "state": "TX",
      "streetLine1": "912 Uclan Dr",
      "streetLine2": "Apt 34"
    },
    "emailAddress": "john@mastercard.com",
    "name": "Waidong L Syrws",
    "phoneNumber1": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    },
    "phoneNumber2": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    }
  },
  "requestId": "14cda309-f33b-4ff7-b8cf-3dbf87b2a232",
  "secondaryPersonDetails": {
    "address": {
      "city": "Houston",
      "country": "840",
      "postCode": "63124",
      "state": "TX",
      "streetLine1": "912 Uclan Dr",
      "streetLine2": "Apt 34"
    },
    "emailAddress": "ted@mastercard.com",
    "name": "Waidong L Syrws",
    "phoneNumber1": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    }
  },
  "paymentMethodDetails": {
    "accountNumber": "2303770003400262",
    "cardBin": "123456",
    "cardExpiryDate": "2311",
    "cardLast4": "4242",
    "isCardOnFile": true
  },
  "transactionDetails": {
    "amount": "12345",
    "currencyCode": "840",
    "currencyExponent": "2",
    "itemCount": 3,
    "purchaseDate": "20220721173228",
    "recurringPaymentDetails": {
      "expiryDate": "20260325",
      "frequency": "345"
    },
    "shippingIndicator": "02",
    "topItemBrand": "Samsung",
    "topItemCost": "12345",
    "transactionType": "02"
  }
}
```

**Response**

```json
{
  "requestId": "14cda309-f33b-4ff7-b8cf-3dbf87b2a232",
  "responseId": "5f2ed63a-7211-420a-bc2a-6a21fb67da6b",
  "datashareReceivedStatus": "success"
}
```

#### Introduction {#introduction}

The endpoint does not return insights for invalid, malformed, or missing required fields.

#### Pre-requisites {#pre-requisites}

Refer to the [Code and format section](https://developer.mastercard.com/identity-insights-solutions/documentation/code-and-formats/index.md) for details.

#### Sandbox test data for the endpoint {#sandbox-test-data-for-the-endpoint}

It is not permitted to use real-world identity data when testing in Sandbox

Workflow ID is required for insights

**Identity Insights For Transaction**
**Request**

```json
{
  "accountDetails": {
    "accAgeInd": "05",
    "accChange": "20260325",
    "accPwChange": "20260325",
    "txnActivityDay": "234",
    "txnActivityYear": "10"
  },
  "deviceDetails": {
    "colorDepth": 24,
    "deviceId": "04",
    "deviceLatitude": "40.7128",
    "deviceLongitude": "74.0060",
    "deviceType": "01",
    "language": "zh-TW",
    "screenHeight": "820",
    "screenWidth": "1024",
    "sdkAppID": "550e8400-e29b-41d4-a716-446655440000",
    "sdkMajorVersion": 12,
    "sdkMinorVersion": 0,
    "sdkModel": "iPhone",
    "timeZone": "600",
    "userAgent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 7.0; InfoPath.3; .NET CLR 3.1.40767; Trident/6.0; en-IN)",
    "ipAddress": "198.51.100.42"
  },
  "endCustomerReferenceId": "45342",
  "merchantDetails": {
    "acquirerBin": "54349600",
    "acquirerMerchantId": "ACME123456",
    "categoryCode": "0742",
    "countryCode": "840",
    "name": "Acme Inc"
  },
  "merchantTrustAssessment": {
    "additionalSignals": "R",
    "merchantRiskScore": "0",
    "refundGuarantee": true
  },
  "primaryPersonDetails": {
    "address": {
      "city": "Houston",
      "country": "840",
      "postCode": "63124",
      "state": "TX",
      "streetLine1": "912 Uclan Dr",
      "streetLine2": "Apt 34"
    },
    "emailAddress": "john@mastercard.com",
    "name": "Waidong L Syrws",
    "phoneNumber1": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    },
    "phoneNumber2": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    }
  },
  "requestId": "14cda309-f33b-4ff7-b8cf-3dbf87b2a232",
  "secondaryPersonDetails": {
    "address": {
      "city": "Houston",
      "country": "840",
      "postCode": "63124",
      "state": "TX",
      "streetLine1": "912 Uclan Dr",
      "streetLine2": "Apt 34"
    },
    "emailAddress": "ted@mastercard.com",
    "name": "Waidong L Syrws",
    "phoneNumber1": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    }
  },
  "paymentMethodDetails": {
    "accountNumber": "5434960000000000000",
    "cardBin": "54349600",
    "cardExpiryDate": "2311",
    "cardLast4": "4242",
    "isCardOnFile": true
  },
  "transactionDetails": {
    "amount": "12345",
    "currencyCode": "840",
    "currencyExponent": "2",
    "itemCount": 3,
    "purchaseDate": "20220721173228",
    "recurringPaymentDetails": {
      "expiryDate": "20260325",
      "frequency": "345"
    },
    "shippingIndicator": "02",
    "topItemBrand": "Samsung",
    "topItemCost": "12345",
    "transactionType": "02"
  }
}
```

**Response**

```json
{
"Errors": {
"Error": [
{
"Source": "INSIGHTS",
"ReasonCode": "Required Field Missing",
"Description": "workflowId",
"Recoverable": false
}
]
}
}
```

**Identity Insights Risk Score**
**Request**

```json
{
  "accountDetails": {
    "accAgeInd": "05",
    "accChange": "20260325",
    "accPwChange": "20260325",
    "txnActivityDay": "234",
    "txnActivityYear": "10"
  },
  "deviceDetails": {
    "colorDepth": 24,
    "deviceId": "04",
    "deviceLatitude": "40.7128",
    "deviceLongitude": "74.0060",
    "deviceType": "01",
    "language": "zh-TW",
    "screenHeight": "820",
    "screenWidth": "1024",
    "sdkAppID": "550e8400-e29b-41d4-a716-446655440000",
    "sdkMajorVersion": 12,
    "sdkMinorVersion": 0,
    "sdkModel": "iPhone",
    "timeZone": "600",
    "userAgent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 7.0; InfoPath.3; .NET CLR 3.1.40767; Trident/6.0; en-IN)",
    "ipAddress": "198.51.100.42"
  },
  "endCustomerReferenceId": "45342",
  "merchantDetails": {
    "acquirerBin": "54349600",
    "acquirerMerchantId": "ACME123456",
    "categoryCode": "0742",
    "countryCode": "840",
    "name": "Acme Inc"
  },
  "merchantTrustAssessment": {
    "additionalSignals": "R",
    "merchantRiskScore": "0",
    "refundGuarantee": true
  },
  "primaryPersonDetails": {
    "address": {
      "city": "Houston",
      "country": "840",
      "postCode": "63124",
      "state": "TX",
      "streetLine1": "912 Uclan Dr",
      "streetLine2": "Apt 34"
    },
    "emailAddress": "john@mastercard.com",
    "name": "Waidong L Syrws",
    "phoneNumber1": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    },
    "phoneNumber2": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    }
  },
  "requestId": "14cda309-f33b-4ff7-b8cf-3dbf87b2a232",
  "secondaryPersonDetails": {
    "address": {
      "city": "Houston",
      "country": "840",
      "postCode": "63124",
      "state": "TX",
      "streetLine1": "912 Uclan Dr",
      "streetLine2": "Apt 34"
    },
    "emailAddress": "ted@mastercard.com",
    "name": "Waidong L Syrws",
    "phoneNumber1": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    }
  },
  "paymentMethodDetails": {
    "accountNumber": "5434960000000000000",
    "cardBin": "54349600",
    "cardExpiryDate": "2311",
    "cardLast4": "4242",
    "isCardOnFile": true
  },
  "transactionDetails": {
    "amount": "12345",
    "currencyCode": "840",
    "currencyExponent": "2",
    "itemCount": 3,
    "purchaseDate": "20220721173228",
    "recurringPaymentDetails": {
      "expiryDate": "20260325",
      "frequency": "345"
    },
    "shippingIndicator": "02",
    "topItemBrand": "Samsung",
    "topItemCost": "12345",
    "transactionType": "02"
  },
  "workflowId": 3
}
```

**Response**

```json
{
"Errors": {
"Error": [
{
"Source": "INSIGHTS",
"ReasonCode": "Invalid Format",
"Description": "workflowId: must be less than or equal to 2",
"Recoverable": false,
"Details": "workflowId"
}
]
}
}
```

**Identity Insights For Datasharing**
**Request**

```json
{
  "accountDetails": {
    "accAgeInd": "03",
    "accChange": "20260325",
    "accPwChange": "20260325",
    "txnActivityDay": "234",
    "txnActivityYear": "10"
  },
  "deviceDetails": {
    "colorDepth": 24,
    "deviceId": "04",
    "deviceLatitude": "40.7128",
    "deviceLongitude": "74.0060",
    "deviceType": "04",
    "language": "zh-TW",
    "screenHeight": "820",
    "screenWidth": "1024",
    "sdkAppID": "550e8400-e29b-41d4-a716-446655440000",
    "sdkMajorVersion": 12,
    "sdkMinorVersion": 0,
    "sdkModel": "iPhone",
    "timeZone": "600",
    "userAgent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 7.0; InfoPath.3; .NET CLR 3.1.40767; Trident/6.0; en-IN)",
    "ipAddress": "198.51.100.42"
  },
  "endCustomerReferenceId": "45342",
  "merchantDetails": {
    "acquirerBin": "444444",
    "acquirerMerchantId": "ACME123456",
    "categoryCode": "0742",
    "countryCode": "840",
    "name": "Acme Inc"
  },
  "merchantTrustAssessment": {
    "additionalSignals": "R",
    "merchantRiskScore": "0",
    "refundGuarantee": true
  },
  "primaryPersonDetails": {
    "address": {
      "city": "Houston",
      "country": "840",
      "postCode": "63124",
      "state": "TX",
      "streetLine1": "912 Uclan Dr",
      "streetLine2": "Apt 34"
    },
    "emailAddress": "john@mastercard.com",
    "name": "Waidong L Syrws",
    "phoneNumber1": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    },
    "phoneNumber2": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    }
  },
  "requestId": "14cda309-f33b-4ff7-b8cf-3dbf87b2a232",
  "secondaryPersonDetails": {
    "address": {
      "city": "Houston",
      "country": "840",
      "postCode": "63124",
      "state": "TX",
      "streetLine1": "912 Uclan Dr",
      "streetLine2": "Apt 34"
    },
    "emailAddress": "ted@mastercard.com",
    "name": "Waidong L Syrws",
    "phoneNumber1": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    }
  },
  "paymentMethodDetails": {
    "accountNumber": "2303770003400262",
    "cardBin": "123456",
    "cardExpiryDate": "2311",
    "cardLast4": "4242",
    "isCardOnFile": true
  },
  "transactionDetails": {
    "currencyCode": "840",
    "currencyExponent": "2",
    "itemCount": 3,
    "purchaseDate": "20220721173228",
    "recurringPaymentDetails": {
      "expiryDate": "20260325",
      "frequency": "345"
    },
    "shippingIndicator": "02",
    "topItemBrand": "Samsung",
    "topItemCost": "12345",
    "transactionType": "02"
  }
}
```

**Response**

```json
Error:
{
"Errors": {
"Error": [
{
"Source": "DATASHARES",
"ReasonCode": "Required Field Missing",
"Description": "transactionDetails.amount: must not be null",
"Recoverable": false,
"Details": "transactionDetails.amount"
}
]
}
}
```

#### Introduction {#introduction}

The endpoint does not provide insights for unauthorized requests.

#### Pre-requisites {#pre-requisites}

Refer to the [Code and format section](https://developer.mastercard.com/identity-insights-solutions/documentation/code-and-formats/index.md) for details.

#### Sandbox Test Data for the Endpoint {#sandbox-test-data-for-the-endpoint}

It is not permitted to use real-world identity data when testing in Sandbox.

Use a Client ID or MTLS certificate other than those generated for your project in Mastercard Developer Zone.

#### Unauthorized - Access Granted Scenario {#unauthorized---access-granted-scenario}

**Identity Insights For Transaction**
**Request**

```json
{
  "accountDetails": {
    "accAgeInd": "05",
    "accChange": "20260325",
    "accPwChange": "20260325",
    "txnActivityDay": "234",
    "txnActivityYear": "10"
  },
  "deviceDetails": {
    "colorDepth": 24,
    "deviceId": "04",
    "deviceLatitude": "40.7128",
    "deviceLongitude": "74.0060",
    "deviceType": "01",
    "language": "zh-TW",
    "screenHeight": "820",
    "screenWidth": "1024",
    "sdkAppID": "550e8400-e29b-41d4-a716-446655440000",
    "sdkMajorVersion": 12,
    "sdkMinorVersion": 0,
    "sdkModel": "iPhone",
    "timeZone": "600",
    "userAgent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 7.0; InfoPath.3; .NET CLR 3.1.40767; Trident/6.0; en-IN)",
    "ipAddress": "198.51.100.42"
  },
  "endCustomerReferenceId": "45342",
  "merchantDetails": {
    "acquirerBin": "54349600",
    "acquirerMerchantId": "ACME123456",
    "categoryCode": "0742",
    "countryCode": "840",
    "name": "Acme Inc"
  },
  "merchantTrustAssessment": {
    "additionalSignals": "R",
    "merchantRiskScore": "0",
    "refundGuarantee": true
  },
  "primaryPersonDetails": {
    "address": {
      "city": "Houston",
      "country": "840",
      "postCode": "63124",
      "state": "TX",
      "streetLine1": "912 Uclan Dr",
      "streetLine2": "Apt 34"
    },
    "emailAddress": "john@mastercard.com",
    "name": "Waidong L Syrws",
    "phoneNumber1": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    },
    "phoneNumber2": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    }
  },
  "requestId": "14cda309-f33b-4ff7-b8cf-3dbf87b2a232",
  "secondaryPersonDetails": {
    "address": {
      "city": "Houston",
      "country": "840",
      "postCode": "63124",
      "state": "TX",
      "streetLine1": "912 Uclan Dr",
      "streetLine2": "Apt 34"
    },
    "emailAddress": "ted@mastercard.com",
    "name": "Waidong L Syrws",
    "phoneNumber1": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    }
  },
  "paymentMethodDetails": {
    "accountNumber": "5434960000000000000",
    "cardBin": "54349600",
    "cardExpiryDate": "2311",
    "cardLast4": "4242",
    "isCardOnFile": true
  },
  "transactionDetails": {
    "amount": "12345",
    "currencyCode": "840",
    "currencyExponent": "2",
    "itemCount": 3,
    "purchaseDate": "20220721173228",
    "recurringPaymentDetails": {
      "expiryDate": "20260325",
      "frequency": "345"
    },
    "shippingIndicator": "02",
    "topItemBrand": "Samsung",
    "topItemCost": "12345",
    "transactionType": "02"
  },
  "workflowId": 1
}
```

**Response**

```json
{
  "Errors": [
    {
      "Error": {
        "Source": "Gateway",
        "ReasonCode": "DECLINED",
        "Description": "Unauthorized - Access Not Granted",
        "Recoverable": false,
        "Details": null
      }
    }
  ]
}
```

**Identity Insights Risk Score**
**Request**

```json
{
  "accountDetails": {
    "accAgeInd": "05",
    "accChange": "20260325",
    "accPwChange": "20260325",
    "txnActivityDay": "234",
    "txnActivityYear": "10"
  },
  "deviceDetails": {
    "colorDepth": 24,
    "deviceId": "04",
    "deviceLatitude": "40.7128",
    "deviceLongitude": "74.0060",
    "deviceType": "01",
    "language": "zh-TW",
    "screenHeight": "820",
    "screenWidth": "1024",
    "sdkAppID": "550e8400-e29b-41d4-a716-446655440000",
    "sdkMajorVersion": 12,
    "sdkMinorVersion": 0,
    "sdkModel": "iPhone",
    "timeZone": "600",
    "userAgent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 7.0; InfoPath.3; .NET CLR 3.1.40767; Trident/6.0; en-IN)",
    "ipAddress": "198.51.100.42"
  },
  "endCustomerReferenceId": "45342",
  "merchantDetails": {
    "acquirerBin": "54349600",
    "acquirerMerchantId": "ACME123456",
    "categoryCode": "0742",
    "countryCode": "840",
    "name": "Acme Inc"
  },
  "merchantTrustAssessment": {
    "additionalSignals": "R",
    "merchantRiskScore": "0",
    "refundGuarantee": true
  },
  "primaryPersonDetails": {
    "address": {
      "city": "Houston",
      "country": "840",
      "postCode": "63124",
      "state": "TX",
      "streetLine1": "912 Uclan Dr",
      "streetLine2": "Apt 34"
    },
    "emailAddress": "john@mastercard.com",
    "name": "Waidong L Syrws",
    "phoneNumber1": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    },
    "phoneNumber2": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    }
  },
  "requestId": "14cda309-f33b-4ff7-b8cf-3dbf87b2a232",
  "secondaryPersonDetails": {
    "address": {
      "city": "Houston",
      "country": "840",
      "postCode": "63124",
      "state": "TX",
      "streetLine1": "912 Uclan Dr",
      "streetLine2": "Apt 34"
    },
    "emailAddress": "ted@mastercard.com",
    "name": "Waidong L Syrws",
    "phoneNumber1": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    }
  },
  "paymentMethodDetails": {
    "accountNumber": "5434960000000000000",
    "cardBin": "54349600",
    "cardExpiryDate": "2311",
    "cardLast4": "4242",
    "isCardOnFile": true
  },
  "transactionDetails": {
    "amount": "12345",
    "currencyCode": "840",
    "currencyExponent": "2",
    "itemCount": 3,
    "purchaseDate": "20220721173228",
    "recurringPaymentDetails": {
      "expiryDate": "20260325",
      "frequency": "345"
    },
    "shippingIndicator": "02",
    "topItemBrand": "Samsung",
    "topItemCost": "12345",
    "transactionType": "02"
  },
  "workflowId": 2
}
```

**Response**

```json
{
  "Errors": [
    {
      "Error": {
        "Source": "Gateway",
        "ReasonCode": "DECLINED",
        "Description": "Unauthorized - Access Not Granted",
        "Recoverable": false,
        "Details": null
      }
    }
  ]
}
```

**Identity Insights For Datasharing**
**Request**

```json
{
  "accountDetails": {
    "accAgeInd": "03",
    "accChange": "20260325",
    "accPwChange": "20260325",
    "txnActivityDay": "234",
    "txnActivityYear": "10"
  },
  "deviceDetails": {
    "colorDepth": 24,
    "deviceId": "04",
    "deviceLatitude": "40.7128",
    "deviceLongitude": "74.0060",
    "deviceType": "04",
    "language": "zh-TW",
    "screenHeight": "820",
    "screenWidth": "1024",
    "sdkAppID": "550e8400-e29b-41d4-a716-446655440000",
    "sdkMajorVersion": 12,
    "sdkMinorVersion": 0,
    "sdkModel": "iPhone",
    "timeZone": "600",
    "userAgent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 7.0; InfoPath.3; .NET CLR 3.1.40767; Trident/6.0; en-IN)",
    "ipAddress": "198.51.100.42"
  },
  "endCustomerReferenceId": "45342",
  "merchantDetails": {
    "acquirerBin": "444444",
    "acquirerMerchantId": "ACME123456",
    "categoryCode": "0742",
    "countryCode": "840",
    "name": "Acme Inc"
  },
  "merchantTrustAssessment": {
    "additionalSignals": "R",
    "merchantRiskScore": "0",
    "refundGuarantee": true
  },
  "primaryPersonDetails": {
    "address": {
      "city": "Houston",
      "country": "840",
      "postCode": "63124",
      "state": "TX",
      "streetLine1": "912 Uclan Dr",
      "streetLine2": "Apt 34"
    },
    "emailAddress": "john@mastercard.com",
    "name": "Waidong L Syrws",
    "phoneNumber1": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    },
    "phoneNumber2": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    }
  },
  "requestId": "14cda309-f33b-4ff7-b8cf-3dbf87b2a232",
  "secondaryPersonDetails": {
    "address": {
      "city": "Houston",
      "country": "840",
      "postCode": "63124",
      "state": "TX",
      "streetLine1": "912 Uclan Dr",
      "streetLine2": "Apt 34"
    },
    "emailAddress": "ted@mastercard.com",
    "name": "Waidong L Syrws",
    "phoneNumber1": {
      "countryCode": "1",
      "subscriberNumber": "3143978691"
    }
  },
  "paymentMethodDetails": {
    "accountNumber": "2303770003400262",
    "cardBin": "123456",
    "cardExpiryDate": "2311",
    "cardLast4": "4242",
    "isCardOnFile": true
  },
  "transactionDetails": {
    "amount": "12345",
    "currencyCode": "840",
    "currencyExponent": "2",
    "itemCount": 3,
    "purchaseDate": "20220721173228",
    "recurringPaymentDetails": {
      "expiryDate": "20260325",
      "frequency": "345"
    },
    "shippingIndicator": "02",
    "topItemBrand": "Samsung",
    "topItemCost": "12345",
    "transactionType": "02"
  }
}
```

**Response**

```json
{
  "Errors": [
    {
      "Error": {
        "Source": "Gateway",
        "ReasonCode": "DECLINED",
        "Description": "Unauthorized - Access Not Granted",
        "Recoverable": false,
        "Details": null
      }
    }
  ]
}
```

For the complete list of response codes, reason codes, and formatting rules, refer to [Codes and Formats](https://developer.mastercard.com/identity-insights-solutions/documentation/code-and-formats/index.md).

### Next Steps {#next-steps}

* Consult the [API Reference](https://developer.mastercard.com/identity-insights-solutions/documentation/api-reference/index.md) for complete endpoint specifications, request and response schemas, and environment URLs.
* If you run into issues, visit [Support](https://developer.mastercard.com/identity-insights-solutions/documentation/support/index.md) for FAQs and troubleshooting guidance.
