On This Page

{#jumplink-list}  
[Markdown](/docs/vas/en-us/tms/developer/all/rest/tms/tms-pi-tkn/tms-manage-pi-tkn/tms-pi-tkn-create-intro.md)  
Filter  
FILTER BY TAG

Create a Payment Instrument {#tms-pi-tkn-create-intro}
======================================================

This section describes how to create a payment instrument token.

Endpoint
--------

**Test:** `POST ``https://apitest.visaacceptance.com``/tms/v1/paymentinstruments`{#tms-pi-tkn-create-intro_restcust-test}  
**Production:** `POST ``https://api.visaacceptance.com``/tms/v1/paymentinstruments`

Required Fields for Creating a Payment Instrument {#tms-pi-tkn-create-reqfields}
================================================================================

card.type
:

instrumentIdentifier.id
:
Include the ID of the instrument identifier token you want to use to create a payment instrument.
{#tms-pi-tkn-create-reqfields_dl_bcz_qry_dwb}

Optional Fields for Creating a Payment Instrument {#tms-pi-tkn-create-optfields}
================================================================================

default
:
Set value to `true` if default, otherwise set value to `false`.

bankAccount.type
:

billTo.firstName
:

billTo.lastName
:

billTo.company
:

billTo.address1
:

billTo.locality
:

billTo.administrativeArea
:

billTo.postalCode
:

billTo.country
:

billTo.email
:

billTo.phoneNumber
:

card.expirationMonth
:

card.expirationYear
:

card.issueNumber
:

card.startMonth
:

card.startYear
:

card.useAs
:

tokenizedInformation.requestorID
:

tokenizedInformation.transactionType
:

buyerInformation.companyTaxID
:

buyerInformation.currency
:

buyerInformation.dateOfBirth
:

buyerInformation.personalIdentification.id
:

buyerInformation.personalIdentification.type
:

buyerInformation.personalIdentification.issuedBy.administrativeArea
:

billTo.address2
:

processingInformation.billPaymentProgramEnabled
:

processingInformation.bankTransferOptions.SECCode
:

merchantInformation.merchantDescriptor.alternateName
:
{#tms-pi-tkn-create-optfields_dl_bcz_qry_dwb}

REST Example: Creating a Payment Instrument {#tms-pi-tkn-create-ex-rest}
========================================================================

Request

```
{
  "card": {
    "expirationMonth": "12",
    "expirationYear": "2031",
    "type": "visa"
  },
  "billTo": {
    "firstName": "John",
    "lastName": "Doe",
    "company": "Company Name",
    "address1": "1 Market St",
    "locality": "San Francisco",
    "administrativeArea": "CA",
    "postalCode": "94105",
    "country": "US",
    "email": "test@vas.com",
    "phoneNumber": "4158880000"
  },
  "instrumentIdentifier": {
    "id": "7010000000016241111"
  }
}
```

{#tms-pi-tkn-create-ex-rest_codeblock_ud1_pc1_jwb}  
Response to a Successful Request

```keyword
{
  "_links": {
    "self": {
      "href": https://apitest.visaacceptance.com/tms/v1/paymentinstruments/F39763E8CFDF2354E053AF598E0AF684"
    }
  },
  "id": "F39763E8CFDF2354E053AF598E0AF684",
  "object": "paymentInstrument",
  "state": "ACTIVE",
  "card": {
    "expirationMonth": "12",
    "expirationYear": "2031",
    "type": "visa"
  },
  "billTo": {
    "firstName": "John",
    "lastName": "Doe",
    "company": "Company Name",
    "address1": "1 Market St",
    "locality": "San Francisco",
    "administrativeArea": "CA",
    "postalCode": "94105",
    "country": "US",
    "email": "test@vas.com",
    "phoneNumber": "4158880000"
  },
  "metadata": {
    "creator": "testrest"
  },
  "_embedded": {
    "instrumentIdentifier": {
      "_links": {
        "self": {
          "href": "https://apitest.visaacceptance.com/tms/v1/instrumentidentifiers/7010000000016241111"
        },
        "paymentInstruments": {
          "href": "https://apitest.visaacceptance.com/tms/v1/instrumentidentifiers/7010000000016241111/paymentinstruments"
        }
      },
      "id": "7010000000016241111",
      "object": "instrumentIdentifier",
      "state": "ACTIVE",
      "card": {
        "number": "411111XXXXXX1111"
      },
      "processingInformation": {
        "authorizationOptions": {
          "initiator": {
            "merchantInitiatedTransaction": {
              "previousTransactionId": "123456789619999"
            }
          }
        }
      },
      "metadata": {
        "creator": "testrest"
      }
    }
  }
}
```

{#tms-pi-tkn-create-ex-rest_codeblock_wd1_pc1_jwb}  
RELATED TO THIS PAGE

