> For the complete documentation index, see [llms.txt](https://docs.verygoodsecurity.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verygoodsecurity.com/cmp/developer-resources/guides/testing/account-validation.md).

# 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.

Sandbox testing coverage is limited. Some scenarios, including the CVC use case, are not yet supported in this environment. We are actively working with the network to make these available.

**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 Results

<table><thead><tr><th width="181.06109619140625">PAN</th><th width="114.3670654296875">Expiration</th><th width="188.730712890625">Scenario</th><th width="496.4417724609375">API Request Body</th><th width="183.347900390625">Card Verification</th><th width="191.73516845703125">Address Verification</th><th width="199.01318359375">CVC Verification</th><th width="198.634521484375">Name Verification</th></tr></thead><tbody><tr><td>4957030420210462</td><td>10/40</td><td><ul><li>Card Valid</li><li>Full Address Match</li></ul><p></p></td><td>{"data": {"type": "account-validations","attributes": {"merchant": {"merchant_name": "ABC Corp","address": {<br>"city": "San Francisco","state": "CA","country": "US","postal_code": "94102"}},"cardholder_address": {"street": "900 Metro Center Blv","postal_code": "94404","city": "San Francisco","state": "CA","country": "US"}}}</td><td>verified</td><td>match</td><td>not applicable</td><td>not applicable</td></tr><tr><td>4860371715886350</td><td>10/40</td><td><ul><li>Card Not Valid</li><li>Partial Address Match</li></ul></td><td>{"data": {<br>"type": "account-validations","attributes": {"merchant": {<br>"merchant_name": "ABC Corp",<br>"address": {"city": "San Francisco","state": "CA","country": "US","postal_code": "94102"}},"cardholder_address": {<br>"street": "900 Metro Center Blv","postal_code": "94404",<br>"city": "San Francisco","state": "CA","country": "US"}}}</td><td>not_verified</td><td>not applicable</td><td>not applicable</td><td>partial_match</td></tr><tr><td>4860515915886350</td><td>10/40</td><td><ul><li>Card Not Valid</li><li>Address No Match</li></ul></td><td>{"data": {"type": "account-validations",<br>"attributes": {"merchant": {"merchant_name": "ABC Corp","address": {"city": "San Francisco","state": "CA",<br>"country": "US","postal_code": "94102"}},"cardholder_address": {"street": "900 Metro Center Blv","postal_code": "94404","city": "San Francisco",<br>"state": "CA","country": "US"}}}}</td><td>not_verified</td><td>not applicable</td><td>not applicable</td><td>no_match</td></tr><tr><td>4860967315886359</td><td>10/40</td><td><ul><li>Card Not Valid</li><li>Address No Match</li></ul></td><td>{"data": {"type": "account-validations","attributes": {"merchant": {"merchant_name": "ABC Corp","address": {<br>"city": "San Francisco""state": "CA","country": "US","postal_code": "94102"}},"cardholder_address": {<br>"street": "900 Metro Center Blv","postal_code": "94404",<br>"city": "San Francisco","state": "CA","country": "US"}}}}</td><td>not_verified</td><td>not applicable</td><td>not applicable</td><td>no_match</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
