# Account Validation

### **Account Validation Testing Guide**

This guide explains how to test Account Validation in a controlled environment. You can simulate various responses using different test PANs for the Account Validation endpoint and the expected responses for each.

**Very Important Information:** Please use only the provided test cards for this process. Under no circumstances should you input real PANs or live card data.

### Onboarding&#x20;

* Create a CMP Account in Sandbox or use an existing account.&#x20;
* Create a service account with the following `card:write`, `card:read`, `account:write`, `account:read`, `account-validations:write`, `account-validations:read` .
* Create Card IDs using the PANs below

### **General Setup**

* **Content-Type Header:** `application/vnd.api+json`
* **HTTP Method:** `POST`&#x20;
* **Authentication:** <https://auth.verygoodsecurity.com/auth/realms/vgs/protocol/openid-connect/token>

**Base URL:**&#x20;

```
https://sandbox.vgsapi.com
```

**Initialize API Endpoint:**

```
POST /cards/{cardID}/validations
```

**Example Request:**

* Merchant should use the test data in the request below during test in sandbox to get positive responses.
  * `cvc`
  * `cardholder_address`
  * `cardholder_name`
* Merchant must provide the below information in every request.
  * `merchant_name`
  * `address`

```bash
{
  "data": {
    "attributes": {
      "cvc": "022",
      "cardholder_address": {
        "street": "900 Metro Center Blv",
        "postal_code": "94404"
      },
      "cardholder_name": {
        "first_name": "ACCOUNT",
        "middle_name": "NAME",
        "last_name": "INQUIRY"
      },
      "merchant": {
        "merchant_name": "ABC Corp",
        "address": {
          "city": "San Francisco",
          "state": "CA",
          "country": "US",
          "postal_code": "94102"
        }
      }
    }
  }
}

```

### Account Validation API - Test Card Scenarios

Test different Account Validation scenarios using real cards. Create Card IDs with the cards below and expect each card to return a predefined response (`verified`, `not_verified`, `match`, `no_matched`, `partial_match`).

### Validation Tests

<table><thead><tr><th width="181.06109619140625">PAN</th><th width="114.3670654296875">Expiration</th><th width="125.8443603515625">Scenario</th><th width="131.004150390625">Card Verification</th><th width="140.7022705078125">Address Verification</th><th width="135.3543701171875">CVC Verification</th><th width="160.9261474609375">Name Verification</th></tr></thead><tbody><tr><td>4957030420210462</td><td>10/40</td><td>Card Valid</td><td>verified</td><td>match</td><td>match</td><td>no_match</td></tr><tr><td>4957030420210470</td><td>10/40</td><td>Card Valid</td><td>verified</td><td>no_match</td><td>no_match</td><td>no_match</td></tr><tr><td>4860371715886350</td><td>10/40</td><td>Full match </td><td>verified</td><td>no_match</td><td>no_match</td><td>match</td></tr><tr><td>4860515915886350</td><td>10/40</td><td>First Name No Match</td><td>verified</td><td>no_match</td><td>no_match</td><td>partial_match</td></tr><tr><td>4860169115886354</td><td>10/40</td><td>Middle Name No Match</td><td>verified</td><td>no_match</td><td>no_match</td><td>partial_match</td></tr><tr><td>4860862015886355</td><td>10/40</td><td>Last Name No Match</td><td>verified</td><td>no_match</td><td>no_match</td><td>no_match</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.verygoodsecurity.com/cmp/developer-resources/guides/testing/account-validation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
