> 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/api/credential-management-v1-apis-calm/network-tokens-v1/network-tokens-onboarding-v1.md).

# Network Tokens Onboarding - V1

{% stepper %}
{% step %}

### Get access token

In order to get an access token please see [Authentication guide](/cmp/platform/authentication.md#id-2-generate-access-token).
{% endstep %}

{% step %}

### Onboard an organization

Every organization needs to be registered at ‘Visa Token Services (VTS) program’ for VISA and Mastercard Digital Enablement Services (MDES) for Mastercard to receive a TRID (Token Requestor ID - unique merchant identifier at the schemes) before you can start using Network Tokens with VGS. A Token Requestor ID - TRID is used by Visa and Mastercard to provision merchant specific network tokens. Using `merchants` endpoint you can register for both Visa and Mastercard.

{% code title="Onboard merchant (curl)" %}

```bash
curl --location -X POST https://calm.<ENVIRONMENT>.verygoodsecurity.app/merchants \
    -H "Authorization: Bearer ${VGS_ACCESS_TOKEN}" \
    -H "Content-Type: application/json" \
    -x https://<CREDENTIALS>@<VAULT_ID>.<ENVIRONMENT>.verygoodproxy.com:8443 \
    --data-raw '{
          "dba_merchant_trade_name": "Example Company",
          "merchant_legal_name": "Example Company",
          "merchant_code": "1234",
          "company_website_url":"https://example.com",
          "acquirer_identification":"1234546",
          "acquirer_merchant_id":"123456",
          "contact_name":"John Doe",
          "contact_email":"jonh.doe@example.com",
          "duns_number":"123456789",
          "vault_id":"tntabcd1234",
          "organization_id":"ACrBqp51jFkn4CCaJEX3kf9j",
          "billing_address": {
              "address1": "Powell 12345",
              "address2": "54321",
              "city": "SF",
              "region": "CA",
              "country": "US",
              "postal_code": "12345",
              "phone": "+1(408)1112233"
          }
}'
```

{% endcode %}

You should receive a similar response:

{% code title="Successful response (example)" %}

```json
{
    "data": {
        "id": "MCcrYWJWqSbN1y9TXDnkvEiu",
        "merchant_legal_name": "Example Company",
        "card_networks": [
            {
                "network": "VISA",
                "created_at": "2023-05-09T11:54:16.273795",
                "updated_at": "2023-05-09T11:54:16.273795",
                "state": "COMPLETED"
            },
            {
                "network": "MASTERCARD",
                "created_at": "2023-05-09T11:54:16.273795",
                "updated_at": "2023-05-09T11:54:16.273795",
                "state": "PENDING"
            }
        ],
        "created_at": "2023-05-09T11:54:17.657088",
        "updated_at": "2023-05-09T11:54:17.659997"
    }
}
```

{% endcode %}

Example of failing onboarding request:

{% code title="Error response (example)" %}

```json
{
    "errors": [
        {
            "code": "internal-server-error",
            "detail": "Something went wrong.",
            "traceId": "00000000000000000000000000000000"
        }
    ]
}
```

{% endcode %}

{% endstep %}
{% endstepper %}

### What's next?

* [Network Tokens guide](/cmp/developer-resources/api/credential-management-v1-apis-calm/network-tokens-v1/network-tokens-onboarding-v1.md)
* [API docs](/cmp/developer-resources/api/credential-management-v1-apis-calm/network-tokens-v1/network-tokens-api-v1.md)


---

# 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/api/credential-management-v1-apis-calm/network-tokens-v1/network-tokens-onboarding-v1.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.
