Merchant-Initiated Mastercard Standing Order Payment with `TMS` {#credentials-mc-standorder-mit-tms-intro}
==========================================================================================================

After the customer-initiated Mastercard standing order payment, you can send merchant-initiated standing order 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"
      }
    }
    ```

**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"
      }
    }
    ```

**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"
      }
    }
    ```

Endpoint {#credentials-mc-standorder-mit-tms-intro_d10e16}
----------------------------------------------------------

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

Required Fields for a Merchant-Initiated Mastercard Standing Order Payment with `TMS` {#credentials-mc-standorder-mit-tms-reqfields}
====================================================================================================================================

orderInformation.amountDetails.currency
:

orderInformation.amountDetails.totalAmount
:

paymentInformation.\[tokentype\].id
:
Where \[tokentype\] is the `TMS` token type you are using:
:
* customer
* instrumentIdentifier
* paymentInstrument

processingInformation.authorizationOptions.initiator. merchantInitiatedTransaction.reason
:
Set the value to `8`.

processingInformation.commerceIndicator
:
Set the value to `recurring`.

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
:

orderInformation.billTo.administrativeArea
:

orderInformation.billTo.country
:

orderInformation.billTo.email
:

orderInformation.billTo.firstName
:

orderInformation.billTo.lastName
:

orderInformation.billTo.locality
:

orderInformation.billTo.phoneNumber
:

orderInformation.billTo.postalCode
:

paymentInformation.card.expirationMonth
:

paymentInformation.card.expirationYear
:

REST Example: Merchant-Initiated Mastercard Standing Order Payment with a `TMS` Instrument Identifier {#credentials-mc-standorder-mit-tms-iid-ex-rest}
======================================================================================================================================================

Request

```
{
  "processingInformation": {
    "commerceIndicator": "recurring",
    "authorizationOptions": {
      "initiator": {
        "merchantInitiatedTransaction": {
          "reason": "8"
        }
      }
    }
  },
  "paymentInformation": {
    "card": {
      "expirationMonth": "12",
      "expirationYear": "2025"
    },
    "instrumentIdentifier": {
      "id": "4111xxxxxxxxxxxx"
    }
  },
  "orderInformation": {
    "amountDetails": {
      "totalAmount": "102.21",
      "currency": "ABC"
    },
    "billTo": {
      "firstName": "John",
      "lastName": "Smith",
      "address1": "1 Market St",
      "locality": "san francisco",
      "administrativeArea": "CA",
      "postalCode": "94105",
      "country": "US",
      "email": "",
      "phoneNumber": "4158880000"
    }
  }
}
```

Response to a Successful Request

```
{
  "_links": {
    "authReversal": {
      "method": "POST",
      "href": "/pts/v2/payments/6530824710046809304002/reversals"
    },
    "self": {
      "method": "GET",
      "href": "/pts/v2/payments/6530824710046809304002"
    },
    "capture": {
      "method": "POST",
      "href": "/pts/v2/payments/6530824710046809304002/captures"
    }
  },
  "clientReferenceInformation": {
    "code": "1653082470983"
  },
  "id": "6530824710046809304002",
  "orderInformation": {
    "amountDetails": {
      "authorizedAmount": "100.00",
      "currency": "ABC"
    }
  },
  "paymentAccountInformation": {
    "card": {
      "type": "002"
    }
  },
  "paymentInformation": {
    "tokenizedCard": {
      "type": "002"
    },
    "card": {
      "type": "002"
    }
  },
  "pointOfSaleInformation": {
    "terminalId": "111111"
  },
  "processorInformation": {
    "approvalCode": "888888",
    "authIndicator": "1",
    "networkTransactionId": "123456789619999",
    "transactionId": "123456789619999",
    "responseCode": "100",
    "avs": {
      "code": "X",
      "codeRaw": "I1"
    }
  },
  "reconciliationId": "79710341A39WTT5W",
  "status": "AUTHORIZED",
  "submitTimeUtc": "2022-05-20T21:34:31Z"
}
```

REST Example: Merchant-Initiated Mastercard Standing Order Payment with `TMS` Payment Instrument {#credentials-mc-standorder-mit-tms-pid-ex-rest}
=================================================================================================================================================

Request  
This example includes optional fields.

```
{
  "clientReferenceInformation": {
    "code": "TC50171_3"
  },
  "processingInformation": {
    "commerceIndicator": "recurring",
    "authorizationOptions": {
      "initiator": {
        "merchantInitiatedTransaction": {
          "reason": "8"
        }
      }
    }
  },
  "paymentInformation": {
    "paymentInstrument": {
      "id": "07DB0915C20F2DDBE063A2598D0A6F26"
    }
  },
  "orderInformation": {
    "amountDetails": {
      "totalAmount": "102.21",
      "currency": "ABC"
    }
  }
}
```

Response to a Successful Request

```
{
  "_links": {
    "authReversal": {
      "method": "POST",
      "href": "/pts/v2/payments/6974839908106304103955/reversals"
    },
    "self": {
      "method": "GET",
      "href": "/pts/v2/payments/6974839908106304103955"
    },
    "capture": {
      "method": "POST",
      "href": "/pts/v2/payments/6974839908106304103955/captures"
    }
  },
  "clientReferenceInformation": {
    "code": "TC50171_3"
  },
  "id": "6974839908106304103955",
  "orderInformation": {
    "amountDetails": {
      "authorizedAmount": "102.21",
      "currency": "ABC"
    }
  },
  "paymentAccountInformation": {
    "card": {
      "type": "001"
    }
  },
  "paymentInformation": {
    "tokenizedCard": {
      "type": "001"
    },
    "instrumentIdentifier": {
      "id": "7010000000016241111",
      "state": "ACTIVE"
    },
    "paymentInstrument": {
      "id": "07DB0915C20F2DDBE063A2598D0A6F26"
    },
    "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": "62599243NNMR6324",
  "status": "AUTHORIZED",
  "submitTimeUtc": "2023-10-16T19:19:51Z"
}
```

REST Example: Merchant-Initiated Mastercard Standing Order Payment with a `TMS` Customer Token {#credentials-mc-standorder-mit-tms-cid-ex-rest}
===============================================================================================================================================

Request

```
{
  "clientReferenceInformation": {
    "code": "TC50171_3"
  },
  "processingInformation": {
    "commerceIndicator": "recurring",
    "authorizationOptions": {
      "initiator": {
        "merchantInitiatedTransaction": {
          "reason": "8"
        }
      }
    }
  },
  "paymentInformation": {
    "customer": {
      "id": "07DB50E35AE11DA2E063A2598D0A9995"
    }
  },
  "orderInformation": {
    "amountDetails": {
      "totalAmount": "102.21",
      "currency": "ABC"
    }
  }
}
```

Response to a Successful Request

```
{
  "_links": {
    "authReversal": {
      "method": "POST",
      "href": "/pts/v2/payments/6974846967476340503955/reversals"
    },
    "self": {
      "method": "GET",
      "href": "/pts/v2/payments/6974846967476340503955"
    },
    "capture": {
      "method": "POST",
      "href": "/pts/v2/payments/6974846967476340503955/captures"
    }
  },
  "clientReferenceInformation": {
    "code": "TC50171_3"
  },
  "id": "6974846967476340503955",
  "orderInformation": {
    "amountDetails": {
      "authorizedAmount": "102.21",
      "currency": "ABC"
    }
  },
  "paymentAccountInformation": {
    "card": {
      "type": "001"
    }
  },
  "paymentInformation": {
    "tokenizedCard": {
      "type": "001"
    },
    "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": "62599950BNN133LK",
  "status": "AUTHORIZED",
  "submitTimeUtc": "2023-10-16T19:31:36Z"
}
```

