# TokenStore Duplicate This function requests that a new card token be generated using an existing card token. This request can be used to deposit a card token into a Global TokenStore or as a means to continue using a token that is about to expire. The card’s short-term data (if sent by the interface) will be stored until it is used or for the period configured in the merchant’s Lighthouse Transaction Manager account. - Host Direct - Locally Installed UTG See the Integration Methods and URLs Section sections of the Development Quick Start guide for details regarding each processing option. Endpoint: POST /tokens/duplicate Version: 1.7.43 Security: AccessToken ## Header parameters: - `InterfaceVersion` (string, required) Refers to the version of the program or application that is sending requests to Shift4. The following special characters are not allowed: $ % : ^ - ~ , ? “ ” ‘ ’ { } [ ] \ + = Example: "2.1" - `InterfaceName` (string, required) Refers to the name of the program or application that is sending requests to Shift4. This should be the name of the program that you purchased or created. The following special characters are not allowed: $ % : ^ - ~ ` , ? “ ” ‘ ’ { } [ ] \ + = Example: "ForwardPOS" - `CompanyName` (string, required) Refers to the vendor or partner that designed and certified the interface. The information you use in this field should match what Shift4 has on file or what was agreed upon in your Integration Plan. The following special characters are not allowed: $ % : ^ - ~ ` , ? “ ” ‘ ’ { } [ ] \ + = Example: "PAWS" - `AccessToken` (string, required) A security credential used to authenticate API requests and all i4Go® authorizeClient/preauthorizeClient requests. An Access Token is the alias for the merchant account and interface being used. The Access Token is required in all requests except an Access Token Exchange request, which generates an Access Token using an and . Example: "EA79FB05-3AA7-4500-AF9A-73F986FF2C1D" ## Request fields (application/json): - `dateTime` (string, required) The date and time in ISO 8601 format including the timezone offset (yyyy-mm-ddThh:mm:ss.nnn+hh:mm). Must be sent as the local date/time of the merchant. For example, a request processed at a merchant in the Pacific time zone at 9:18am on April 15th 2021 would be sent as 2021-04-15T09:18:23.283-07:00 - `card` (object, required) - `card.token` (object, required) - `card.token.value` (string, required) This field is used to specify a card token. Whenever CHD is sent in a request, a card token will be returned in this field. Your interface should be designed to store this card token for future use. The latest card token received should be used in any subsequent request that references the same card data. - `card.token.serialNumber` (string) In requests that require the use of a shared card token that is held by another merchant account, such as in a TokenStore or TokenShare®, this field is used to specify the serial number for the account where the card token is stored. - `apiOptions` (array) API Options modify the request being made. See the [API Options](/guides/appendices/api-options.md) section for more information. - `customer` (object) - `customer.addressLine1` (string) Cardholder’s street address exactly as it appears on their billing statement. This field is used in AVS. - `customer.firstName` (string) Specifies a consumer’s first name. This field is used in AVS. If the interface sends this field, the value specified by the interface will be returned in the response, unless the API Option [USECARDNAME](/guides/appendices/api-options#usecardname) is included in the request and a Commerce Engine or UTG-controlled PIN pad is in use. If the interface does not send the object, the consumer's name will be returned in the object if the name is present in the card's EMV or track data. - `customer.middleName` (string) Specifies a consumer’s middle name. - `customer.lastName` (string) Specifies a consumer’s last name. This field is used in AVS. If the interface sends this field, the value specified by the interface will be returned in the response, unless the API Option [USECARDNAME](/guides/appendices/api-options#usecardname) is included in the request and a Commerce Engine or UTG-controlled PIN pad is in use. If the interface does not send the object, the consumer's name will be returned in the object if the name is present in the card's EMV or track data. - `customer.postalCode` (string) Cardholder’s ZIP/postal code from their billing statement. This field is used in AVS. Do not include special characters. - `customer.emailAddress` (string) Customer email address. - `customer.ipAddress` (string) Public source IP Address where the request originates, not the IP Address of the web server. - `device` (object) - `device.terminalId` (string) To prompt a specific UTG-controlled PIN pad in a request, the API Terminal ID configured in UTG TuneUp must be specified in this field. ## Response 200 fields (application/json): - `result` (array) - `result.dateTime` (string) The date and time in ISO 8601 format including the timezone offset (yyyy-mm-ddThh:mm:ss.nnn+hh:mm). Must be sent as the local date/time of the merchant. For example, a request processed at a merchant in the Pacific time zone at 9:18am on April 15th 2021 would be sent as 2021-04-15T09:18:23.283-07:00 - `result.card` (object) - `result.card.expirationDate` (integer) Card expiration date in MMYY format. This value will only be populated if "RETURNEXPDATE" is included in the array. - `result.card.number` (string) The card number field will always be masked when returned in a response. - `result.card.type` (string) An abbreviation used to specify the type of card that was used when processing a transaction. Value| Description -----|------------ AX | American Express AP | Alipay BC | Backed Card CI | Citgo DB | Debit card GC | Gift Card JC | JCB MC | Mastercard NS | Discover/JCB/Novus PL | Private Label SC | Sears Canada VS | Visa WP | WeChat Pay YC | IT’S YOUR CARD Enum: "AX", "AP", "BC", "CI", "DB", "GC", "JC", "MC", "NS", "PL", "SC", "VS", "WP", "YC" - `result.card.token` (object) - `result.card.token.value` (string) This field is used to specify a card token. Whenever CHD is sent in a request, a card token will be returned in this field. Your interface should be designed to store this card token for future use. The latest card token received should be used in any subsequent request that references the same card data. - `result.merchant` (object) - `result.merchant.mid` (number) The merchant ID associated with the merchant account. - `result.merchant.name` (string) The merchant’s business name as configured with Shift4. - `result.server` (object) - `result.server.name` (string) The name of the server that processed the request. - `result.universalToken` (object) - `result.universalToken.value` (string) An identifier for a card or payment account across all Shift4 merchants. ## Response 400 fields (application/json): - `result` (array) - `result.error` (object) - `result.error.code` (integer) Code indicating the type of error that occurred. Refer to the [Error Codes](/guides/appendices/error-codes) section of this document for more details. - `result.error.severity` (string) Severity level of the error. | Severity | Description | | -------- | ---------------------------------------------------------------- | | Info | Action not required - Data input/formatting is incorrect | | Error | Action may be required - Communication, timeout or network issue | | Alert | Action required - System issue | Enum: "Info", "Error", "Alert" - `result.error.shortText` (string) Abbreviated error message that is always returned if an error condition exists - `result.error.longText` (string) Extended error message that is returned if an error condition exists. - `result.error.primaryCode` (integer) Code indicating the type of error that occurred. Refer to the [Error Codes](/guides/appendices/error-codes) section of this document for more details. - `result.error.secondaryCode` (integer) This code supplements the code specified in the field to provide additional information about the error that occurred. - `result.server` (object) - `result.server.name` (string) The name of the server that processed the request. ## Response 504 fields (application/json): - `result` (array) - `result.error` (object) - `result.error.code` (integer) Code indicating the type of error that occurred. Refer to the [Error Codes](/guides/appendices/error-codes) section of this document for more details. - `result.error.severity` (string) Severity level of the error. | Severity | Description | | -------- | ---------------------------------------------------------------- | | Info | Action not required - Data input/formatting is incorrect | | Error | Action may be required - Communication, timeout or network issue | | Alert | Action required - System issue | Enum: "Info", "Error", "Alert" - `result.error.shortText` (string) Abbreviated error message that is always returned if an error condition exists - `result.error.longText` (string) Extended error message that is returned if an error condition exists. - `result.error.primaryCode` (integer) Code indicating the type of error that occurred. Refer to the [Error Codes](/guides/appendices/error-codes) section of this document for more details. - `result.error.secondaryCode` (integer) This code supplements the code specified in the field to provide additional information about the error that occurred. - `result.lighthouse` (object) - `result.lighthouse.data` (string) Base64 encoded JSON formatted data that will be returned from Lighthouse to be passed back to SkyTab. This data will contain variable information. - `result.server` (object) - `result.server.name` (string) The name of the server that processed the request.