Provision a Network Token for a Consumer {#tms-net-tkn-card-create-cof-intro}
=============================================================================

When you provision a network token for an individual consumer in a wallet, you can manage the network token and payment credentials separately for that consumer. Provisioning network tokens for a consumer is supported for American Express, Mastercard, and Visa. This section describes how to provision a network token for a card number and a consumer ID.  
Network tokens that are provisioned by `TMS` are card-on-file (COF) tokens.

> IMPORTANT
> You must be enabled as an ECOM enabler in the Visa Token Service (VTS) to provision a network token with a consumer ID. For more information, contact your ` Cybersource ` account representative.

Endpoint
--------

**Test:** `POST ``https://apitest.cybersource.com``/tms/v2/tokenized-cards`  
**Production:** `POST ``https://api.cybersource.com``/tms/v2/tokenized-cards`  
**Production in India:** `POST ``https://api.in.cybersource.com``/tms/v2/tokenized-cards`  
**Production in Saudi Arabia:** `POST ``https://api.sa.cybersource.com``/tms/v2/tokenized-cards`{#tms-net-tkn-card-create-cof-intro_restcust-prod-ksa}  
**Test in Saudi Arabia:** `POST ``https://apitest.sa.cybersource.com``/tms/v2/tokenized-cards`{#tms-net-tkn-card-create-cof-intro_restcust-test-ksa}

Required Fields for Provisioning a COF Network Token for a Consumer {#tms-net-tkn-card-create-cof-reqfields}
============================================================================================================

card.number
:

card.expirationMonth
:

card.expirationYear
:

createInstrumentIdentifier
:
Set to `true`.

source
:
Set to `ONFILE`.

consumerId
:
When this field is not included, a network token is provisioned only for the PAN in the request.

Related Information
-------------------

* [API Field Reference for the REST API](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/rest-api-fields-intro.md "")
  {#tms-net-tkn-card-create-cof-reqfields_ul_kpc_xzz_sxb}

Optional Fields for Provisioning a COF Network Token for a Consumer {#tms-net-tkn-card-create-cof-optfields}
============================================================================================================

card.securityCode
:

Related Information
-------------------

* [API Field Reference for the REST API](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/rest-api-fields-intro.md "")
  {#tms-net-tkn-card-create-cof-optfields_ul_kpc_xzz_sxb}

REST Example: Provisioning a Network Token for a Consumer {#tms-net-tkn-card-create-cof-ex-rest}
================================================================================================

Request

```
{
  "createInstrumentIdentifier": true,
  "source": "ONFILE",
  "consumerId": "123456",
  "card": {
    "number": "X895379980000580",
    "expirationMonth": "12",
    "expirationYear": "2023",
    "securityCode": "123"
  }
}
```

{#tms-net-tkn-card-create-cof-ex-rest_codeblock_c51_vmt_gwb}  
Response to a Successful Request

```
{
  "_links": {
    "self": {
      "href": "/tms/v2/tokenized-cards/7030000000014911515"
    },
    "instrumentidentifier": {
      "href": "/tms/v1/instrument-identifier/7030000000042974378"
    }
  },
  "id": "7030000000014911515",
  "object": "tokenizedCard",
  "state": "ACTIVE",
  "source": "ONFILE",
  "enrollmentId": "96eb80a56b76ae1d486e14f40b3d7a01",
  "tokenReferenceId": "059ae2f74835647400c219884b7bc601",
  "paymentAccountReference": "V0010013022298169667504231315",
  "number": "489537XXXXXX9215",
  "expirationMonth": "10",
  "expirationYear": "2031",
  "type": "001",
  "card": {
    "suffix": "0580",
    "expirationMonth": "12",
    "expirationYear": "2023"
  },
  "metadata": {
    "cardArt": {
      "combinedAsset": {
        "id": "d3225702-354a-4f17-8c40-1727de7ffa57",
        "_links": {
          "self": {
            "href": "/tms/v2/tokens/7030000000042974378/mdes/assets/card-art-combined"
          }
        }
      }
    },
    "issuer": {
      "name": "METROBANK CARD CORPORATION (A FINANCE COMPANY)",
      "shortDescription": "METROBANK CARD CORPORATION"
    },
    "creator": "testrest"
  }
}
```

