Customer-Initiated Recurring Payment with `TMS` {#credentials-recur-cit-tms-intro}
==================================================================================

A recurring payment is a credentials-on-file (COF) transaction in a series of payments that you bill to a customer at a fixed amount, at regular intervals that do not exceed one year between transactions. The series of recurring payments is the result of an agreement between you and the customer for the purchase of goods or services that are provided at regular intervals.

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

These are the supported card types for processing credentialed transactions:

* Discover
* Mastercard
* Visa

Mastercard uses standing order and subscription payments instead of recurring payments. See [Mastercard Standing Order Payment](/docs/cybs/en-us/credentials/developer/vantivcnp/rest/credentials/credentials-mit-stand-order-intro.md "") and [Mastercard Subscription Payment](/docs/cybs/en-us/credentials/developer/vantivcnp/rest/credentials/credentials-mc-subscription-intro.md "").

Recurring Billing Service for Recurring Payments
------------------------------------------------

> IMPORTANT
> Do not use this document for the Recurring Billing service.  
> Use the [Recurring Billing Developer Guide](https://developer.cybersource.com/docs/cybs/en-us/recurring-billing/developer/all/rest/recurring-billing/recur-bill-dev-intro.md ""). When you use the Recurring Billing service, ` Cybersource ` saves and stores payment credentials for recurring transactions, ensuring compliance with COF best practices.

Creating a `TMS` Token
----------------------

When sending the initial CIT, you can create a `TMS` token to store the customer's credentials for the subsequent MITs. To create a `TMS` token, include the processingInformation.actionTokenTypes field in the authorization request. Set the field to one of these values based on the `TMS` token type you want to create:

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

    ```
    "processingInformation": {
        "actionTokenTypes": [
          "customer"
    ]
    ```

:
For more information about this `TMS` token type, see [Customer Tokens](https://developer.cybersource.com/docs/cybs/en-us/tms/developer/ctv/rest/tms/tms-overview/tms-token-types/tms-cust-tkn.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 in subsequent MITs eliminates the need to include billing information, card information, and the previous transaction's ID.
:

    ```
    "processingInformation": {
        "actionTokenTypes": [
          "paymentInstrument"
    ]
    ```

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

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

    ```
    "processingInformation": {
        "actionTokenTypes": [
          "instrumentIdentifier"
    ]
    ```

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

**Instrument Identifier, Payment Instrument, and Customer Identifier**
:
You can also create multiple `TMS` token types in the same authorization. This example includes an instrument identifier, a payment instrument, and a customer token in the same authorization:
:

    ```
     "processingInformation": {
        "actionTokenTypes": [
            "instrumentIdentifier",
            "paymentInstrument",
            "customer"
    ]
    ```

Address Verification Service for Recurring Payments
---------------------------------------------------

If your processor supports the Address Verification Service (AVS), then the AVS should verify every authorization request. `Cybersource` recommends checking the AVS's results for the first recurring payment to ensure that the payment information is accurate and to reduce the risk of fraud.  
You must determine how to handle the AVS results for any subsequent recurring payments that are not the same as the already-verified billing address information from the first recurring payment.

Endpoint {#credentials-recur-cit-tms-intro_d10e16}
--------------------------------------------------

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

Required Fields for a Customer-Initiated Recurring Payment with `TMS` {#credentials-recur-cit-tms-reqfields}
============================================================================================================

[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 "")
:

[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.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 "")
:

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

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

[processingInformation.actionTokenTypes](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/processing-info-aa/processing-info-action-token-types.md "")
:
Set to one or more of these values:

    * `customer`
    * `instrumentIdentifier`
    * `paymentInstrument`

[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`, `MOTO`, or a payer authentication value.

[processingInformation.recurringOptions. firstRecurringPayment](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/processing-info-aa/processing-info-recurring-ops-first-recurring-paym.md "")
:
Set the value to `true`.
{#credentials-recur-cit-tms-reqfields_dl_dqw_kdt_5wb}

REST Example: Customer-Initiated Recurring Payment with `TMS` {#credentials-recur-cit-tms-ex-rest}
==================================================================================================

Request

```keyword
{
  "processingInformation": {
    "actionList": [
      "TOKEN_CREATE"
    ],
    "actionTokenTypes": [
      "customer"
    ],
    "commerceIndicator": "internet",
    "recurringOptions": {
      "firstRecurringPayment": true
    }
  },
  "paymentInformation": {
    "card": {
      "number": "4111111111111111",
      "expirationMonth": "12",
      "expirationYear": "2031"
    }
  },
  "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": ""
    }
  }
}
```

Response to a Successful Request

```
{
  "_links": {
    "authReversal": {
      "method": "POST",
      "href": "/pts/v2/payments/6976858134106105703954/reversals"
    },
    "self": {
      "method": "GET",
      "href": "/pts/v2/payments/6976858134106105703954"
    },
    "capture": {
      "method": "POST",
      "href": "/pts/v2/payments/6976858134106105703954/captures"
    }
  },
  "clientReferenceInformation": {
    "code": "1697685813462"
  },
  "id": "6976858134106105703954",
  "orderInformation": {
    "amountDetails": {
      "authorizedAmount": "102.21",
      "currency": "ABC"
    }
  },
  "paymentAccountInformation": {
    "card": {
      "type": "001"
    }
  },
  "paymentInformation": {
    "tokenizedCard": {
      "type": "001"
    },
    "card": {
      "type": "001"
    }
  },
  "pointOfSaleInformation": {
    "terminalId": "111111"
  },
  "processorInformation": {
    "approvalCode": "888888",
    "networkTransactionId": "123456789619999",
    "transactionId": "123456789619999",
    "responseCode": "100",
    "avs": {
      "code": "X",
      "codeRaw": "I1"
    }
  },
  "reconciliationId": "62698397FNN143CC",
  "status": "AUTHORIZED",
  "submitTimeUtc": "2023-10-19T03:23:33Z",
  "tokenInformation": {
    "customer": {
      "id": "080A3A742BF87171E063A2598D0AEABE"
    }
  }
}
```

