Merchant-Initiated Unscheduled COF Payment with `TMS` {#credentials-ucof-mit-tms-intro}
=======================================================================================

After the customer-initiated unscheduled COF payment, you can send merchant-initiated unscheduled COF payments using one or more `TMS` token types:

**Customer**
:
Customer tokens store one or more customer payment instrument tokens and shipping address tokens.
:
Including a customer token eliminates the need to include billing information, card information, and the previous transaction's ID.
:

    ```
    "paymentInformation": {
      "customer": {
        "id": "07C9CA98022DA498E063A2598D0AA400"
      }
    }
    ```

:
For more information about this `TMS` token type, see [Customer Tokens](https://developer.cybersource.com/docs/cybs/en-us/tms/developer/all/rest/tms/tms-overview/tms-token-types/tms-cust-tkn-intro.md "") in the *`Token Management Service` Developer Guide*.

**Payment Instrument**
:
Payment instrument tokens store an instrument identifier token, card information, and billing information. Payment instruments are not linked to a customer token.
:
Including a payment instrument eliminates the need to include billing information, card information, and the previous transaction's ID.
:

    ```
    "paymentInformation": {
      "paymentInstrument": {
        "id": "07CA24EF20F9E2C9E063A2598D0A8565"
      }
    }
    ```

:
For more information about this `TMS` token type, see [Payment Instrument Token](https://developer.cybersource.com/docs/cybs/en-us/tms/developer/all/rest/tms/tms-overview/tms-token-types/tms-pi-tkn-intro.md "") in the *`Token Management Service` Developer Guide*.

**Instrument Identifier**
:
Instrument identifier tokens store only a PAN. Including an instrument identifier eliminates the need to include a PAN and the previous transaction's ID.
:

    ```
    "paymentInformation": {
      "instrumentIdentifier": {
        "id": "7010000000016241111"
      }
    }
    ```

:
For more information about this `TMS` token type, see [Instrument Identifier Token](https://developer.cybersource.com/docs/cybs/en-us/tms/developer/all/rest/tms/tms-overview/tms-token-types/tms-ii-tkn-intro.md "") in the *`Token Management Service` Developer Guide*.

Prerequisites
-------------

The first transaction in an unscheduled COF payment is a customer-initiated transaction (CIT). Before you can perform a subsequent merchant-initiated transaction (MIT), you must store the customer's credentials for later use. Before you can store the user's credentials, you must get the customer's consent to store their private information. This process is also known as establishing a relationship with the customer.

Supported Card Types
--------------------

These are the supported card types for processing credentialed transactions:

* American Express{#credentials-ucof-mit-tms-intro_d9e273}
  {#credentials-ucof-mit-tms-intro_d9e273}
* Mastercard{#credentials-ucof-mit-tms-intro_d9e276}
  {#credentials-ucof-mit-tms-intro_d9e276}
* Visa{#credentials-ucof-mit-tms-intro_d9e279}
  {#credentials-ucof-mit-tms-intro_d9e279}

Endpoint {#credentials-ucof-mit-tms-intro_d10e16}
-------------------------------------------------

**Production:** `POST ``https://api.cybersource.com``/pts/v2/payments`{#credentials-ucof-mit-tms-intro_d10e25}  
**Test:** `POST ``https://apitest.cybersource.com``/pts/v2/payments`{#credentials-ucof-mit-tms-intro_d10e35}

Required Fields for MIT Unscheduled COF Payment with `TMS` {#credentials-ucof-mit-tms-req-fields}
=================================================================================================

Include these Required Fields
-----------------------------

[orderInformation.amountDetails.currency](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-currency.md "")
:

[orderInformation.amountDetails.totalAmount](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-total-amount.md "")
:

paymentInformation.\[tokentype\].id
:
Where \[tokentype\] is the `TMS` token type you are using:
:
* [customer](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-info-aa/payment-info-customer-id.md "")
* [instrumentIdentifier](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-info-aa/payment-info-instrument-identifier-id.md "")
* [paymentInstrument](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-info-aa/payment-info-payment-instrument-id.md "")

[processingInformation. authorizationOptions. initiator. merchantInitiatedTransaction.reason](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/processing-info-aa/processing-info-auth-ops-initiator-mit-reason.md "")
:
Set the value to `10`.
:
Required only for American Express, Discover, and Mastercard.

[processingInformation.commerceIndicator](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/processing-info-aa/processing-info-commerce-ind.md "")
:
Set the value to `internet`.

Instrument Identifier Required Fields
-------------------------------------

If you are using the paymentInformation.instrumentIdentifier.id token, include these required fields in addition to the required fields listed above.

[orderInformation.billTo.address1](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-address1.md "")
:

[orderInformation.billTo.administrativeArea](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-admin-area.md "")
:

[orderInformation.billTo.country](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-company-country.md "")
:

[orderInformation.billTo.email](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-email.md "")
:

[orderInformation.billTo.firstName](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-first-name.md "")
:

[orderInformation.billTo.lastName](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-last-name.md "")
:

[orderInformation.billTo.locality](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-locality.md "")
:

[orderInformation.billTo.phoneNumber](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-phone-num.md "")
:

[orderInformation.billTo.postalCode](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-bill-to-postal-code.md "")
:

[paymentInformation.card.expirationMonth](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-info-aa/payment-info-card-exp-mo.md "")
:

[paymentInformation.card.expirationYear](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-info-aa/payment-info-card-exp-year.md "")
:

Card-Specific Field
-------------------

The listed card type requires an additional field.

Discover
:
processingInformation.authorizationOptions.initiator. merchantInitiatedTransaction.originalAuthorizedAmount
:
Provide the original transaction amount.

Country-Specific Fields
-----------------------

Include these country-specific required fields for a successful merchant-initiated authorization.

India
:
These fields are required only with Diners Club in India or with an India-issued card, and you are processing payments through `Visa Platform Connect`.
:
installmentInformation.amount
:
installmentInformation.frequency
:
installmentInformation.identifier
:
installmentInformation.paymentType
:
installmentInformation.sequence
:
installmentInformation.validationIndicator

Saudi Arabia
:
These fields are required only if your business is located in Saudi Arabia and you are processing payments through `Visa Platform Connect`.
:
authorizationOptions.initiator.merchantInitiatedTransaction.agreementId
:
recurringPaymentInformation.amountType

REST Example: MIT Unscheduled COF Payment with TMS Instrument Identifier {#credentials-ucof-mit-tms-iid-ex-rest}
================================================================================================================

Request

```keyword
{
  "processingInformation": {
    "commerceIndicator": "internet"
  },
  "paymentInformation": {
    "card": {
      "expirationMonth": "12",
      "expirationYear": "2031"
    },
    "instrumentIdentifier": {
      "id": "7010000000016241111"
    }
  },
  "orderInformation": {
    "amountDetails": {
      "totalAmount": "102.21",
      "currency": "ABC"
    },
    "billTo": {
      "firstName": "John",
      "lastName": "Doe",
      "address1": "1 Market St",
      "locality": "san francisco",
      "administrativeArea": "CA",
      "postalCode": "94105",
      "country": "US",
      "email": "test@cybs.com",
      "phoneNumber": "4158880000"
    }
  }
}
```

Response to a Successful Request

```
{
  "_links": {
    "authReversal": {
      "method": "POST",
      "href": "/pts/v2/payments/6976892714556134003954/reversals"
    },
    "self": {
      "method": "GET",
      "href": "/pts/v2/payments/6976892714556134003954"
    },
    "capture": {
      "method": "POST",
      "href": "/pts/v2/payments/6976892714556134003954/captures"
    }
  },
  "clientReferenceInformation": {
    "code": "1697689271513"
  },
  "id": "6976892714556134003954",
  "orderInformation": {
    "amountDetails": {
      "authorizedAmount": "102.21",
      "currency": "ABC"
    }
  },
  "paymentAccountInformation": {
    "card": {
      "type": "001"
    }
  },
  "paymentInformation": {
    "tokenizedCard": {
      "type": "001"
    },
    "instrumentIdentifier": {
      "id": "7010000000016241111",
      "state": "ACTIVE"
    },
    "card": {
      "type": "001"
    }
  },
  "pointOfSaleInformation": {
    "terminalId": "111111"
  },
  "processingInformation": {
    "paymentSolution": "015"
  },
  "processorInformation": {
    "paymentAccountReferenceNumber": "V0010013022298169667504231315",
    "approvalCode": "888888",
    "networkTransactionId": "123456789619999",
    "transactionId": "123456789619999",
    "responseCode": "100",
    "avs": {
      "code": "X",
      "codeRaw": "I1"
    }
  },
  "reconciliationId": "62699554NNMR6X7R",
  "status": "AUTHORIZED",
  "submitTimeUtc": "2023-10-19T04:21:11Z"
}
```

REST Example: MIT Unscheduled COF Payment with TMS Payment Instrument {#credentials-ucof-mit-tms-pid-ex-rest}
=============================================================================================================

Request

```
{
  "processingInformation": {
    "commerceIndicator": "internet"
  },
  "paymentInformation": {
    "paymentInstrument": {
      "id": "080AE120369A7947E063A2598D0A718F"
    }
  },
  "orderInformation": {
    "amountDetails": {
      "totalAmount": "102.21",
      "currency": "ABC"
    }
  }
}
```

Response to a Successful Request

```
{
  "_links": {
    "authReversal": {
      "method": "POST",
      "href": "/pts/v2/payments/6976891300676431103955/reversals"
    },
    "self": {
      "method": "GET",
      "href": "/pts/v2/payments/6976891300676431103955"
    },
    "capture": {
      "method": "POST",
      "href": "/pts/v2/payments/6976891300676431103955/captures"
    }
  },
  "clientReferenceInformation": {
    "code": "1697689130124"
  },
  "id": "6976891300676431103955",
  "orderInformation": {
    "amountDetails": {
      "authorizedAmount": "102.21",
      "currency": "ABC"
    }
  },
  "paymentAccountInformation": {
    "card": {
      "type": "001"
    }
  },
  "paymentInformation": {
    "tokenizedCard": {
      "type": "001"
    },
    "instrumentIdentifier": {
      "id": "7010000000016241111",
      "state": "ACTIVE"
    },
    "paymentInstrument": {
      "id": "080AE120369A7947E063A2598D0A718F"
    },
    "card": {
      "type": "001"
    }
  },
  "pointOfSaleInformation": {
    "terminalId": "111111"
  },
  "processingInformation": {
    "paymentSolution": "015"
  },
  "processorInformation": {
    "paymentAccountReferenceNumber": "V0010013022298169667504231315",
    "approvalCode": "888888",
    "networkTransactionId": "123456789619999",
    "transactionId": "123456789619999",
    "responseCode": "100",
    "avs": {
      "code": "X",
      "codeRaw": "I1"
    }
  },
  "reconciliationId": "62699372XNMR85HS",
  "status": "AUTHORIZED",
  "submitTimeUtc": "2023-10-19T04:18:50Z"
}
```

REST Example: MIT Unscheduled COF Payment with TMS Customer {#credentials-ucof-mit-tms-cid-ex-rest}
===================================================================================================

Request

```
{
  "processingInformation": {
    "commerceIndicator": "internet"
  },
  "paymentInformation": {
    "customer": {
      "id": "080AC9AB60C92AA2E063A2598D0A0C74"
    }
  },
  "orderInformation": {
    "amountDetails": {
      "totalAmount": "102.21",
      "currency": "ABC"
    }
  }
}
```

Response to a Successful Request

```
{
  "_links": {
    "authReversal": {
      "method": "POST",
      "href": "/pts/v2/payments/6976889582016147703955/reversals"
    },
    "self": {
      "method": "GET",
      "href": "/pts/v2/payments/6976889582016147703955"
    },
    "capture": {
      "method": "POST",
      "href": "/pts/v2/payments/6976889582016147703955/captures"
    }
  },
  "clientReferenceInformation": {
    "code": "1697688958296"
  },
  "id": "6976889582016147703955",
  "orderInformation": {
    "amountDetails": {
      "authorizedAmount": "102.21",
      "currency": "ABC"
    }
  },
  "paymentAccountInformation": {
    "card": {
      "type": "001"
    }
  },
  "paymentInformation": {
    "tokenizedCard": {
      "type": "001"
    },
    "instrumentIdentifier": {
      "id": "7010000000016241111",
      "state": "ACTIVE"
    },
    "paymentInstrument": {
      "id": "080AE6DB37B09557E063A2598D0AA4C9"
    },
    "card": {
      "type": "001"
    },
    "customer": {
      "id": "080AC9AB60C92AA2E063A2598D0A0C74"
    }
  },
  "pointOfSaleInformation": {
    "terminalId": "111111"
  },
  "processingInformation": {
    "paymentSolution": "015"
  },
  "processorInformation": {
    "paymentAccountReferenceNumber": "V0010013022298169667504231315",
    "approvalCode": "888888",
    "networkTransactionId": "123456789619999",
    "transactionId": "123456789619999",
    "responseCode": "100",
    "avs": {
      "code": "X",
      "codeRaw": "I1"
    }
  },
  "reconciliationId": "62699842BNN13VA0",
  "status": "AUTHORIZED",
  "submitTimeUtc": "2023-10-19T04:15:58Z"
}
```

