# Validation Services common content 2
source: https://developer.mastercard.com/cross-border-services/documentation/api-ref/account-validation-apis/common2-bank-information-lookup-api/index.md

## Sandbox Testing {#sandbox-testing}

You can make API calls to the Sandbox server from your application code using the [Tutorials](https://developer.mastercard.com/cross-border-services/documentation/tutorials/index.md), which involves creating a Mastercard Developers project and using the Sandbox keys to generate the required Authorization Header.
Tip:   

* During the onboarding process, Mastercard assigns a registered partner ID to test in the higher environments (MTF Test and Production).
* This partner ID cannot access the Sandbox environment, but the customer can still access the Sandbox by using the non-registered partner ID.
* you can use any correctly formatted partner ID in the Sandbox. As a best practice, use the first 15 digits of your institution name, containing alphanumeric and special characters but no spaces, as the `Partner_ID`.
* For testing in a Sandbox, use a unique `transaction_reference` on each run.
Note:   

* The Sandbox does not return parameters unique to originating institutions, such as pricing, limits and corridor-specific data requirements, but allows you to test general call structure and responses outside of the production environment.
* After completion of Sandbox testing, mastercard assigns a project manager to customers meeting the eligibility requirements to perform integrated testing in the test environment.
* This test environment can include requested receiving corridors, current foreign exchange rates, and fixed and variable fees specific to the Originating Institution.

### Sandbox Test Cases {#sandbox-test-cases}

Alert:
* For the Validation Services, requests initiated in the Sandbox/MTF url must use the test cases specified in the following table.
* Limit your testing requirements only to the test cases mentioned in the table.

The Sandbox server returns simulated, static responses. You can use the following test cases to produce specific responses:

#### Bank Information LookUp API {#bank-information-lookup-api}

| Status  |                                                                                                                  Test Case                                                                                                                   |                                                                                                                                        Request Payload                                                                                                                                        |
|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Valid   | Bank Info generated when country code , bic-type and bic-values are provided                                                                                                                                                                 | Send this request where bic.value should end with 'SUC20002' { "bank": { "name": null, "branchName": null, "country": "AUS", "bic": { "type": "CHIPS", "value": "9876SUC20002" }, "address": { "city": null, "countrySubdivision": null, "postalCode": null } } }                             |
| Valid   | Bank Info generated with country code , bic-value and having bic-type as ANY.                                                                                                                                                                | Send this request where bic.value should end with 'SUC20002' { "bank": { "name": null, "branchName": null, "country": "AUS", "bic": { "type": "any", "value": "9876SUC20002" }, "address": { "city": null, "countrySubdivision": null, "postalCode": null } } }                               |
| Valid   | Bank Info generated when bank name is provided in the local language Note: Refer to the list of local languages supported [here](https://static.developer.mastercard.com/content/cross-border-services/uploads/LocalLanguagesSupported.pdf). | Send this request where the bank.name should end with 'SUC20003' { "bank": { "name": "\*农村商业银行股份有限公司半里铺分理处\*SUC20003", "branchName": null, "country": "CHN", "bic": { "type": null, "value": null }, "address": { "city": null, "countrySubdivision": null, "postalCode": null } } }          |
| Valid   | Bank Info generated when country code and partial bank name is provided                                                                                                                                                                      | Send this request where bank.name should end with 'SUC20004' { "bank": { "name": "\*of Africa United Kingdom\*SUC20004", "branchName": null, "country": "GBR", "bic": { "type": null, "value": null }, "address": { "city": null, "countrySubdivision": null, "postalCode": null } } }        |
| Invalid | Bank Info is not generated as no records exist for the particular bank in the country requested.                                                                                                                                             | Send this request where bank.name should end with ER20005 { ""bank"": { ""name"": ""Bank Of IndiaER20005"", ""branchName"": null, ""country"": ""AUS"", ""bic"": { ""type"": null, ""value"": null }, ""address"": { ""city"": null, ""countrySubdivision"": null, ""postalCode"": null } } } |
| Invalid | Bank Info is not generated as either Bank Code or Bank Name is required.                                                                                                                                                                     | { "bank": { "name": null, "branchName": null, "country": "AUS", "bic": { "type": "CHIPS", "value": null }, "address": { "city": null, "countrySubdivision": null, "postalCode": null } } }                                                                                                    |

## Sample Request {#sample-request}

* JSON

```JSON
{
  "bank": {
    "name": "*of Africa United Kingdom*SUC20004",
    "branchName": null,
    "country": "GBR",
    "bic": {
      "type": null,
      "value": null
    },
    "address": {
      "city": null,
      "countrySubdivision": null,
      "postalCode": null
    }
  }
}
```

## Sample Response {#sample-response}

### 1. Successful Bank Info Lookup Response: {#1-successful-bank-info-lookup-response}

* JSON

```JSON
{
  "bankInfo": {
    "total": "1",
    "banks": {
      "bankData": [
        {
          "bics": [
            {
              "type": "BICTYPE",
              "value": "9876SUC20002"
            }
          ],
          "name": "Commonwealth Commercial Bank",
          "branchName": "East Bay Branch",
          "address": {
            "line1": "221B Baker Street",
            "line2": null,
            "city": "Twizel",
            "country": "AUS",
            "countrySubdivision": "AUstate",
            "postalCode": "W1K 7QE"
          },
          "sanctionDetails": {
            "eu": false,
            "hmt": false,
            "ofac": false,
            "un": false
          }
        }
      ]
    }
  }
}
```

### 2. Successful Bank Info Lookup Response with Fed ACH and Fed Wire: {#2-successful-bank-info-lookup-response-with-fed-ach-and-fed-wire}

* JSON

```JSON
{
  "bankInfo": {
    "total": "1",
    "banks": {
      "bankData": [
        {
          "bics": [
            {
              "type": "ABA",
              "value": "123456789",
              "ach": {
                "enabled": true
              },
              "wire": {
                "enabled": false,
                "preferredRoutingNumber": "123456789"
              }
            }
          ],
          "name": "National Bank",
          "branchName": null,
          "address": {
            "line1": "500 W Street",
            "line2": null,
            "city": "Pittsburgh",
            "country": "USA",
            "countrySubdivision": "Pennsylvania",
            "postalCode": "12345"
          },
          "sanctionDetails": {
            "eu": false,
            "hmt": false,
            "ofac": false,
            "un": false
          }
        }
      ]
    }
  }
}
```

### 3. Rejected Bank Info lookup response for invalid bank code or bank name. {#3-rejected-bank-info-lookup-response-for-invalid-bank-code-or-bank-name}

* JSON

```JSON
{    "Errors": {
  "Error": [
    {
      "RequestId": "1721",
      "Source": "bank.name or bank.bic.value",
      "ReasonCode": "REQUIRED_BANK_CODE_OR_BANK_NAME",
      "Description": "Either a bank code or bank name is a mandatory field and cannot be null",
      "Recoverable": "false",
      "Details": {
        "Detail": [
          {
            "Name": "ErrorDetailCode",
            "Value": "130303"
          }
        ]
      }
    }
  ]
}
}
```

### 4. Rejected Bank Info lookup response for records not found due to incorrect search criteria. {#4-rejected-bank-info-lookup-response-for-records-not-found-due-to-incorrect-search-criteria}

* JSON

```JSON
{
  "Errors": {
    "Error": [
      {
        "RequestId": "2809",
        "Source": "",
        "ReasonCode": "RESOURCE_UNKNOWN",
        "Description": "Record not found",
        "Recoverable": "false",
        "Details": {
          "details": [
            {
              "name": "ErrorDetailCode",
              "value": "110507"
            }
          ]
        }
      }
    ]
  }
}
```

## Error Codes {#error-codes}

Please refer to complete list of error codes [here](https://developer.mastercard.com/cross-border-services/documentation/response-error-codes/index.md).

For information about the HTTP response codes that may be returned for your API requests, see [HTTP Response Codes](https://developer.mastercard.com/cross-border-services/documentation/response-error-codes/http-response-codes/index.md).
