# Smart Subscriptions Test Cases
source: https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md

This article provides test case data and shows example responses you can return for some sample requests sent through the Merchant Transaction API.

#### Successful requests and responses {#successful-requests-and-responses}

These test cases show examples of successful requests you might encounter and their corresponding responses:

* [TC1: Valid cancellation request for flexible contract type subscription](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#tc1-valid-cancellation-request-for-flexible-contract-type-subscription)
* [TC2: Valid cancellation request for fixed contract type subscription](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#tc2-valid-cancellation-request-for-fixed-contract-type-subscription)
* [TC3: Invalid details in cardholder info so can't identify user account](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#tc3-invalid-details-in-cardholder-info)
* [TC4: Subscription already canceled](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#tc4-subscription-already-canceled)
* [TC5: Subscription cancellation initiated elsewhere with upcoming payments](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#tc5-subscription-cancellation-initiated-elsewhere-with-upcoming-payments)
* [TC6: Cancellation request for a free service](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#tc6-cancellation-request-for-a-free-service)
* [TC7: Cancellation request for a third-party subscription](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#tc7-cancellation-request-for-a-third-party-subscription)
* [TC8: Merchant can't identify the subscription to cancel](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#tc8-merchant-unable-to-identify-the-subscription-to-cancel)

#### Error requests and responses {#error-requests-and-responses}

These test cases show examples of error requests you might encounter and their corresponding responses:

* [ETC1: Mandatory field actionId missing in request](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#etc1-mandatory-field-actionid-missing-in-request)
* [ETC2: Conditional requirement field missing in request](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#etc2-conditional-requirement-field-missing-in-request)
* [ETC3: Request with malformed field](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#etc3-request-with-malformed-field)
* [ETC4: Request sent with GET](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#etc4-request-sent-with-get)
* [ETC5: Request hit invalid endpoint](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#etc5-request-hit-invalid-endpoint)
* [ETC6: Malformed JSON in request](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#etc6-malformed-json-in-request)
* [ETC7: Unsupported content type in the request](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#etc7-unsupported-content-type-in-the-request)
* [ETC8: Request sent is forbidden](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#etc8-request-sent-is-forbidden)
* [ETC9: Too many requests sent](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#etc9-too-many-requests-sent)
* [ETC10: Request hit when the service is down](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#etc10-request-hit-when-the-service-is-down)
* [ETC11: An unexpected error occurs while processing request](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#etc11-an-unexpected-error-occurs-while-processing-request)
* [ETC12: Multiple validation messages for single field](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#etc12-multiple-validation-messages-for-single-field)

<br />

## Successful Test Cases {#successful-test-cases}

### TC1: Valid cancellation request for flexible contract type subscription {#tc1-valid-cancellation-request-for-flexible-contract-type-subscription}

For this test case, a request is sent with validated cardholder details and includes an `actionType` of **CANCEL** for a subscription with a `FLEXIBLE` type of contract.

You cancel the subscription and return details for `actionStatus` and `subscriptionChanges` to indicate that the cancellation was applied successfully and the subscription updated.

#### Request {#request}

```JSON
{
  "requestReference": {
    "originatorChannel": "SUBSCRIPTION_CONTROLS",
    "originatorId": "420f0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b35304255715f",
    "sourceId": "66666688ggg0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b324gf",
    "originatorDescription": "Test Issuer1",
    "correlationId": "zebj8evpeo",
    "locale": "en-US"
  },
  "actionId": "52318413-bd05-4960-a745-f79e5c3d6de9",
  "actionType": "CANCEL",
  "cardholder": {
    "card": {
      "cardBrand": "MC",
      "firstSix": "648576",
      "lastFour": "3645",
      "cardExpirationDate": "0927"
    },
    "fullName": {
      "firstName": "Tina",
      "lastName": "Gill"
    },
    "birthDate": "1986-02-08",
    "postalCode": "L1T 1M1",
    "contactEmail": "jdoe82@hotmail.com",
    "merchantEmail": "jdoe82@hotmail.com",
    "addresses": [
      {
        "addressType": "HOME",
        "streetAndNumber": "106 Still Ln",
        "city": "Toronto",
        "provState": "ON",
        "country": "CA",
        "postalCode": "L1T 1M1"
      }
    ],
    "mostRecentCardTransaction": {
      "transactionDate": "2025-07-16",
      "amount": "250.00",
      "currencyCode": "CAD",
      "transactionIdentifier": "389758456",
      "transactionReferenceDetails": "SFEDSVF234DSGS"
    }
  },
  "productService": {
    "merchantId": "9cc9d677-7be9-442c-beb7-198543b740fe",
    "serviceName": "Spotify",
    "serviceRenewalDate": "2024-05-02",
    "purchaseLocation": "Toronto",
    "servicePhoneNumber": "+6471283911",
    "serviceNumber": "JdGMxLtDRejgrDHJ23eKWA8uQM997SDb"
  },
  "offerAllowed": false
}
```

#### Response {#response}

```JSON
{
  "actionStatus": {
    "responseCode": "ACTION_APPLIED",
    "responseDetails": "Action has been successfully processed"
  },
  "subscriptionChanges": {
    "serviceName": "Spotify",
    "billingStatus": "PAID",
    "updatedAt": "2025-04-16T07:20:50.52Z",
    "effectiveDate": "2025-04-18",
    "billedThrough": "DIRECT",
    "contractType": "FLEXIBLE",
    "paymentsRemaining": 0,
    "nextBillingAmount": 0.00,
    "billingCurrencyCode": "USD"
  }
}
```

[Back to top](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#successful-test-cases)

### TC2: Valid cancellation request for fixed contract type subscription {#tc2-valid-cancellation-request-for-fixed-contract-type-subscription}

Here, a request is sent with validated cardholder details and includes an `actionType` of **CANCEL** for a subscription with a `FIXED` type of contract.

Because the contract type is `FIXED`, the subscription term is fixed and cancellation can't be initiated before that term has ended. Instead, you return details for `actionStatus` to indicate that the cancellation was not initiated.

#### Request {#request-1}

```JSON
{
  "requestReference": {
    "originatorChannel": "SUBSCRIPTION_CONTROLS",
    "originatorId": "420f0845bd9b808abd8wh39k4b0b372ceb461edd584e9b9db02b35304255715f",
    "sourceId": "ggg0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b324gf",
    "originatorDescription": "Test Issuer2",
    "correlationId": "k3hds74ndk21l32",
    "locale": "en-US"
  },
  "actionId": "59b9c393-3d07-4107-b8db-bdb825a43c59",
  "actionType": "CANCEL",
  "cardholder": {
    "card": {
      "cardBrand": "VISA",
      "firstSix": "452034",
      "lastFour": "2093",
      "cardExpirationDate": "1129"
    },
    "fullName": {
      "firstName": "Kevin",
      "lastName": "Doech"
    },
    "birthDate": "1994-07-16",
    "postalCode": "77245",
    "contactEmail": "john.doech@gmail.com",
    "merchantEmail": "john.doech@gmail.com",
    "addresses": [
      {
        "addressType": "HOME",
        "streetAndNumber": "52 Right st",
        "aptSuite": "APT C",
        "city": "New Jersey",
        "provState": "NJ",
        "country": "US",
        "postalCode": "77245"
      }
    ],
    "mostRecentCardTransaction": {
      "transactionDate": "2025-01-16",
      "amount": "20.99",
      "currencyCode": "USD",
      "transactionIdentifier": "3478568734",
      "transactionReferenceDetails": "EWTFASDVADSTEASF213"
    }
  },
  "productService": {
    "merchantId": "8a0a7681-7f2b-45c9-9180-917b06ae2cff",
    "serviceName": "Netflix",
    "purchaseLocation": "New Jersey",
    "servicePhoneNumber": "+1647283192",
    "serviceNumber": "JdGMxLtDRBd81FmpjPeKWA8uQM997SDf"
  },
  "offerAllowed": false
}
```

#### Response {#response-1}

```JSON
{
  "actionStatus": {
    "responseCode": "FIXED_CONTRACT",
    "responseDetails": "You are on a fixed contract with the subscription and cannot cancel until the contract end date 2025-06-02"
  }
}
```

[Back to top](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#successful-test-cases)

### TC3: Invalid details in cardholder info {#tc3-invalid-details-in-cardholder-info}

In this scenario, a request is sent with an `actionType` of **CANCEL**, but the request includes non-existing or incorrect cardholder details and you can't identify the user account.

You return an `actionStatus:responseCode` of **ACCOUNT_NOT_VERIFIED** indicating that the cardholder account couldn't be verified or identified.

#### Request {#request-2}

```JSON
{
  "requestReference": {
    "originatorChannel": "SUBSCRIPTION_CONTROLS",
    "originatorId": "238476sbdfjsb08abd7acc053b0b372ceb461edd584e9b9db02b35304255715f",
    "sourceId": "9345tjsdbc374wjadbasuracc053b0b372ceb461edd584e9b9db02b324gf",
    "originatorDescription": "Test Issuer3",
    "correlationId": "w3jgh5rajksbf8",
    "locale": "en-US"
  },
  "actionId": "0ba0001a-1672-40bd-a85e-e47a2a19ba61",
  "actionType": "CANCEL",
  "cardholder": {
    "card": {
      "cardBrand": "MC",
      "firstSix": "410029",
      "lastFour": "4923",
      "cardExpirationDate": "0323"
    },
    "fullName": {
      "firstName": "Alex",
      "lastName": "Dane"
    },
    "birthDate": "1988-07-16",
    "postalCode": "91498",
    "contactEmail": "alexdane@gmail.com",
    "merchantEmail": "alex.dane16@gmail.com",
    "addresses": [
      {
        "addressType": "HOME",
        "streetAndNumber": "27 This Dr",
        "city": "Sunnyvale",
        "provState": "CA",
        "country": "US",
        "postalCode": "91498"
      }
    ]
  },
  "productService": {
    "serviceName": "Amazon Prime",
    "serviceRenewalDate": "2022-02-02",
    "purchaseLocation": "New York",
    "servicePhoneNumber": "+6479301238",
    "serviceNumber": "S23Ffsdg34Fa345DFGsjdfjh92n4nds"
  },
  "offerAllowed": false
}
```

#### Response {#response-2}

```JSON
{
  "actionStatus": {
    "responseCode": "ACCOUNT_NOT_VERIFIED",
    "responseDetails": "User account not found or User Account mismatch"
  }
}
```

[Back to top](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#successful-test-cases)

### TC4: Subscription already canceled {#tc4-subscription-already-canceled}

Here, a request is sent with validated cardholder details and includes an `actionType` of **CANCEL** for a subscription that was already canceled.

You return an `actionStatus:responseCode` of **ALREADY_PROCESSED** indicating that a cancellation request has already been processed.

#### Request {#request-3}

```JSON
{
  "requestReference": {
    "originatorChannel": "SUBSCRIPTION_CONTROLS",
    "originatorId": "420f0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b35304255715f",
    "sourceId": "66666688ggg0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b324gf",
    "originatorDescription": "Test Issuer1",
    "correlationId": "zebj8evpeo",
    "locale": "en-US"
  },
  "actionId": "f0bab306-c73a-40ab-948c-b9524c3fd0ec",
  "actionType": "CANCEL",
  "cardholder": {
    "card": {
      "cardBrand": "MC",
      "firstSix": "648576",
      "lastFour": "3645",
      "cardExpirationDate": "0927"
    },
    "fullName": {
      "firstName": "Jane",
      "lastName": "Doe"
    },
    "birthDate": "1986-02-08",
    "postalCode": "L1T 1M1",
    "contactEmail": "jdoe82@hotmail.com",
    "merchantEmail": "jdoe82@hotmail.com",
    "addresses": [
      {
        "addressType": "HOME",
        "streetAndNumber": "106 Still Ln",
        "city": "Toronto",
        "provState": "ON",
        "country": "CA",
        "postalCode": "L1T 1M1"
      }
    ],
    "mostRecentCardTransaction": {
      "transactionDate": "2025-07-16",
      "amount": "250.00",
      "currencyCode": "CAD",
      "transactionIdentifier": "389758456",
      "transactionReferenceDetails": "SFEDSVF234DSGS"
    }
  },
  "productService": {
    "merchantId": "9cc9d677-7be9-442c-beb7-198543b740fe",
    "serviceName": "NY Times",
    "serviceRenewalDate": "2024-05-02",
    "purchaseLocation": "Toronto",
    "servicePhoneNumber": "+6471283911",
    "serviceNumber": "JdGMxLtDRejgrDHJ23eKWA8uQM997SDb"
  },
  "offerAllowed": false
}
```

#### Response {#response-3}

```JSON
{
  "actionStatus": {
    "responseCode": "ALREADY_PROCESSED",
    "responseDetails": "Service cancellation request has already been processed"
  }
}
```

[Back to top](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#successful-test-cases)

### TC5: Subscription cancellation initiated elsewhere with upcoming payments {#tc5-subscription-cancellation-initiated-elsewhere-with-upcoming-payments}

For this test case, a request is sent with validated cardholder details and includes an `actionType` of **CANCEL** for a subscription cancellation request that was already initiated elsewhere, such as directly through your website.

You return an `actionStatus:responseCode` of **ALREADY_PROCESSED_WITH_UPCOMING_PAYMENTS** indicating that the cancellation request has already been processed and an upcoming payment is pending.

#### Request {#request-4}

```JSON
{
  "requestReference": {
    "originatorChannel": "SUBSCRIPTION_CONTROLS",
    "originatorId": "276ryafdmnfbkduy5rbd9b808abd7acc461edd584e9b9db02b35304255715f",
    "sourceId": "djkht43twhsfb845bd9b808abd7acc053b0b372ceb44e9b9db02b324gf",
    "originatorDescription": "Test Issuer5",
    "correlationId": "jhdb4905adfa",
    "locale": "en-US"
  },
  "actionId": "239c1c9a-08d1-4c6a-b0f9-c00ea9469688",
  "actionType": "CANCEL",
  "cardholder": {
    "card": {
      "cardBrand": "VISA",
      "firstSix": "452018",
      "lastFour": "6543",
      "cardExpirationDate": "0528"
    },
    "fullName": {
      "firstName": "Lucas",
      "lastName": "Dott"
    },
    "birthDate": "1982-05-15",
    "postalCode": "M2R 2C4",
    "contactEmail": "ldott007@hotmail.com",
    "merchantEmail": "ldott007@hotmail.com",
    "addresses": [
      {
        "addressType": "HOME",
        "streetAndNumber": "10 Goldfinch Crt",
        "city": "North York",
        "provState": "ON",
        "country": "CA",
        "postalCode": "M2R 2C4"
      }
    ],
    "mostRecentCardTransaction": {
      "transactionDate": "2025-07-16",
      "amount": "19.99",
      "currencyCode": "CAD",
      "transactionIdentifier": "6874985",
      "transactionReferenceDetails": "ADSF234SAF34"
    }
  },
  "productService": {
    "merchantId": "c5cfdc87-f810-4c7f-99ac-6b870a368b35",
    "serviceName": "SkyView SkyConnect",
    "serviceRenewalDate": "2024-05-02",
    "purchaseLocation": "Toronto",
    "servicePhoneNumber": "+4163587222",
    "serviceNumber": "EfRDHdsEWdhytjrDHJ23eKWA8uQM997SDb"
  },
  "offerAllowed": false
}
```

#### Response {#response-4}

```JSON
{
  "actionStatus": {
    "responseCode": "ALREADY_PROCESSED_WITH_UPCOMING_PAYMENTS",
    "responseDetails": "Service Cancellation has been requested already but the cardholder is on a fixed contract with 2 remaining payments"
  }
}
```

[Back to top](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#successful-test-cases)

### TC6: Cancellation request for a free service {#tc6-cancellation-request-for-a-free-service}

Here, a request is sent with validated cardholder details and includes an `actionType` of **CANCEL** for a subscription service that is free.

You return an `actionStatus:responseCode` of **FREE_ACCOUNT** indicating that there isn't a paid subscription to cancel.

#### Request {#request-5}

```JSON
{
  "requestReference": {
    "originatorChannel": "SUBSCRIPTION_CONTROLS",
    "originatorId": "420f0845sgrfmbndsfiuiyrhejwfeliru232y4r584e9b9db02b35304255715f",
    "sourceId": "3mjh5radsf7y23rbahsdvfabd7acc053b0b372ceb461edd584e9b9db02b324gf",
    "originatorDescription": "Test Issuer6",
    "correlationId": "hw3g5wre8fhadnf",
    "locale": "en-US"
  },
  "actionId": "9c703b1c-65d0-4760-9c24-7a1aca593c23",
  "actionType": "CANCEL",
  "cardholder": {
    "card": {
      "cardBrand": "MC",
      "firstSix": "123456",
      "lastFour": "1234",
      "cardExpirationDate": "927"
    },
    "fullName": {
      "firstName": "Lisa",
      "lastName": "Sesh"
    },
    "birthDate": "1992-01-18",
    "postalCode": "77018",
    "contactEmail": "lisaseshrocks@gmail.com",
    "merchantEmail": "lisaseshrocks@gmail.com"
  },
  "productService": {
    "merchantId": "069fb271-5a0a-411d-8fd7-346eae7a633b",
    "serviceName": "Hulu",
    "serviceRenewalDate": "2025-08-08",
    "serviceNumber": "JdGMxsRsdvTRW3qasFhJH8uQM997SDb"
  },
  "offerAllowed": false
}
```

#### Response {#response-5}

```JSON
{
 "actionStatus": {
    "responseCode": "FREE_ACCOUNT",
    "responseDetails": "Not a paid subscription to cancel"
  }
}
```

[Back to top](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#successful-test-cases)

### TC7: Cancellation request for a third-party subscription {#tc7-cancellation-request-for-a-third-party-subscription}

Here, a request is sent with validated cardholder details and includes an `actionType` of **CANCEL** for a subscription that was billed through a third party. Merchants can't manage these types of subscriptions.

You return an `actionStatus:responseCode` of **BILLED_THROUGH_THIRD_PARTY** indicating that the service is managed and billed through a third party and can't be canceled by you.

#### Request {#request-6}

```JSON
{
  "requestReference": {
    "originatorChannel": "SUBSCRIPTION_CONTROLS",
    "originatorId": "420f0845bd9b808abd7accw4u5htrsdnf8fmdnaskjf9b9db02b35304255715f",
    "sourceId": "32rajksbf2347834ebascjcc053b0b372ceb461edd584e9b9db02b324gf",
    "originatorDescription": "Test Issuer7",
    "correlationId": "wkue5h34mwenfkdjsf",
    "locale": "en-US"
  },
  "actionId": "7fb50781-91fb-4ed8-ba84-fed27355f939",
  "actionType": "CANCEL",
  "cardholder": {
    "card": {
      "cardBrand": "VISA",
      "firstSix": "411111",
      "lastFour": "9023",
      "cardExpirationDate": "1229"
    },
    "fullName": {
      "firstName": "Kelly",
      "lastName": "Jane"
    },
    "birthDate": "1987-02-13",
    "contactEmail": "jkelly1302@gmail.com",
    "merchantEmail": "jkelly1302@gmail.com",
    "addresses": [
      {
        "addressType": "HOME",
        "streetAndNumber": "10 Parkway Forest Dr",
        "aptSuite": "APT A",
        "city": "Vancouver",
        "provState": "BC",
        "country": "CA",
        "postalCode": "V1T 2D3"
      }
    ],
    "mostRecentCardTransaction": {
      "transactionDate": "2025-03-12",
      "amount": "19.99",
      "currencyCode": "CAD",
      "transactionIdentifier": "78632846",
      "transactionReferenceDetails": "AOD23SF324SAWR3"
    }
  },
  "productService": {
    "merchantId": "d1fc582a-5793-48bb-802e-ec151dce6421",
    "serviceName": "Disney",
    "purchaseLocation": "Vancouver",
    "serviceNumber": "RdTKJsrDGrsD234DSTvaef678wWGSDB"
  },
  "offerAllowed": false
}
```

#### Response {#response-6}

```JSON
{
  "actionStatus": {
    "responseCode": "BILLED_THROUGH_THIRD_PARTY",
    "responseDetails": "Subscription billed through Apple, cannot cancel directly through merchant"
  }
}
```

[Back to top](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#successful-test-cases)

### TC8: Merchant unable to identify the subscription to cancel {#tc8-merchant-unable-to-identify-the-subscription-to-cancel}

In this scenario, a request is sent with cardholder and product service details that match multiple subscriptions. You can't determine the exact service with which to cancel the subscription.

You return an `actionStatus:responseCode` of **HAS_MULTIPLE_SUBSCRIPTIONS** indicating that the exact subscription to cancel couldn't be identified.

#### Request {#request-7}

```JSON
{
  "requestReference": {
    "originatorChannel": "SUBSCRIPTION_CONTROLS",
    "originatorId": "420f0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b35304255715f",
    "sourceId": "66666688ggg0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b324gf",
    "originatorDescription": "Test Issuer",
    "correlationId": "zebj2kvpeo",
    "locale": "en-US"
  },
  "actionId": "52318428-bd05-4960-a745-f79e5c3d6df6",
  "actionType": "CANCEL",
  "cardholder": {
    "card": {
      "cardBrand": "MC",
      "firstSix": "555301",
      "lastFour": "9876",
      "cardExpirationDate": "0729"
    },
    "fullName": {
      "firstName": "Joseph",
      "lastName": "Kennedy"
    },
    "birthDate": "1976-06-26",
    "contactEmail": "kenjoseph@gmail.com",
    "alternativeEmail": "kennyjoe927@gmail.com",
    "merchantEmail": "kenjoseph@gmail.com",
    "mostRecentCardTransaction": {
      "transactionDate": "2025-07-16",
      "amount": "12.99.00",
      "currencyCode": "USD",
      "transactionIdentifier": "4562893475"
    }
  },
  "offerAllowed": true
}
```

#### Response {#response-7}

```JSON
{
  "actionStatus": {
    "responseCode": "HAS_MULTIPLE_SUBSCRIPTIONS",
    "responseDetails": "Found multiple subscriptions, need more info to determine the exact subscription to cancel"
  }
}
```

[Back to top](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#successful-test-cases)

## Error Test Cases {#error-test-cases}

### ETC1: Mandatory field actionId missing in request {#etc1-mandatory-field-actionid-missing-in-request}

For this test case, the `actionId` field with a valid value is required as part of the request but is missing.

#### Request {#request-8}

```JSON
{
  "requestReference": {
    "originatorChannel": "SUBSCRIPTION_CONTROLS",
    "originatorId": "420f0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b35304255715f",
    "sourceId": "66666688ggg0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b324gf",
    "originatorDescription": "Test Issuer",
    "correlationId": "zebj2kvpeo",
    "locale": "en-US"
  },
  "actionType": "CANCEL",
  "cardholder": {
    "card": {
      "cardBrand": "MC",
      "firstSix": "123456",
      "lastFour": "1234",
      "cardExpirationDate": "0927"
    },
    "fullName": {
      "firstName": "Travis",
      "lastName": "Thompson"
    },
    "birthDate": "1997-07-16",
    "postalCode": "12345",
    "contactEmail": "onetwothree@example.com",
    "alternativeEmail": "alternative@example.com",
    "merchantEmail": "merchant.email@example.com",
    "addresses": [
      {
        "addressType": "HOME",
        "streetAndNumber": "123 Main St",
        "aptSuite": "APT A",
        "city": "New York",
        "provState": "NY",
        "country": "US",
        "postalCode": "12345"
      }
    ],
    "mostRecentCardTransaction": {
      "transactionDate": "2025-07-16",
      "amount": "250.00",
      "currencyCode": "USD",
      "transactionIdentifier": "123456",
      "transactionReferenceDetails": "1A2B3C4D5"
    }
  },
  "productService": {
    "merchantId": "9cc9d677-7be9-442c-beb7-198543b740fe",
    "serviceName": "Streaming Service1",
    "serviceRenewalDate": "2022-02-02",
    "purchaseLocation": "New York",
    "servicePhoneNumber": "+1234567890",
    "serviceNumber": "JdGMxLtDRBd81FmpjPeKWA8uQM997SDb"
  },
  "offerAllowed": true
}
```

#### Response {#response-8}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "Merchant Actions",
        "ReasonCode": "VALIDATION_FAILED",
        "Description": "One or more required fields are missing: actionId",
        "Recoverable": false,
        "Details": "actionId field is required"
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#successful-test-cases)

### ETC2: Conditional requirement field missing in request {#etc2-conditional-requirement-field-missing-in-request}

Here, the conditional requirement field `card.lastFour` with a valid value is required as part of the request but is missing.

#### Request {#request-9}

```JSON
{
  "requestReference": {
    "originatorChannel": "SUBSCRIPTION_CONTROLS",
    "originatorId": "420f0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b35304255715f",
    "sourceId": "66666688ggg0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b324gf",
    "originatorDescription": "Test Issuer",
    "correlationId": "zebj2kvpeo",
    "locale": "en-US"
  },
  "actionId": "b197590a-0d56-4993-a2e5-af268b46a958",
  "actionType": "CANCEL",
  "cardholder": {
    "card": {
      "cardBrand": "MC",
      "firstSix": "123456",
      "cardExpirationDate": "0927"
    },
    "fullName": {
      "firstName": "Thomas",
      "lastName": "Kate"
    },
    "birthDate": "1997-07-16",
    "postalCode": "12345",
    "contactEmail": "onetwothree@example.com",
    "alternativeEmail": "alternative@example.com",
    "merchantEmail": "merchant.email@example.com",
    "addresses": [
      {
        "addressType": "HOME",
        "streetAndNumber": "123 Main St",
        "aptSuite": "APT A",
        "city": "New York",
        "provState": "NY",
        "country": "US",
        "postalCode": "12345"
      }
    ],
    "mostRecentCardTransaction": {
      "transactionDate": "2025-07-16",
      "amount": "250.00",
      "currencyCode": "USD",
      "transactionIdentifier": "123456",
      "transactionReferenceDetails": "1A2B3C4D5"
    }
  },
  "productService": {
    "merchantId": "9cc9d677-7be9-442c-beb7-198543b740fe",
    "serviceName": "Streaming Service2",
    "serviceRenewalDate": "2022-02-02",
    "purchaseLocation": "New York",
    "servicePhoneNumber": "+1234567890",
    "serviceNumber": "JdGMxLtDRBd81FmpjPeKWA8uQM997SDb"
  },
  "offerAllowed": true
}
```

#### Response {#response-9}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "Merchant Actions",
        "ReasonCode": "VALIDATION_FAILED",
        "Description": "One or more conditional requirements are not met: card. lastFour",
        "Recoverable": false,
        "Details": "card.lastFour field is required when card info is provided"
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#successful-test-cases)

### ETC3: Request with malformed field {#etc3-request-with-malformed-field}

In this scenario, a request is sent with a `transactionAmount` field that has an invalid format. A `MALFORMED_FIELD` status is returned with the appropriate error message.

#### Request {#request-10}

```JSON
{
  "requestReference": {
    "originatorChannel": "SUBSCRIPTION_CONTROLS",
    "originatorId": "420f0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b35304255715f",
    "sourceId": "66666688ggg0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b324gf",
    "originatorDescription": "Test Issuer",
    "correlationId": "zebj2kvpeo",
    "locale": "en-US"
  },
  "actionId": "ae162288-02ce-4788-b17a-9d32af8e2040",
  "actionType": "CANCEL",
  "cardholder": {
    "card": {
      "cardBrand": "MC",
      "firstSix": "123456",
      "cardExpirationDate": "0927",
      "lastFour": "4568"
    },
    "fullName": {
      "firstName": "Laila",
      "lastName": "Dough"
    },
    "birthDate": "1997-07-16",
    "postalCode": "12345",
    "contactEmail": "onetwothree@example.com",
    "alternativeEmail": "alternative@example.com",
    "merchantEmail": "merchant.email@example.com",
    "addresses": [
      {
        "addressType": "HOME",
        "streetAndNumber": "123 Main St",
        "aptSuite": "APT A",
        "city": "New York",
        "provState": "NY",
        "country": "US",
        "postalCode": "12345"
      }
    ],
    "mostRecentCardTransaction": {
      "transactionDate": "2025-07-16",
      "amount": ".25",
      "currencyCode": "USD",
      "transactionIdentifier": "123456",
      "transactionReferenceDetails": "1A2B3C4D5"
    }
  },
  "productService": {
    "merchantId": "9cc9d677-7be9-442c-beb7-198543b740fe",
    "serviceName": "Streaming Service3",
    "serviceRenewalDate": "2022-02-02",
    "purchaseLocation": "New York",
    "servicePhoneNumber": "+1234567890",
    "serviceNumber": "JdGMxLtDRBd81FmpjPeKWA8uQM997SDb"
  },
  "offerAllowed": true
}
```

#### Response {#response-10}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "Merchant Actions",
        "ReasonCode": "MALFORMED_FIELD",
        "Description": "The field was improperly formatted: mostRecentCardTransaction.amount",
        "Recoverable": false,
        "Details": "Amount field should be of min length 1 and max length 12, decimal point period must not be the first character"
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#successful-test-cases)

### ETC4: Request sent with GET {#etc4-request-sent-with-get}

For this test case, a GET request is sent when only PUT requests are allowed.

#### Request {#request-11}

```JSON
{
  "requestReference": {
    "originatorChannel": "SUBSCRIPTION_CONTROLS",
    "originatorId": "420f0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b35304255715f",
    "sourceId": "66666688ggg0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b324gf",
    "originatorDescription": "Test Issuer",
    "correlationId": "zebj2kvpeo",
    "locale": "en-US"
  },
  "actionId": "f164f55f-1dae-431e-bd63-e6e1357132df",
  "actionType": "CANCEL",
  "cardholder": {
    "card": {
      "cardBrand": "MC",
      "firstSix": "123456",
      "lastFour": "3456",
      "cardExpirationDate": "0927"
    },
    "fullName": {
      "firstName": "Omar",
      "lastName": "Faroq"
    },
    "birthDate": "1997-07-16",
    "postalCode": "12345",
    "contactEmail": "onetwothree@example.com",
    "alternativeEmail": "alternative@example.com",
    "merchantEmail": "merchant.email@example.com",
    "addresses": [
      {
        "addressType": "HOME",
        "streetAndNumber": "123 Main St",
        "aptSuite": "APT A",
        "city": "New York",
        "provState": "NY",
        "country": "US",
        "postalCode": "12345"
      }
    ],
    "mostRecentCardTransaction": {
      "transactionDate": "2025-07-16",
      "amount": "250.00",
      "currencyCode": "USD",
      "transactionIdentifier": "123456",
      "transactionReferenceDetails": "1A2B3C4D5"
    }
  },
  "productService": {
    "merchantId": "9cc9d677-7be9-442c-beb7-198543b740fe",
    "serviceName": "Streaming Service4",
    "serviceRenewalDate": "2022-02-02",
    "purchaseLocation": "New York",
    "servicePhoneNumber": "+1234567890",
    "serviceNumber": "JdGMxLtDRBd81FmpjPeKWA8uQM997SDb"
  },
  "offerAllowed": true
}
```

#### Response {#response-11}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "Merchant Actions",
        "ReasonCode": "METHOD_NOT_ALLOWED",
        "Description": "GET is not allowed for the resource. PUT is the only method allowed",
        "Recoverable": false
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#successful-test-cases)

### ETC5: Request hit invalid endpoint {#etc5-request-hit-invalid-endpoint}

In this scenario, a request is sent with an invalid endpoint: `/merchants/subscriptions/action`.

An HTTP status 404 is returned with the appropriate error message.

#### Request {#request-12}

```JSON
{
  "requestReference": {
    "originatorChannel": "SUBSCRIPTION_CONTROLS",
    "originatorId": "420f0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b35304255715f",
    "sourceId": "66666688ggg0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b324gf",
    "originatorDescription": "Test Issuer",
    "correlationId": "zebj2kvpeo",
    "locale": "en-US"
  },
  "actionId": "f164f55f-1dae-431e-bd63-e6e1357132df",
  "actionType": "CANCEL",
  "cardholder": {
    "card": {
      "cardBrand": "MC",
      "firstSix": "123456",
      "lastFour": "3456",
      "cardExpirationDate": "0927"
    },
    "fullName": {
      "firstName": "Omar",
      "lastName": "Faroq"
    },
    "birthDate": "1997-07-16",
    "postalCode": "12345",
    "contactEmail": "onetwothree@example.com",
    "alternativeEmail": "alternative@example.com",
    "merchantEmail": "merchant.email@example.com",
    "addresses": [
      {
        "addressType": "HOME",
        "streetAndNumber": "123 Main St",
        "aptSuite": "APT A",
        "city": "New York",
        "provState": "NY",
        "country": "US",
        "postalCode": "12345"
      }
    ],
    "mostRecentCardTransaction": {
      "transactionDate": "2025-07-16",
      "amount": "250.00",
      "currencyCode": "USD",
      "transactionIdentifier": "123456",
      "transactionReferenceDetails": "1A2B3C4D5"
    }
  },
  "productService": {
    "merchantId": "9cc9d677-7be9-442c-beb7-198543b740fe",
    "serviceName": "Streaming Service4",
    "serviceRenewalDate": "2022-02-02",
    "purchaseLocation": "New York",
    "servicePhoneNumber": "+1234567890",
    "serviceNumber": "JdGMxLtDRBd81FmpjPeKWA8uQM997SDb"
  },
  "offerAllowed": true
}
```

#### Response {#response-12}

```JSON
{

  "Errors": {
    "Error": [
      {
        "Source": "Merchant Actions",
        "ReasonCode": "NOT_FOUND",
        "Description": "The requested resource could not be found",
        "Recoverable": false
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#successful-test-cases)

### ETC6: Malformed JSON in request {#etc6-malformed-json-in-request}

Here, a malformed request is sent where the JSON data sent isn't formatted correctly, such as comma, bracket, or indentation issues.

An HTTP status 400 is returned with the appropriate error message.

#### Request {#request-13}

```JSON
{
  "requestReference": {
    
  }
  "actionId": "6834d9a7-f502-4c1c-85f6-e2cde6e67a82"
  "actionType": "CANCEL",
  "offerAllowed": true
}
```

#### Response {#response-13}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "Merchant Actions",
        "ReasonCode": "REQUEST_BODY_MALFORMED",
        "Description": "Request body is malformed",
        "Recoverable": false
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#successful-test-cases)

### ETC7: Unsupported content type in the request {#etc7-unsupported-content-type-in-the-request}

In this scenario, a request is sent with the `content-type` **application/xml** , but you're expecting **application/json**.

An HTTP status 415 is returned with the appropriate error message.

#### Request {#request-14}

```XML
{
  "requestReference": {
    "originatorChannel": "SUBSCRIPTION_CONTROLS",
    "originatorId": "420f0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b35304255715f",
    "sourceId": "66666688ggg0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b324gf",
    "originatorDescription": "Test Issuer",
    "correlationId": "zebj2kvpeo",
    "locale": "en-US"
  },
  "actionId": "ba10a59a-c560-4b5a-9abc-9542e7741045",
  "actionType": "CANCEL",
  "cardholder": {
    "card": {
      "cardBrand": "MC",
      "firstSix": "123456",
      "lastFour": "3456",
      "cardExpirationDate": "0927"
    },
    "fullName": {
      "firstName": "Indiana",
      "lastName": "Jones"
    },
    "birthDate": "1997-07-16",
    "postalCode": "12345",
    "contactEmail": "onetwothree@example.com",
    "alternativeEmail": "alternative@example.com",
    "merchantEmail": "merchant.email@example.com",
    "addresses": [
      {
        "addressType": "HOME",
        "streetAndNumber": "123 Main St",
        "aptSuite": "APT A",
        "city": "New York",
        "provState": "NY",
        "country": "US",
        "postalCode": "12345"
      }
    ],
    "mostRecentCardTransaction": {
      "transactionDate": "2025-07-16",
      "amount": "250.00",
      "currencyCode": "USD",
      "transactionIdentifier": "123456",
      "transactionReferenceDetails": "1A2B3C4D5"
    }
  },
  "productService": {
    "merchantId": "9cc9d677-7be9-442c-beb7-198543b740fe",
    "serviceName": "Streaming Service7",
    "serviceRenewalDate": "2022-02-02",
    "purchaseLocation": "New York",
    "servicePhoneNumber": "+1234567890",
    "serviceNumber": "JdGMxLtDRBd81FmpjPeKWA8uQM997SDb"
  },
  "offerAllowed": true
}
```

#### Response {#response-14}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "Merchant Actions",
        "ReasonCode": "UNSUPPORTED_MEDIA_TYPE",
        "Description": "Request content-type is not supported",
        "Recoverable": false,
        "Details": "Content-Type 'application/xml;charset=ISO-8859-1' is not supported"
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#successful-test-cases)

### ETC8: Request sent is forbidden {#etc8-request-sent-is-forbidden}

Here, the request is sent with a valid GUID but isn't configured for merchant actions.

An HTTP status 403 is returned with the appropriate error message.

#### Request {#request-15}

```JSON
{
  "requestReference": {
    "originatorChannel": "SUBSCRIPTION_CONTROLS",
    "originatorId": "420f0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b35304255715f",
    "sourceId": "66666688ggg0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b324gf",
    "originatorDescription": "Test Issuer",
    "correlationId": "zebj2kvpeo",
    "locale": "en-US"
  },
  "actionId": "ba10a59a-c560-4b5a-9abc-9542e7741045",
  "actionType": "CANCEL",
  "cardholder": {
    "card": {
      "cardBrand": "MC",
      "firstSix": "123456",
      "lastFour": "3456",
      "cardExpirationDate": "927"
    },
    "fullName": {
      "firstName": "Hulk",
      "lastName": "Hulk"
    },
    "birthDate": "1997-07-16",
    "postalCode": "12345",
    "contactEmail": "onetwothree@example.com",
    "alternativeEmail": "alternative@example.com",
    "merchantEmail": "merchant.email@example.com",
    "addresses": [
      {
        "addressType": "HOME",
        "streetAndNumber": "123 Main St",
        "aptSuite": "APT A",
        "city": "New York",
        "provState": "NY",
        "country": "US",
        "postalCode": "12345"
      }
    ],
    "mostRecentCardTransaction": {
      "transactionDate": "2025-07-16",
      "amount": "250.00",
      "currencyCode": "USD",
      "transactionIdentifier": "123456",
      "transactionReferenceDetails": "1A2B3C4D5"
    }
  },
  "productService": {
    "merchantId": "9cc9d677-7be9-442c-beb7-198543b740fe",
    "serviceName": "Streaming Service9",
    "serviceRenewalDate": "2022-02-02",
    "purchaseLocation": "New York",
    "servicePhoneNumber": "+1234567890",
    "serviceNumber": "JdGMxLtDRBd81FmpjPeKWA8uQM997SDb"
  },
  "offerAllowed": true
}
```

#### Response {#response-15}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "Merchant Actions",
        "ReasonCode": "FORBIDDEN",
        "Description": "You do not have the necessary permissions to perform this request",
        "Recoverable": false
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#successful-test-cases)

### ETC9: Too many requests sent {#etc9-too-many-requests-sent}

For this test case, too many requests hit your API simultaneously.

An HTTP status 429 is returned with the appropriate error message.

#### Request {#request-16}

```JSON
{
  "requestReference": {
    "originatorChannel": "SUBSCRIPTION_CONTROLS",
    "originatorId": "420f0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b35304255715f",
    "sourceId": "66666688ggg0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b324gf",
    "originatorDescription": "Test Issuer",
    "correlationId": "zebj2kvpeo",
    "locale": "en-US"
  },
  "actionId": "ba10a59a-c560-4b5a-9abc-9542e7741045",
  "actionType": "CANCEL",
  "cardholder": {
    "card": {
      "cardBrand": "MC",
      "firstSix": "123456",
      "lastFour": "3456",
      "cardExpirationDate": "927"
    },
    "fullName": {
      "firstName": "Captain",
      "lastName": "America"
    },
    "birthDate": "1997-07-16",
    "postalCode": "12345",
    "contactEmail": "onetwothree@example.com",
    "alternativeEmail": "alternative@example.com",
    "merchantEmail": "merchant.email@example.com",
    "addresses": [
      {
        "addressType": "HOME",
        "streetAndNumber": "123 Main St",
        "aptSuite": "APT A",
        "city": "New York",
        "provState": "NY",
        "country": "US",
        "postalCode": "12345"
      }
    ],
    "mostRecentCardTransaction": {
      "transactionDate": "2025-07-16",
      "amount": "250.00",
      "currencyCode": "USD",
      "transactionIdentifier": "123456",
      "transactionReferenceDetails": "1A2B3C4D5"
    }
  },
  "productService": {
    "merchantId": "9cc9d677-7be9-442c-beb7-198543b740fe",
    "serviceName": "Streaming Service10",
    "serviceRenewalDate": "2022-02-02",
    "purchaseLocation": "New York",
    "servicePhoneNumber": "+1234567890",
    "serviceNumber": "JdGMxLtDRBd81FmpjPeKWA8uQM997SDb"
  },
  "offerAllowed": true
}
```

#### Response {#response-16}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "Merchant Actions",
        "ReasonCode": "TOO_MANY_REQUESTS",
        "Description": "Too many requests hit the API too quickly",
        "Recoverable": false
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#successful-test-cases)

### ETC10: Request hit when the service is down {#etc10-request-hit-when-the-service-is-down}

Here, the request was sent when your service was down.

An HTTP status 503 is returned with the appropriate error message.

#### Request {#request-17}

```JSON
{
  "requestReference": {
    "originatorChannel": "SUBSCRIPTION_CONTROLS",
    "originatorId": "420f0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b35304255715f",
    "sourceId": "66666688ggg0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b324gf",
    "originatorDescription": "Test Issuer",
    "correlationId": "zebj2kvpeo",
    "locale": "en-US"
  },
  "actionId": "ba10a59a-c560-4b5a-9abc-9542e7741045",
  "actionType": "CANCEL",
  "cardholder": {
    "card": {
      "cardBrand": "MC",
      "firstSix": "123456",
      "lastFour": "3456",
      "cardExpirationDate": "927"
    },
    "fullName": {
      "firstName": "Iron",
      "lastName": "Man"
    },
    "birthDate": "1997-07-16",
    "postalCode": "12345",
    "contactEmail": "onetwothree@example.com",
    "alternativeEmail": "alternative@example.com",
    "merchantEmail": "merchant.email@example.com",
    "addresses": [
      {
        "addressType": "HOME",
        "streetAndNumber": "123 Main St",
        "aptSuite": "APT A",
        "city": "New York",
        "provState": "NY",
        "country": "US",
        "postalCode": "12345"
      }
    ],
    "mostRecentCardTransaction": {
      "transactionDate": "2025-07-16",
      "amount": "250.00",
      "currencyCode": "USD",
      "transactionIdentifier": "123456",
      "transactionReferenceDetails": "1A2B3C4D5"
    }
  },
  "productService": {
    "merchantId": "9cc9d677-7be9-442c-beb7-198543b740fe",
    "serviceName": "Streaming Service11",
    "serviceRenewalDate": "2022-02-02",
    "purchaseLocation": "New York",
    "servicePhoneNumber": "+1234567890",
    "serviceNumber": "JdGMxLtDRBd81FmpjPeKWA8uQM997SDb"
  },
  "offerAllowed": true
}
```

#### Response {#response-17}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "Merchant Actions",
        "ReasonCode": "SERVICE_UNAVAILABLE",
        "Description": "Merchant service is currently unable to handle the request",
        "Recoverable": false
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#successful-test-cases)

### ETC11: An unexpected error occurs while processing request {#etc11-an-unexpected-error-occurs-while-processing-request}

In this scenario, the server fails to process the request.

An HTTP status 500 is returned with the appropriate error message.

#### Request {#request-18}

```JSON
{
  "requestReference": {
    "originatorChannel": "SUBSCRIPTION_CONTROLS",
    "originatorId": "420f0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b35304255715f",
    "sourceId": "66666688ggg0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b324gf",
    "originatorDescription": "Test Issuer",
    "correlationId": "zebj2kvpeo",
    "locale": "en-US"
  },
  "actionId": "ba10a59a-c560-4b5a-9abc-9542e7741045",
  "actionType": "CANCEL",
  "cardholder": {
    "card": {
      "cardBrand": "MC",
      "firstSix": "123456",
      "lastFour": "3456",
      "cardExpirationDate": "927"
    },
    "fullName": {
      "firstName": "Jane",
      "lastName": "Doe"
    },
    "birthDate": "1997-07-16",
    "postalCode": "12345",
    "contactEmail": "onetwothree@example.com",
    "alternativeEmail": "alternative@example.com",
    "merchantEmail": "merchant.email@example.com",
    "addresses": [
      {
        "addressType": "HOME",
        "streetAndNumber": "123 Main St",
        "aptSuite": "APT A",
        "city": "New York",
        "provState": "NY",
        "country": "US",
        "postalCode": "12345"
      }
    ],
    "mostRecentCardTransaction": {
      "transactionDate": "2025-07-16",
      "amount": "250.00",
      "currencyCode": "USD",
      "transactionIdentifier": "123456",
      "transactionReferenceDetails": "1A2B3C4D5"
    }
  },
  "productService": {
    "merchantId": "9cc9d677-7be9-442c-beb7-198543b740fe",
    "serviceName": "Streaming Service12",
    "serviceRenewalDate": "2022-02-02",
    "purchaseLocation": "New York",
    "servicePhoneNumber": "+1234567890",
    "serviceNumber": "JdGMxLtDRBd81FmpjPeKWA8uQM997SDb"
  },
  "offerAllowed": true
}
```

#### Response {#response-18}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "Merchant Actions",
        "ReasonCode": "INTERNAL_SERVER_ERROR",
        "Description": "Something went wrong. Try again later",
        "Recoverable": false
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#successful-test-cases)

### ETC12: Multiple validation messages for single field {#etc12-multiple-validation-messages-for-single-field}

Here, a request is sent in which a single field results in multiple validation errors.

An HTTP status 400 is returned with the appropriate error message.

#### Request {#request-19}

```JSON
{
  "requestReference": {
    "originatorChannel": "SUBSCRIPTION_CONTROLS",
    "originatorId": "420f0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b35304255715f",
    "sourceId": "66666688ggg0845bd9b808abd7acc053b0b372ceb461edd584e9b9db02b324gf",
    "originatorDescription": "Test Issuer",
    "correlationId": "zebj2kvpeo",
    "locale": "en-US"
  },
  "actionId": "ba10a59a-c560-4b5a-9abc-9542e7741045",
  "actionType": "CANCEL",
  "cardholder": {
    "card": {
      "cardBrand": "MC",
      "firstSix": "123456",
      "lastFour": "3456",
      "cardExpirationDate": "927"
    },
    "fullName": {
      "firstName": "Jenny",
      "lastName": "Dane"
    },
    "birthDate": "1997-07-16",
    "postalCode": "12345",
    "contactEmail": "onetwothree@example.com",
    "alternativeEmail": "alternative@example.com",
    "merchantEmail": "merchant.email@example.com",
    "addresses": [
      {
        "addressType": "HOME",
        "streetAndNumber": "123 Main St",
        "aptSuite": "APT A",
        "city": "New York",
        "provState": "NY",
        "country": "USA",
        "postalCode": "12345"
      }
    ],
    "mostRecentCardTransaction": {
      "transactionDate": "2025-07-16",
      "amount": "250.00",
      "currencyCode": "USD",
      "transactionIdentifier": "123456",
      "transactionReferenceDetails": "1A2B3C4D5"
    }
  },
  "productService": {
    "merchantId": "9cc9d677-7be9-442c-beb7-198543b740fe",
    "serviceName": "Streaming Service12",
    "serviceRenewalDate": "2022-02-02",
    "purchaseLocation": "New York",
    "servicePhoneNumber": "+1234567890",
    "serviceNumber": "JdGMxLtDRBd81FmpjPeKWA8uQM997SDb"
  },
  "offerAllowed": true
}
```

#### Response {#response-19}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "Merchant Actions",
        "ReasonCode": "VALIDATION_FAILED",
        "Description": "Field requirements not met for addresses[0].country",
        "Recoverable": false,
        "Details": "Invalid value USA: country should be of minimum length and maximum length 2. Invalid value USA: country must be in ISO 3166-1 alpha-2 format.  "
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/testing/test-cases-subscription-controls/index.md#successful-test-cases)

## Next Steps {#next-steps}

* Now that you have an understanding of testing, head over to our [Code and Formats](https://developer.mastercard.com/ethoca-consumer-clarity-for-merchants/documentation/code-and-formats/index.md) section to learn about the details of all the error codes.
