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

This article provides test case data that shows the Smart Subscriptions responses you can expect to receive from some example requests sent to the Consumer Clarity and Smart Subscriptions APIs.

## Subscription Identification and Actions Test Cases {#subscription-identification-and-actions-test-cases}

These are the types of test cases provided in this article:

* [TC1: Validate a paymentId](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#tc1-validate-a-paymentid)

* **TC2: Identifying a subscription**

  * [TC2.1: Transaction is identified as a subscription](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#tc21-transaction-is-identified-as-a-subscription)
  * [TC2.2: Transaction is not identified as a subscription](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#tc22-transaction-is-not-identified-as-a-subscription)
* [TC3: Subscription transaction has no management actions](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#tc3-subscription-transaction-has-no-management-actions)

* **TC4: Actions initiated for subscription transactions**

  * [TC4.1: Automated action initiated](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#tc41-automated-action-initiated-returns-action-questions-to-user-displayed-in-issuers-dynamic-form)
  * [TC4.2: Self-serve action initiated](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#tc42-self-serve-action-initiated-returns-instructions-to-user-displayed-in-issuers-dynamic-form)
* **TC5: Actions submitted for subscription transactions**

  * [TC5.1a: Automated action submitted](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#tc51a-automated-action-submitted-provides-action-responses-and-returns-in-progress-status-to-confirm-submission)
  * [TC5.1b: Pull notification provides response](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#tc51b-pull-notification-provides-action-completed-response-to-confirm-automated-action-completion)
  * [TC5.2: Self-serve action submitted](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#tc52-self-serve-action-submitted-provides-user-response-for-action-completion)
* [TC6: Retrieve status and reason code for a submitted action](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#tc6-retrieve-status-and-status-reason-code-for-a-submitted-action)

* [TC7: Retrieve list of recent updated actions](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#tc7-retrieve-list-of-recent-updated-actions)

* [TC8: Retrieve subscriptions listings for paymentIds](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#tc8-retrieve-subscriptions-overview-listings-for-paymentids)

* [Error Test Cases](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#error-test-cases)

<br />

These test cases for the Consumer Clarity and Smart Subscriptions APIs return response data for transactions that might include subscriptions, or they indicate why subscription data isn't returned in the response.

### TC1: Validate a paymentId {#tc1-validate-a-paymentid}

In this scenario, the request is sent with a `paymentId` with an invalid value, such as invalid length or unsupported characters like non-printable characters. Subscription details aren't returned in the response since an invalid `paymentId` is not supported.

Non-printable characters include things like new line, line breaks, and tabs. See [NON PRINTABLE CHARACTERS](https://web.itu.edu.tr/sgunduz/courses/mikroisl/ascii.html) for more information.

#### Request {#request}

```JSON
{
  "paymentId":" ", 
  "locale":"en-US",
  "dataPolicyConsent":true,
  "searchCriteria":[
    {
      "merchantCriteria":{
        "cardAcceptorName":"StreamLine"
      },
      "transactionCriteria":{
        "transactionIdentifierType":"BANKNET_REF_NUM",
        "transactionIdentifierValue":"5bUqJKHa7xI",
        "acquirerReferenceNumber":"00000000000000000001234",
        "transactionDateTime":"2024-05-04",
        "cardFirstSix":"077679",
        "cardLastFour":"7984",
        "issuerAuthorizationCode":"QMgHqZ",
        "paymentType":"MC",
        "transactionAmount":{
          "value":"10.00",
          "currencyCode":"USD"
        }
      }
    }
  ]
} 
```

#### Expected response {#expected-response}

```JSON
{
  "searchResults": [
    {
      "recordId": "0.ee18d017.1723034197.31a7dc2c-01",
      "resultStatus": {
        "code": "OK",
        "message": "OK."
      },
      "merchantResult": {
        "merchantName": "StreamLine",
        "address": {
          "line1": "British Columbia",
          "city": "Vancouver",
          "postalCode": "V5L 4S1",
          "countryCode": "CAN",
          "countryName": "Canada",
          "countrySubdivisionCode": "BC"
        },
        "description": "Quality, luxury and style define the collection of decorative plumbing products. Added merchant for testing.",
        "websiteUrl": "www.streamline.com",
        "logos": [
          {
            "height": 200,
            "width": 200,
            "url": "https://sandbox.content.ethoca.com/b/industry/a1dba121-03a8-41d0-b513-90b72a7e01f4.png?size=200",
            "type": "INDUSTRY",
            "altTextTag": "Utilities Logo"
          },
          {
            "height": 400,
            "width": 400,
            "url": "https://sandbox.content.ethoca.com/b/industry/a1dba121-03a8-41d0-b513-90b72a7e01f4.png?size=400",
            "type": "INDUSTRY",
            "altTextTag": "Utilities Logo"
          }
        ],
        "merchantLocation": {
          "latitude": "49.25",
          "longitude": "-123.1",
          "type": "ADMINISTRATIVE_AREA"
        },
        "dataPolicy": {
          "cacheable": true,
          "cacheExpiry": "2024-08-08T12:36:37.927+0000"
        },
        "resultStatus": {
          "code": "MERCHANT_FOUND",
          "message": "Merchant results provided."
        }
      },
      "purchaseReceipt": {
        "resultStatus": {
          "code": "RECEIPT_NOT_AVAILABLE",
          "message": "Purchase Receipt not available for this merchant."
        },
        "url": "https://sandbox.api.ethocaweb.com/ethoca/receipt/1723034197/342a1667-6c65-409f-b502-f605a4c81d61/9Tl_UgYxGScEcrMrLlGEvQ/lgTOYHhemOWWLlSdIkXFaeaOAA_nsysF0m7ix9FArYJuDhsyQ74jgP9Jx0UlhxEOOeqSxZWcUY4Cvw9kjLdnhy8ZAeSacGiYj1wA3XFMu81gG2EH2Lq-INo-fn6Yl5VgiZ3IdzM8SNcgk_4EiCR1r7smrdW2Puz_H5xkwQhNISfWTMQBZdrIj3-YBegGSXwf1yo6EsxkqOTd0QtPf2F9AHs_l5L0HgF5_Fn1GtuyqdkvD9w8VdVFNXk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jMwMzQxOTcsImp0aSI6IjA1MmI4YzBhNWI4M2YxNDhlNDYyM2I1ZTUzMzFkNTliIiwiY2lkIjoiakRyUTlRdXdGeVczZGIzaFlpQ3VQWGJJTngxVUpUd2RpVkp4UHgzdTQwYjZiNjg3In0.0NZprYiMHP3pVXmj2F_GC9F6lFiSzj7gdH7QKMa5JiNNtXTrJBi7GFCePOMAtnJnD1qTLKtMJxx4klD1EwJK2SgbuoTKTm9EpeEmW-L6TBc13DJsS63Z8kJrI4Mf7scvxagMYwgX2pDpLQsCZ2Wx8loHRMJ7jQ9ix4cZkLfw0zuR24mir6S2W28jjwwHJScAlp1g15kIJhh1wG5dhUGug6rsPQpb6RpXtZ8vic64qvcN8x7BOScqNW5132WP3Iy0STLV5x4WbCch1Y0PUM986Qy3_9ER7qKg4-jM2_L76Ys1NYmo6CoKmDa-K5imOMg9Ovy6Wvg0Cqi-AQFjK6iXTA",
        "contentType": "MERCHANT_DETAILS",
        "expiresOn": "2024-08-07T12:51:37+00:00"
      }
    }
  ]
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC2.1: Transaction is identified as a subscription {#tc21-transaction-is-identified-as-a-subscription}

Here, the response includes information for a transaction identified as a subscription. The `serviceId` and `recurringPaymentType` fields in the response are populated, which indicate the transaction is a subscription. The `supportedActions` array is returned and populated when management actions are available.

#### Request {#request-1}

```JSON
{
  "paymentId": "d4096abb-75d1-4711-baed-90b0f8a0023f",
  "locale": "en-US",
  "dataPolicyConsent": true,
  "searchCriteria": [
    {
      "merchantCriteria": {
        "cardAcceptorName": "StreamLine"
      },
      "transactionCriteria": {
        "transactionIdentifierType": "BANKNET_REF_NUM",
        "transactionIdentifierValue": "5bUqJKHa7xI",
        "acquirerReferenceNumber": "00000000000000000001234",
        "transactionDateTime": "2024-05-04",
        "cardFirstSix": "077679",
        "cardLastFour": "7984",
        "issuerAuthorizationCode": "QMgHqZ",
        "paymentType": "MC",
        "transactionAmount": {
          "value": "7.99",
          "currencyCode": "USD"
        }
      }
    }
  ]
}
```

#### Expected response {#expected-response-1}

```JSON
{
  "searchResults": [
    {
      "recordId": "0.ee18d017.1723034829.323e732b-01",
      "resultStatus": {
        "code": "OK",
        "message": "OK."
      },
      "merchantResult": {
        "merchantName": "StreamLine",
        "address": {
          "line1": "British Columbia",
          "city": "Vancouver",
          "postalCode": "V5L 4S1",
          "countryCode": "CAN",
          "countryName": "Canada",
          "countrySubdivisionCode": "BC"
        },
        "description": "Quality, luxury and style define the collection of decorative plumbing products. Added merchant for testing.",
        "websiteUrl": "www.streamline.com",
        "logos": [
          {
            "height": 200,
            "width": 200,
            "url": "https://sandbox.content.ethoca.com/b/industry/a1dba121-03a8-41d0-b513-90b72a7e01f4.png?size=200",
            "type": "INDUSTRY",
            "altTextTag": "Utilities Logo"
          },
          {
            "height": 400,
            "width": 400,
            "url": "https://sandbox.content.ethoca.com/b/industry/a1dba121-03a8-41d0-b513-90b72a7e01f4.png?size=400",
            "type": "INDUSTRY",
            "altTextTag": "Utilities Logo"
          }
        ],
        "merchantLocation": {
          "latitude": "49.25",
          "longitude": "-123.1",
          "type": "ADMINISTRATIVE_AREA"
        },
        "dataPolicy": {
          "cacheable": true,
          "cacheExpiry": "2024-08-08T12:47:10.275+0000"
        },
        "resultStatus": {
          "code": "MERCHANT_FOUND",
          "message": "Merchant results provided."
        }
      },
      "purchaseReceipt": {
        "resultStatus": {
          "code": "RECEIPT_NOT_AVAILABLE",
          "message": "Purchase Receipt not available for this merchant."
        },
        "url": "https://sandbox.api.ethocaweb.com/ethoca/receipt/1723034830/342a1667-6c65-409f-b502-f605a4c81d61/QTCKpWfbQfn0beGJEzc4-g/-314-mc7aYsBU1Q5dzJjOfz2yMJJlQaEGIgF9Qxp95iKAwu-ZNvhquDVyv6wy6YVL3XUh9mZ9vf7suoyN3Ai-zsMABrh_4_1N_8tln4Uw2VWBY5sXfl3xA12ylBT6oVEqIitwVz6jUicU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ZW50X2NyZWRlbnRpYWxzIiwiZXhwIjoxNzIzMDM1NzMwLCJhdXRoVHlwZSI6Ik9BdXRoMiIsIm9uZV90aW1lIjoiZmFsc2UiLCJpYXQiOjE3MjMwMzQ4MzAsImp0aSI6ImQwZTliMDhhNWM1MjE0NjQwZjcyYzAyMmJhMmUyNTU5IiwiY2lkIjoiakRyUTlRdXdGeVczZGIzaFlpQ3VQWGJJTngxVUpUd2RpVkp4UHgzdTQwYjZiNjg3In0.d1831_v5Zwkkc74QhdqQ6LJb8wM3inQGqkYs6rV3rGScwyy4Ef0Vv5srUJw_k2txJiPKgwgxGqUGH4MSSPyw3eWj3fWueI__UrwCu0aro1YjGceZWSl_vqlAsYZ1Oj1DSmvaGtDjUsoEO0l-Vybj7Xmm5BDRZPKJ_CUdXjeiQViSlYpLSvMOUNFw5HsN10lPTJb1Hk104j2JY5S-xt9q3zSvg36sHvxxDsnQgDeeSYwjoYklczEoqnn9GEgn6LiDbBHYEu94-ZEOLHr9THckPiG8qUOULwXtECda4PH5Tge_kgZrK2I05ntmLv8SF4Sye84TDG9HXNZYAYxODFWHUQ",
        "contentType": "MERCHANT_DETAILS",
        "expiresOn": "2024-08-07T13:02:10+00:00"
      },
      "subscriptionControls": {
        "serviceId": "00000000-0001-4000-8000-000000000001",
        "recurringPaymentType": "SUBSCRIPTION",
        "frequency": "MONTHLY",
        "supportedActions": [
          {
            "action": "CANCEL"
          }
        ]
      }
    }
  ]
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC2.2: Transaction is not identified as a subscription {#tc22-transaction-is-not-identified-as-a-subscription}

For this test case, the response doesn't include subscription information for a transaction, so the `subscriptionControls` object isn't returned.

#### Request {#request-2}

```JSON
{
  "paymentId": "d4096abb-75d1-4711-baed-90b0f8a0023f",
  "locale": "en-US",
  "dataPolicyConsent": true,
  "searchCriteria": [
    {
      "merchantCriteria": {
        "cardAcceptorName": "Ethoca Chairs"
      },
      "transactionCriteria": {
        "transactionIdentifierType": "BANKNET_REF_NUM",
        "transactionIdentifierValue": "5bUqJKHa7xI",
        "acquirerReferenceNumber": "00000000000000000001234",
        "transactionDateTime": "2024-05-04",
        "cardFirstSix": "077679",
        "cardLastFour": "7984",
        "issuerAuthorizationCode": "QMgHqZ",
        "paymentType": "MC",
        "transactionAmount": {
          "value": "10.00",
          "currencyCode": "USD"
        }
      }
    }
  ]
}
```

#### Expected response {#expected-response-2}

```JSON
{
  "searchResults": [
    {
      "recordId": "0.ee18d017.1723034893.324ad395-01",
      "resultStatus": {
        "code": "OK",
        "message": "OK."
      },
      "merchantResult": {
        "merchantName": "Ethoca Chairs",
        "address": {
          "line1": "1243 East Riverside",
          "city": "Sunnyvale",
          "postalCode": "94089",
          "countryCode": "USA",
          "countryName": "United States",
          "countrySubdivisionCode": "CA"
        },
        "description": "Ethoca Chairs has been in the furniture business for 100 years creating thoughtfully designed chairs, crafted by hand. We sell our chairs online and through our Retail Partners in stores throughout the world.",
        "websiteUrl": "www.ethocachairs.com",
        "merchantCategory": {
          "code": "7641",
          "description": "FURNITURE-REUPHOLSTERY AND REPAIR  REFINISHING"
        },
        "logos": [
          {
            "height": 200,
            "width": 200,
            "url": "https://sandbox.content.ethoca.com/b/merchant/49d8f0d2-5eaa-4080-bb1d-7d4b03f247ad.png?size=200",
            "type": "MERCHANT",
            "altTextTag": "Ethoca Chairs Logo"
          },
          {
            "height": 400,
            "width": 400,
            "url": "https://sandbox.content.ethoca.com/b/merchant/49d8f0d2-5eaa-4080-bb1d-7d4b03f247ad.png?size=400",
            "type": "MERCHANT",
            "altTextTag": "Ethoca Chairs Logo"
          },
          {
            "height": 400,
            "width": 400,
            "url": "https://sandbox.content.ethoca.com/b/industry/8206a2be-b261-4140-8ab4-41a96463c746.png?size=400",
            "type": "INDUSTRY",
            "altTextTag": "Miscellaneous Logo"
          },
          {
            "height": 200,
            "width": 200,
            "url": "https://sandbox.content.ethoca.com/b/industry/8206a2be-b261-4140-8ab4-41a96463c746.png?size=200",
            "type": "INDUSTRY",
            "altTextTag": "Miscellaneous Logo"
          }
        ],
        "merchantLocation": {
          "latitude": "37.3836",
          "longitude": "-122.0256",
          "type": "ADMINISTRATIVE_AREA"
        },
        "dataPolicy": {
          "cacheable": true,
          "cacheExpiry": "2024-08-08T12:48:14.047+0000"
        },
        "resultStatus": {
          "code": "MERCHANT_FOUND",
          "message": "Merchant results provided."
        }
      },
      "purchaseReceipt": {
        "resultStatus": {
          "code": "RECEIPT_AVAILABLE",
          "message": "Purchase Receipt available."
        },
        "url": "https://sandbox.api.ethocaweb.com/ethoca/receipt/1723034894/342a1667-6c65-409f-b502-f605a4c81d61/OtMutLIPwp4eOU2gK4wmfw/FtqTokW4IOQZWRNacIQQWjiWp-TF8zp3xexWB24FNWiHerYFtOlK4_XBD0Czf0TVLBitW2D92tqRhHG_aHp6BOPg6HIW-JQ1xGWkrsqg7gSgbqCfqfLTdf7mvvKxe3FA5M5s928dIg_qIysPbg3UD78TYR9KKXGE3FvkPY4iqRTuEmxrGIzMIph2YJFsiz-syHQuFIqsice3Mg9rm8T3usPcsWKDAEnRWfPg0dzi9Rn6K6HGXfhx6RzgEjauYkV8PiWu6drxfwwA9ld8dyb1BqQGzHHuY0-SY149EYv5QD-HRVRuXJPxlZk20NnAxNSxohuaAkQzlvYjZtxZBXBFLmjvLkF6K-nXWVbvvVK_Wvw9mdiSewef4aXLhc_50dcsYsKQ-QRSWHl3TYos-CxB9jAGVHKTP6f3bky9RJaNFRcaTsrLVyvXucqUTMoi6xXaALYS-JCeBsUN-r4iaSnFTW8jRB0gnlwFUH2pCkS3ULao_IYxVl3Q_RKzavL03gthsQi8KwJLlkiUjzSSWZJIZ9Oh9efzTCPxvtc69ggpHmD1yfUpChEeIdtN4gwwFTdYOwSqPkQlBrHNAZfJKsl0t_SCl3dENSljgQoGK6HVN6PjXik5PXZADIgznQhukeN-QtRhxV0C8qrNUg0iiaVB_4zSiaQFCEJKUk1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riV-66yxMXWeaVCiQaSSOBYv8QCuRA9cSZXfh6PXtVcnrtxf06dWdQrDNPjbgQb4iyldfz1Rb1p0oM2OwM4RXLTOgNFMcINiRJ8xxHKVerwg-RM2S5ytKsWinpMCxXt8qhkZGJGujUX7dKyu7pIXHFq4tqF1YVKAj2nt7kRq5muUi8OZXVlnnf5VUfbsfFLA2d-hnYAwD8OUe3wKqUESICie2SuOFMZlSMrF_O7ipXajt0XxJrNU5EPNFnKf0VZJX_DKrb6V0NJ-d7tvg3BZa49-AW6Xxt16KhY3_Wvt2URWJCKQyNhTzQgdfBxKg",
        "contentType": "RECEIPT",
        "expiresOn": "2024-08-07T13:03:14+00:00"
      },
      "carbonFootprint": {
        "carbonEmissionInGrams": 1701.16,
        "carbonEmissionInOunces": 60.01,
        "category": {
          "mainCategory": "Furniture & Decoration",
          "subCategory": " Furniture & Home Furnishings",
          "sector": "Equipment",
          "sectorCode": "702"
        }
      }
    }
  ]
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC3: Subscription transaction has no management actions {#tc3-subscription-transaction-has-no-management-actions}

For this test case, the response for a transaction identified as a subscription doesn't include any values in the `supportedActions` array. The values returned take into account any ongoing actions submitted by a user.

For example, if a merchant only supports one action such as **Cancel** , and the user has already submitted a **Cancel** action that is currently **In Progress** , the `supportedActions` array doesn't return any values. This prevents a user from submitting a second **Cancel** action while the first is still **In Progress**.

#### Request {#request-3}

```JSON
{
  "paymentId": "d4096abb-75d1-4711-baed-90b0f8a0023f",
  "locale": "en-US",
  "dataPolicyConsent": true,
  "searchCriteria": [
    {
      "merchantCriteria": {
        "cardAcceptorName": "StreamLine"
      },
      "transactionCriteria": {
        "transactionIdentifierType": "BANKNET_REF_NUM",
        "transactionIdentifierValue": "5bUqJKHa7xI",
        "acquirerReferenceNumber": "00000000000000000001234",
        "transactionDateTime": "2024-05-04",
        "cardFirstSix": "077679",
        "cardLastFour": "7984",
        "issuerAuthorizationCode": "QMgHqZ",
        "paymentType": "MC",
        "transactionAmount": {
          "value": "10.00",
          "currencyCode": "USD"
        }
      }
    }
  ]
}
```

#### Expected response {#expected-response-3}

```JSON
{
  "searchResults": [
    {
      "recordId": "0.ee18d017.1723034983.325db8c6-01",
      "resultStatus": {
        "code": "OK",
        "message": "OK."
      },
      "merchantResult": {
        "merchantName": "StreamLine",
        "address": {
          "line1": "British Columbia",
          "city": "Vancouver",
          "postalCode": "V5L 4S1",
          "countryCode": "CAN",
          "countryName": "Canada",
          "countrySubdivisionCode": "BC"
        },
        "description": "Quality, luxury and style define the collection of decorative plumbing products. Added merchant for testing.",
        "websiteUrl": "www.streamline.com",
        "logos": [
          {
            "height": 200,
            "width": 200,
            "url": "https://sandbox.content.ethoca.com/b/industry/a1dba121-03a8-41d0-b513-90b72a7e01f4.png?size=200",
            "type": "INDUSTRY",
            "altTextTag": "Utilities Logo"
          },
          {
            "height": 400,
            "width": 400,
            "url": "https://sandbox.content.ethoca.com/b/industry/a1dba121-03a8-41d0-b513-90b72a7e01f4.png?size=400",
            "type": "INDUSTRY",
            "altTextTag": "Utilities Logo"
          }
        ],
        "merchantLocation": {
          "latitude": "49.25",
          "longitude": "-123.1",
          "type": "ADMINISTRATIVE_AREA"
        },
        "dataPolicy": {
          "cacheable": true,
          "cacheExpiry": "2024-08-08T12:49:43.914+0000"
        },
        "resultStatus": {
          "code": "MERCHANT_FOUND",
          "message": "Merchant results provided."
        }
      },
      "purchaseReceipt": {
        "resultStatus": {
          "code": "RECEIPT_NOT_AVAILABLE",
          "message": "Purchase Receipt not available for this merchant."
        },
        "url": "https://sandbox.api.ethocaweb.com/ethoca/receipt/1723034983/342a1667-6c65-409f-b502-f605a4c81d61/nopXoVGiD9-peEuHWRFMZw/pQafwfmy9kT9BP8JMap2Ap_2Dn-sPizPAxHyHaqYXF30jD3cD88y8E4DPYHFVBGbH5xdibr77Ez-Ce_4untLAYutO2Qnj6kA8bj7XVrAqgZ-Yd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eXBlIjoiY2xpZW50X2NyZWRlbnRpYWxzIiwiZXhwIjoxNzIzMDM1ODgzLCJhdXRoVHlwZSI6Ik9BdXRoMiIsIm9uZV90aW1lIjoiZmFsc2UiLCJpYXQiOjE3MjMwMzQ5ODMsImp0aSI6ImIwZjk3MmI0OWY5YWM4NTlmMjIwNzM2MDE1ODFjNjgzIiwiY2lkIjoiakRyUTlRdXdGeVczZGIzaFlpQ3VQWGJJTngxVUpUd2RpVkp4UHgzdTQwYjZiNjg3In0.gs9YbcR4Yk4V9DlArMM_aI94t8pSoAGAto70idkAKdtwlyCgNxSOT-XSO27i-7rvuQBfdTSxfOv64Ke7SEoK1Qq1uoFApFAMWhKGJsNBtpW63V8VfexzQUlmp-5yDXKwIrgU7UMMB0FEukTQqcJFiRPedNzHMOD6oA78SCatFUaryuWyd7JISnjUPigbz-fCqwLOG4XkA1fnecDhOY_Gr6V8NXSgFsBe9A7PvfgNLLoToctZWa75MrFo7GZUEluSQqoEBR8LB2Zs_4PhvOd8kQDd2Gk9yrXBwo-lVC49Ww0ZEiWfDr-kXCT4rsD3RkYn-8e4M9lcGni4xZldUH0P_A",
        "contentType": "MERCHANT_DETAILS",
        "expiresOn": "2024-08-07T13:04:43+00:00"
      },
      "subscriptionControls": {
        "serviceId": "00000000-0001-4000-8000-000000000001",
        "recurringPaymentType": "SUBSCRIPTION",
        "frequency": "MONTHLY",
        "actionState": {
          "actionId": "e9480f8c-1650-4da9-9f2e-162464fb471d",
          "action": "CANCEL",
          "method": "AUTOMATED",
          "status": "IN_PROGRESS",
          "estimatedProcessingDays": "2-5",
          "createdDate": "2024-08-07T12:49:25.055197613Z",
          "updatedDate": "2024-08-07T12:49:35.677732678Z"
        }
      }
    }
  ]
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC4.1: Automated action initiated returns action questions to user, displayed in issuer's dynamic form {#tc41-automated-action-initiated-returns-action-questions-to-user-displayed-in-issuers-dynamic-form}

Here, a user initiates an action, such as **Cancel** , and the response contains a list of instructions to be displayed to the user so they can fulfill the action on their own. In most instances, the response contains a URL deep link as a callout to the merchant's website. An `actionId` is generated to track the action's lifecycle.

#### Request {#request-4}

```JSON
{
  "locale": "en-US",
  "serviceId": "00000000-0010-4000-8000-000000000001",
  "action": "CANCEL",
  "paymentId": "d4096abb-75d1-4711-baed-90b0f8a0023f"
}
```

#### Expected response {#expected-response-4}

```JSON
{
  "actionId": "58cf961f-f60a-46ff-8532-6a1a9f9df52a",
  "actionState": {
    "method": "AUTOMATED",
    "status": "INITIATED",
    "action": "CANCEL"
  },
  "actionSurvey": {
    "elements": [
      {
        "surveyElementType": "COMPOSITE",
        "compositeType": "FULLNAME",
        "elements": [
          {
            "surveyElementType": "INPUT",
            "inputFormatType": "FREEFORM",
            "id": "que_fullname-txt_1001",
            "prompt": "First name"
          },
          {
            "surveyElementType": "INPUT",
            "inputFormatType": "FREEFORM",
            "id": "que_fullname-txt_1002",
            "prompt": "Last name"
          }
        ],
        "prompt": "Full name"
      },
      {
        "surveyElementType": "INPUT",
        "inputFormatType": "EMAIL",
        "id": "que_merchantemail-txt_1008",
        "prompt": "Your Alternative Email account email"
      },
      {
        "surveyElementType": "INPUT",
        "inputFormatType": "EMAIL",
        "id": "que_merchantemail-txt_1049",
        "prompt": "Alternative email"
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC4.2: Self-serve action initiated returns instructions to user, displayed in issuer's dynamic form {#tc42-self-serve-action-initiated-returns-instructions-to-user-displayed-in-issuers-dynamic-form}

In this scenario, a user initiates an action, such as **Cancel** , and the response contains a list of instructions to be displayed to the user so they can fulfill the action on their own. In most instances, the response contains a URL deep link as a callout to the merchant's website. An `actionId` is generated to track the action's lifecycle.

#### Request {#request-5}

```JSON
{
  "locale": "en-US",
  "serviceId": "00000000-0002-4000-8000-000000000001",
  "action": "CANCEL",
  "paymentId": "d4096abb-75d1-4711-baed-90b0f8a0023f"
}
```

#### Expected response {#expected-response-5}

```JSON
{
  "actionId": "3feedebc-4762-4574-8198-05bf2ef88010",
  "actionState": {
    "method": "GUIDED",
    "status": "INITIATED",
    "action": "CANCEL"
  },
  "actionSurvey": {
    "elements": [
      {
        "surveyElementType": "COMPOSITE",
        "compositeType": "MIXED",
        "elements": [
          {
            "surveyElementType": "READONLY",
            "prompt": "Select Go to MovieMate and sign in to your MovieMate account."
          },
          {
            "surveyElementType": "READONLY",
            "prompt": "Choose the subscription you want to cancel and confirm your cancellation."
          }
        ],
        "prompt": "Cancel service"
      },
      {
        "surveyElementType": "CALLOUT",
        "calloutType": "URL",
        "calloutValue": "https://pre-prod-end-user.minna.io/api/link-tracking/mg/act_3feedebc-4762-4574-8198-05bf2ef88010",
        "prompt": "Go to MovieMate"
      },
      {
        "surveyElementType": "OPTIONS",
        "multiselect": false,
        "options": [
          {
            "code": "N",
            "value": "No"
          },
          {
            "code": "Y",
            "value": "Yes"
          }
        ],
        "id": "que_guidecompleted",
        "prompt": "Did you update your subscription?"
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC5.1a: Automated action submitted provides action responses and returns In Progress status to confirm submission {#tc51a-automated-action-submitted-provides-action-responses-and-returns-in-progress-status-to-confirm-submission}

For this test case, the user provides input for the required questions and submits the form. The response includes a `status` with the value **In Progress** if submitted without any issues.

#### Request {#request-6}

```JSON
{
  "surveyElementAnswer": {
    "elementAnswers": [
      {
        "surveyElementId": "que_fullname-txt_1001",
        "answer": "John"
      },
      {
        "surveyElementId": "que_fullname-txt_1002",
        "answer": "Doe"
      },
      {
        "surveyElementId": "que_merchantemail-txt_1008",
        "answer": "john.doe@gmail.com"
      },
      {
        "surveyElementId": "que_merchantemail-txt_1049",
        "answer": "jane.doe@gmail.com"
      }
    ]
  }
}
```

#### Expected response {#expected-response-6}

```JSON
{
  "actionState": {
    "status": "IN_PROGRESS",
    "estimatedProcessingDays": "2-5"
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC5.1b: Pull Notification provides action completed response to confirm automated action completion {#tc51b-pull-notification-provides-action-completed-response-to-confirm-automated-action-completion}

In this test case, the user retrieves the status for all the submitted actions from a specified time period. The response includes a list of all actions matching the time period along with the status for each actions, such as **Successful** , **Unsuccessful** , and **InProgress**.

#### Request {#request-7}

GET request sent to the `/../consumer-clarity/subscriptions/actions?{params}` endpoint, including the required query parameters `updated_from`, `limit,` and `offset`.

#### Expected response {#expected-response-7}

```JSON
{
  "count": 2,
  "limit": 500,
  "offset": 0,
  "actionStates": [
    {
      "paymentId": "test-skyconnect-e2e",
      "actionId": "da88480e-0d8e-4171-ba93-2f393fe9e3c8",
      "serviceId": "00000000-0055-4005-8000-000000000001",
      "serviceName": "BruttoNimbus",
      "action": "CANCEL",
      "method": "AUTOMATED",
      "status": "UNSUCCESSFUL",
      "createdDate": "2025-12-12T10:42:38.10305Z",
      "updatedDate": "2025-12-12T10:42:52.755599Z"
    },
    {
      "paymentId": "d4096abb-75d1-4711-baed-90b0f8a0023f",
      "actionId": "58cf961f-f60a-46ff-8532-6a1a9f9df52a",
      "serviceId": "00000000-0010-4000-8000-000000000001",
      "serviceName": "Alternative Email",
      "action": "CANCEL",
      "method": "AUTOMATED",
      "status": "SUCCESSFUL",
      "statusReasonCode": "PROCESSED",
      "createdDate": "2025-12-12T12:14:11.62232Z",
      "updatedDate": "2025-12-12T12:18:29.725595Z"
    }
  ]
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC5.2: Self-serve action submitted provides user response for action completion {#tc52-self-serve-action-submitted-provides-user-response-for-action-completion}

Here, the user provides input for the optional question to indicate whether they completed the action based on the instructions provided. The response includes a `status` with the value **Successful** if submitted without any issues.

#### Request {#request-8}

```JSON
{
  "surveyAnswers": {
    "elements": [
      {
        "surveyElementId": "que_guidecompleted",
        "answer": "Yes"
      }
    ]
  }
}
```

#### Expected response {#expected-response-8}

```JSON
{
  "actionState": {
    "status": "SUCCESSFUL"
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC6: Retrieve status and status reason code for a submitted action {#tc6-retrieve-status-and-status-reason-code-for-a-submitted-action}

In this scenario, a user has previously submitted an action and is proactively visiting the transaction detail page to view the action's status. For an action that isn't yet resolved, the response includes a status of **In Progress** and no value for `statusReasonCode`.

#### Request {#request-9}

```JSON
{
  "paymentId": "d4096abb-75d1-4711-baed-90b0f8a0023f",
  "locale": "en-US",
  "dataPolicyConsent": true,
  "searchCriteria": [
    {
      "merchantCriteria": {
        "cardAcceptorName": "StreamLine"
      },
      "transactionCriteria": {
        "transactionIdentifierType": "BANKNET_REF_NUM",
        "transactionIdentifierValue": "5bUqJKHa7xI",
        "acquirerReferenceNumber": "00000000000000000001234",
        "transactionDateTime": "2024-05-04",
        "cardFirstSix": "077679",
        "cardLastFour": "7984",
        "issuerAuthorizationCode": "QMgHqZ",
        "paymentType": "MC",
        "transactionAmount": {
          "value": "10.00",
          "currencyCode": "USD"
        }
      }
    }
  ]
}
```

#### Expected response {#expected-response-9}

```JSON
{
  "searchResults": [
    {
      "recordId": "0.eb18d017.1723035213.2ee6db3c-01",
      "resultStatus": {
        "code": "OK",
        "message": "OK."
      },
      "merchantResult": {
        "merchantName": "StreamLine",
        "address": {
          "line1": "British Columbia",
          "city": "Vancouver",
          "postalCode": "V5L 4S1",
          "countryCode": "CAN",
          "countryName": "Canada",
          "countrySubdivisionCode": "BC"
        },
        "description": "Quality, luxury and style define the collection of decorative plumbing products. Added merchant for testing.",
        "websiteUrl": "www.streamline.com",
        "logos": [
          {
            "height": 400,
            "width": 400,
            "url": "https://sandbox.content.ethoca.com/b/industry/a1dba121-03a8-41d0-b513-90b72a7e01f4.png?size=400",
            "type": "INDUSTRY",
            "altTextTag": "Utilities Logo"
          },
          {
            "height": 200,
            "width": 200,
            "url": "https://sandbox.content.ethoca.com/b/industry/a1dba121-03a8-41d0-b513-90b72a7e01f4.png?size=200",
            "type": "INDUSTRY",
            "altTextTag": "Utilities Logo"
          }
        ],
        "merchantLocation": {
          "latitude": "49.25",
          "longitude": "-123.1",
          "type": "ADMINISTRATIVE_AREA"
        },
        "dataPolicy": {
          "cacheable": true,
          "cacheExpiry": "2024-08-08T12:53:33.438+0000"
        },
        "resultStatus": {
          "code": "MERCHANT_FOUND",
          "message": "Merchant results provided."
        }
      },
      "purchaseReceipt": {
        "resultStatus": {
          "code": "RECEIPT_NOT_AVAILABLE",
          "message": "Purchase Receipt not available for this merchant."
        },
        "url": "https://sandbox.api.ethocaweb.com/ethoca/receipt/1723035213/342a1667-6c65-409f-b502-f605a4c81d61/c2HosjxO2jVpQeQVhcaLvw/S0tPOmu4xT164h8ltsc4Bq2gaRLAdIZoyec8GfA-neHySNF2CyYxkiszRtc5aqoN2bkeSaF8ZGsFQaTEp3EM6X79tjGWvJgKHKRIiX_BEVNY8BJzC7Tc1ITWWORrYaVwsUaJxDwPjq8DMPfVQBLBPWe9F_DrSagzpRwgOkfCQly3Rd0cvcx8oEatYxMahi9s_DEgbmDvs-AK2CG4oisBTVH79-0nnE-TIZeTHcTZ2uuPEZjsMrD9P7a5rBK_GFE2lWPaLqT9L5nVdm4QqlwM6CgpPDbHfxjA-FA_ZCuEj0l8jbCAaTFCjUUhsGtza_f45QO7piQ2DsK40zNOJgny_0E3CZVsjebQAz9A0qD2IpVDsv7GAHfzR7Pb4H7hofSNdD0iTOa7oaRoWxWeLT9Y68F7JQPprx4yL8tsEsiIqn1qgUL4cbrm5lWfJq0KrIodWqKUHrLgTyiYWHttNjmUyzFRdcd7i4GwM4pZtpZ9QSvxj2mGyrAs-gnR89x_6N4mLCIWqiH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y156zDSba_QQvRpN8fSuyXdOffe-kca7DyLgoozu0UXFZbXODK56hZ5iBZuaf0POVyGmQZHa3dRmFsFw1miimRZMZy_vKw0CeB5zwo6b09zuIN867CH0SBbE2_r8XkHTO_19mLsBM0cMmbeXfAmCzkGjVu17yOkNQnrW380C-PcBvsgiBPa7BAJQO6rIHqQi5dlG-ey3lI7o0Cw",
        "contentType": "MERCHANT_DETAILS",
        "expiresOn": "2024-08-07T13:08:33+00:00"
      },
      "subscriptionControls": {
        "serviceId": "00000000-0001-4000-8000-000000000001",
        "recurringPaymentType": "SUBSCRIPTION",
        "frequency": "MONTHLY",
        "actionState": {
          "actionId": "e9480f8c-1650-4da9-9f2e-162464fb471d",
          "action": "CANCEL",
          "method": "AUTOMATED",
          "status": "IN_PROGRESS",
          "estimatedProcessingDays": "2-5",
          "createdDate": "2024-08-07T12:49:25.055197613Z",
          "updatedDate": "2024-08-07T12:49:35.677732678Z"
        }
      }
    }
  ]
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC7: Retrieve list of recent updated actions {#tc7-retrieve-list-of-recent-updated-actions}

In this test case, a GET request is sent with the valid field values `updated_from`, `limit,` and `offset`. A list of recently updated actions is returned with contextual fields. The total count of records, offset, and limit fields are returned as well.

#### Request {#request-10}

GET request sent to the `/../consumer-clarity/subscriptions/actions?{params}` endpoint, including the required query parameters `updated_from`, `limit,` and `offset`.

#### Expected response {#expected-response-10}

```JSON
{
  "count": 4,
  "limit": 500,
  "offset": 0,
  "actionStates": [
    {
      "paymentId": "a31e3524-b247-42bf-90ca-069fc3e65efb",
      "actionId": "e609755e-351a-45e1-9d04-3f588b43a635",
      "serviceId": "00000000-0003-4000-8000-000000000002",
      "serviceName": "Streaming Service",
      "action": "CHANGE_PLAN",
      "method": "AUTOMATED",
      "status": "SUCCESSFUL",
      "createdDate": "2024-08-29T06:32:49.282778074Z",
      "updatedDate": "2024-08-29T06:32:49.689257554Z"
    },
    {
      "paymentId": "efdcc5c8-32f2-410c-b25f-719946492d69",
      "actionId": "e46b566d-ecb3-4042-ae36-81b6c612cfd7",
      "serviceId": "00000000-0007-4000-8000-000000000001",
      "serviceName": "Streaming Service",
      "action": "CANCEL",
      "method": "AUTOMATED",
      "status": "SUCCESSFUL",
      "createdDate": "2024-08-29T06:32:50.155583732Z",
      "updatedDate": "2024-08-29T06:33:50.885991457Z"
    },
    {
      "paymentId": "adf56c7b-1620-4a75-8813-d12e8526a198",
      "actionId": "7466cc93-15b3-4b33-8b31-0e3841ac5149",
      "serviceId": "00000000-0007-4000-8000-000000000001",
      "serviceName": "Streaming Service",
      "action": "CANCEL",
      "method": "AUTOMATED",
      "status": "EXPIRED",
      "statusReasonCode": "MERCHANT_NOT_RESPONDING",
      "createdDate": "2024-08-29T06:32:45.155583732Z",
      "updatedDate": "2024-08-29T06:33:03.785991457Z"
    },
    {
      "paymentId": "asf57c8b-1630-4b75-8913-c12e8526a198",
      "actionId": "f12a4ddf-fa39-45e6-9b83-839809c5440f",
      "serviceId": "00000000-0007-4000-8000-000000000001",
      "serviceName": "Streaming Service",
      "action": "CANCEL",
      "method": "AUTOMATED",
      "status": "SUCCESSFUL",
      "statusReasonCode": "SUCCESSFULLY_PROCESSED",
      "createdDate": "2024-08-29T19:59:18.44214Z",
      "updatedDate": "2024-08-29T19:59:30.509879Z",
      "effectiveDate": "2024-09-30T14:45:785991457Z"
    }
  ]
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC8: Retrieve subscriptions overview (listings) for paymentIds {#tc8-retrieve-subscriptions-overview-listings-for-paymentids}

Here, a POST request is sent with a valid request body containing a list of `paymentIds` and a `consumerId`. The response includes a list of subscriptions associated with the provided payment IDs, along with the most recent action taken on each subscription and spend summaries for the last three months.

#### Request {#request-11}

```JSON
{
  "paymentIds": [
    "7590153551759461"
  ],
  "consumerId": "7a5805e3-5271-4004-8cf2-df58aeef5616"
}
```

#### Expected response {#expected-response-11}

```JSON
{
  "consumerId": "7a5805e3-5271-4004-8cf2-df58aeef5616",
  "subscriptions": [
    {
      "subscriptionId": "019778e2-a1ef-7342-8151-3d6c72b73310",
      "paymentId": "7590153551759461",
      "recurringPaymentType": "SUBSCRIPTION",
      "merchantName": "GameHub",
      "serviceId": "00000000-0003-4000-8000-000000000001",
      "serviceName": "GamePass",
      "amount": {
        "value": "10.00",
        "currencyCode": "USD"
      },
      "nextPaymentDate": "2025-06-21",
      "frequency": "MONTHLY",
      "supportedActions": [
        "CANCEL"
      ],
      "previousTransactions": [
        {
          "transactionAmount": {
            "value": "10.00",
            "currencyCode": "USD"
          },
          "transactionDate": "2025-05-21"
        },
        {
          "transactionAmount": {
            "value": "10.00",
            "currencyCode": "USD"
          },
          "transactionDate": "2025-04-21"
        },
        {
          "transactionAmount": {
            "value": "10.00",
            "currencyCode": "USD"
          },
          "transactionDate": "2025-03-21"
        },
        {
          "transactionAmount": {
            "value": "10.00",
            "currencyCode": "USD"
          },
          "transactionDate": "2025-02-21"
        },
        {
          "transactionAmount": {
            "value": "10.00",
            "currencyCode": "USD"
          },
          "transactionDate": "2025-01-21"
        }
      ],
      "actionState": {
        "actionId": "69ca8bd2-a904-45ec-bed4-d6ec9a65a89c",
        "method": "GUIDED",
        "status": "UNSUCCESSFUL",
        "createdDate": "2025-06-24T08:45:17.127125Z",
        "updatedDate": "2025-06-24T08:45:17.576765Z",
        "action": "CANCEL"
      }
    }
  ],
  "spendSummaries": [
    {
      "paymentId": "7590153551759461",
      "recurringPaymentType": "SUBSCRIPTION",
      "month": "May",
      "totalSpend": "10.00",
      "subscriptionIds": [
        "019778e2-a1ef-7342-8151-3d6c72b73310"
      ]
    },
    {
      "paymentId": "7590153551759461",
      "recurringPaymentType": "SUBSCRIPTION",
      "month": "April",
      "totalSpend": "10.00",
      "subscriptionIds": [
        "019778e2-a1ef-7342-8151-3d6c72b73310"
      ]
    },
    {
      "paymentId": "7590153551759461",
      "recurringPaymentType": "SUBSCRIPTION",
      "month": "March",
      "totalSpend": "10.00",
      "subscriptionIds": [
        "019778e2-a1ef-7342-8151-3d6c72b73310"
      ]
    }
  ]
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

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

### TC: Issuer's consumer key isn't onboarded with Smart Subscriptions feature {#tc-issuers-consumer-key-isnt-onboarded-with-smart-subscriptions-feature}

Here, your consumer key hasn't been through the onboarding process and doesn't have the Smart Subscriptions feature enabled. The response returns and error message indicating that "Issuer's `clientId` is not on boarded."

#### Request {#request-12}

```JSON
{
  "locale": "en-US",
  "action": "CANCEL",
  "paymentId": "d4096abb-75d1-4711-baed-90b0f8a0024f",
  "serviceId": "00000000-0001-4000-8000-000000000001"
}
```

#### Expected response {#expected-response-12}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "Issuer's clientId is not on boarded."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Action initiation request is missing locale field {#tc-action-initiation-request-is-missing-locale-field}

In this scenario, a `locale` field with a valid value is required as part of the request but is missing.

#### Request {#request-13}

```JSON
{
  "action": "CANCEL",
  "paymentId": "d4096abb-75d1-4711-baed-90b0f8a0024f",
  "serviceId": "00000000-0001-4000-8000-000000000001"
}
```

#### Expected response {#expected-response-13}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "locale: must not be null."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Action initiation request includes invalid value for locale field {#tc-action-initiation-request-includes-invalid-value-for-locale-field}

For this test case, a `locale` field includes an invalid value and an error is returned. You can review the API specification for accepted values.

#### Request {#request-14}

```JSON
{
  "locale": "en-CA",
  "action": "CANCEL",
  "paymentId": "d4096abb-75d1-4711-baed-90b0f8a0024f",
  "serviceId": "00000000-0001-4000-8000-000000000001"
}
```

#### Expected response {#expected-response-14}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "locale: Invalid value. Must be one of en-US | en-GB | es-US."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Action initiation request includes empty locale field {#tc-action-initiation-request-includes-empty-locale-field}

Here, a `locale` field with a valid value is required as part of the request but is empty.

#### Request {#request-15}

```JSON
{
  "locale": "",
  "action": "CANCEL",
  "paymentId": "d4096abb-75d1-4711-baed-90b0f8a0024f",
  "serviceId": "00000000-0001-4000-8000-000000000001"
}
```

#### Expected response {#expected-response-15}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "locale: must not be empty."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Action initiation request is missing action field {#tc-action-initiation-request-is-missing-action-field}

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

#### Request {#request-16}

```JSON
{
  "locale": "en-US",
  "paymentId": "d4096abb-75d1-4711-baed-90b0f8a0024f",
  "serviceId": "00000000-0001-4000-8000-000000000001"
}
```

#### Expected response {#expected-response-16}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "action: must not be null."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Action initiation request includes invalid value for action field {#tc-action-initiation-request-includes-invalid-value-for-action-field}

In this scenario, an `action` field includes an invalid value and an error is returned. You can review the API specification for accepted values.

#### Request {#request-17}

```JSON
{
  "locale": "en-US",
  "action": "CANCE",
  "paymentId": "d4096abb-75d1-4711-baed-90b0f8a0024f",
  "serviceId": "00000000-0001-4000-8000-000000000001"
}
```

#### Expected response {#expected-response-17}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "action: Invalid value. Must be one of CANCEL."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Action initiation request includes empty action field {#tc-action-initiation-request-includes-empty-action-field}

Here, an `action` field with a valid value is required as part of the request but is empty.

#### Request {#request-18}

```JSON
{
  "locale": "en-US",
  "action": "",
  "paymentId": "d4096abb-75d1-4711-baed-90b0f8a0024f",
  "serviceId": "00000000-0001-4000-8000-000000000001"
}
```

#### Expected response {#expected-response-18}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "action: length must be between 1 and 30."
      },
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "action: must not be empty."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Action initiation request is missing paymentId field {#tc-action-initiation-request-is-missing-paymentid-field}

In this scenario, a `paymentId` field with a valid value is required as part of the request but is missing.

#### Request {#request-19}

```JSON
{
  "locale": "en-US",
  "action": "CANCEL",
  "serviceId": "00000000-0001-4000-8000-000000000001"
}
```

#### Expected response {#expected-response-19}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "paymentId: must not be null."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Action initiation request includes empty paymentId field {#tc-action-initiation-request-includes-empty-paymentid-field}

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

#### Request {#request-20}

```JSON
{
  "locale": "en-US",
  "action": "CANCEL",
  "paymentId": "",
  "serviceId": "00000000-0001-4000-8000-000000000001"
}
```

#### Expected response {#expected-response-20}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "paymentId: length must be between 1 and 128."
      },
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "paymentId: must not contain any non-printable characters (eg: C0 controls in Basic Latin, C1 controls in Latin-1 Supplement in Unicode blocks)."
      },
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "paymentId: must not be empty."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Action initiation request is missing serviceId field {#tc-action-initiation-request-is-missing-serviceid-field}

In this scenario, a `serviceId` field with a valid value is required as part of the request but is missing.

#### Request {#request-21}

```JSON
{
  "locale": "en-US",
  "action": "CANCEL",
  "paymentId": "d4096abb-75d1-4711-baed-90b0f8a0024f"
}
```

#### Expected response {#expected-response-21}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "serviceId: must not be null."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Action initiation request includes empty serviceId field {#tc-action-initiation-request-includes-empty-serviceid-field}

Here, a `serviceId` field with a valid value is required as part of the request but is empty.

#### Request {#request-22}

```JSON
{
  "locale": "en-US",
  "action": "CANCEL",
  "paymentId": "d4096abb-75d1-4711-baed-90b0f8a0024f",
  "serviceId": ""
}
```

#### Expected response {#expected-response-22}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "serviceId: must not contain any non-printable characters (eg: C0 controls in Basic Latin, C1 controls in Latin-1 Supplement in Unicode blocks)."
      },
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "serviceId: must not be empty."
      },
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "serviceId: length must be between 1 and 50."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Action initiation request includes invalid value for serviceId field {#tc-action-initiation-request-includes-invalid-value-for-serviceid-field}

For this test case, a `serviceId` field includes an invalid value and an error is returned. You can review the API specification for accepted values.

#### Request {#request-23}

```JSON
{
  "locale": "en-US",
  "action": "CANCEL",
  "paymentId": "d4096abb-75d1-4711-baed-90b0f8a0024f",
  "serviceId": "f4096abb-75d1-4711-baed-90b0f8a0013f"
}
```

#### Expected response {#expected-response-23}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid request",
        "Recoverable": false,
        "Details": "Unfortunately, the call is no longer possible. Please abort this Action and start over again. Specifically, the Action requested was no longer possible."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Action submission request includes invalid actionId path parameter {#tc-action-submission-request-includes-invalid-actionid-path-parameter}

The submission PUT request uses the path /consumer-clarity/subscriptions/actions
/{action_ID}. For this test case, you'll use the `action_ID` *15aaa946-b564-422e-ada9-1f2cb9f09209* in the path for the request.

The response returns an error for an invalid `actionId` path parameter.

#### Request {#request-24}

```JSON
{
  "surveyElementAnswer": {
    "elementAnswers": [
      {
        "surveyElementId": "que_fullname-txt_1001",
        "answer": "John"
      }
    ]
  }
}
```

#### Expected response {#expected-response-24}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid request action",
        "Recoverable": false,
        "Details": "Requested ActionId not found. Please provide valid actionId."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Action submission request doesn't include answer fields for action questions {#tc-action-submission-request-doesnt-include-answer-fields-for-action-questions}

The action questions that are returned in an Action Initiation response require corresponding answer values to be populated in an Action Submission request. But in this test case, those answer values are missing.

#### Request {#request-25}

```JSON
{
  "surveyElementAnswer": {
    "elementAnswers": [
      {
        "surveyElementId": "que_fullname-txt_1001"
      }
    ]
  }
}
```

#### Expected response {#expected-response-25}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "answer: must not be null."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Action submission request includes empty answer fields for action questions {#tc-action-submission-request-includes-empty-answer-fields-for-action-questions}

In this scenario, the required corresponding answer values in the Action Submission request are empty.

#### Request {#request-26}

```JSON
{
  "surveyElementAnswer": {
    "elementAnswers": [
      {
        "surveyElementId": "que_fullname-txt_1001",
        "answer": ""
      }
    ]
  }
}
```

#### Expected response {#expected-response-26}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "answer: must not be empty."
      },
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "answer: length must be between 1 and 255."
      },
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "answer: must not contain any non-printable characters (eg: C0 controls in Basic Latin, C1 controls in Latin-1 Supplement in Unicode blocks)."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Action submission request is missing surveyElementId fields {#tc-action-submission-request-is-missing-surveyelementid-fields}

Here, the `surveyElementId` of each question that's returned in an Action Initiation response must be included with the corresponding answers in the Action Submission request, but they are missing.

#### Request {#request-27}

```JSON
{
  "surveyElementAnswer": {
    "elementAnswers": [
      {
        "answer": "John"
      }
    ]
  }
}
```

#### Expected response {#expected-response-27}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "surveyElementId: must not be null."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Action submission request includes empty surveyElementId fields {#tc-action-submission-request-includes-empty-surveyelementid-fields}

In this scenario, the `surveyElementId` of each question that's returned in an Action Initiation response must be included with the corresponding answers in the Action Submission request, but they are empty.

#### Request {#request-28}

```JSON
{
  "surveyElementAnswer": {
    "elementAnswers": [
      {
        "surveyElementId": "",
        "answer": "John"
      }
    ]
  }
}
```

#### Expected response {#expected-response-28}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "surveyElementId: length must be between 1 and 50."
      },
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "surveyElementId: must not be empty."
      },
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "surveyElementId: must not contain any non-printable characters (eg: C0 controls in Basic Latin, C1 controls in Latin-1 Supplement in Unicode blocks)."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Action submission request includes invalid surveyElementId values {#tc-action-submission-request-includes-invalid-surveyelementid-values}

For this test case, a `surveyElementId` field that's included with the corresponding answers in the Action Submission request includes an invalid value and so an error is returned.

#### Request {#request-29}

```JSON
{
  "surveyElementAnswer": {
    "elementAnswers": [
      {
        "surveyElementId": "que_fullname-txt_1001",
        "answer": "Savan"
      }
    ]
  }
}
```

#### Expected response {#expected-response-29}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid request answer",
        "Recoverable": false,
        "Details": "Required answers missing. You need to make sure that all questionIds have a corresponding answer when you submit an action. We expected the following questionIds que_guidecompleted, but you only submitted these answerIds: que_fullname"
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Parameter date value is more than seven days old {#tc-parameter-date-value-is-more-than-seven-days-old}

Here, a request is sent with a date for the `updated_from` query parameter that is more than seven days in the past. An HTTP status 400 Bad Request is returned with the appropriate error message.

#### Request {#request-30}

GET request sent to the `/../consumer-clarity/subscriptions/actions?{params}` endpoint with a `{params}` value of `updated_from=2023-08-29T06:32:45.155583732Z&limit=500&offset=0`.

#### Expected response {#expected-response-30}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "updated_from parameter must not be less than 7 days from the current date and time."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Parameter date value is in the future {#tc-parameter-date-value-is-in-the-future}

In this scenario, a request is sent with a date for the `updated_from` query parameter that is in the future. An HTTP status 400 Bad Request is returned with the appropriate error message.

#### Request {#request-31}

GET request sent to the `/../consumer-clarity/subscriptions/actions?{params}` endpoint with a `{params}` value of `updated_from=2025-08-29T06:32:45.155583732Z&limit=500&offset=0`.

#### Expected response {#expected-response-31}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "updated_from parameter must not be greater than current date and time."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Parameter date value has invalid format {#tc-parameter-date-value-has-invalid-format}

For this test case, a request is sent with a date for the `updated_from` query parameter that has an invalid format. An HTTP status 400 Bad Request is returned with the appropriate error message.

#### Request {#request-32}

GET request sent to the `/../consumer-clarity/subscriptions/actions?{params}` endpoint with a `{params}` value of `updated_from=2025-08-2906:32:4&limit=500&offset=0`.

#### Expected response {#expected-response-32}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "updated_from parameter must be in one of the following formats: 'YYYY-MM-DDThh:mm:ss.SSSSSSSSSZ' (where 'Z' denotes UTC) or 'YYYY-MM-DDThh:mm:ss' (in UTC)."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Parameter date value has invalid length {#tc-parameter-date-value-has-invalid-length}

Here, a request is sent with a date for the `updated_from` query parameter that has an invalid length. An HTTP status 400 Bad Request is returned with the appropriate error message.

#### Request {#request-33}

GET request sent to the `/../consumer-clarity/subscriptions/actions?{params}` endpoint with a `{params}` value of `updated_from=2025-08-29&limit=500&offset=0`.

#### Expected response {#expected-response-33}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "updatedFrom: length must be between 19 and 30"
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Parameter value less than 500 {#tc-parameter-value-less-than-500}

In this scenario, a request is sent with a value for the `limit` query parameter that is less than 500. An HTTP status 400 Bad Request is returned with the appropriate error message.

#### Request {#request-34}

GET request sent to the `/../consumer-clarity/subscriptions/actions?{params}` endpoint with a `{params}` value of `updated_from=2024-08-29T06:32:45.155583732Z&limit=499&offset=0`.

#### Expected response {#expected-response-34}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "limit: must be greater than or equal to 500"
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Parameter value greater than 5000 {#tc-parameter-value-greater-than-5000}

For this test case, a request is sent with a value for the `limit` query parameter that is greater than 5000. An HTTP status 400 Bad Request is returned with the appropriate error message.

#### Request {#request-35}

GET request sent to the `/../consumer-clarity/subscriptions/actions?{params}` endpoint with a `{params}` value of `updated_from=2024-08-29T06:32:45.155583732Z&limit=5001&offset=0`.

#### Expected response {#expected-response-35}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "limit: must be less than or equal to 5000"
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Parameter value less than zero {#tc-parameter-value-less-than-zero}

Here, a request is sent with a value for the `offset` query parameter that is less than zero. An HTTP status 400 Bad Request is returned with the appropriate error message.

#### Request {#request-36}

GET request sent to the `/../consumer-clarity/subscriptions/actions?{params}` endpoint with a `{params}` value of `updated_from=2024-08-29T06:32:45.155583732Z&limit=500&offset=-1`.

#### Expected response {#expected-response-36}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "offset: must be greater than or equal to 0"
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Required updated_from parameter value missing {#tc-required-updated_from-parameter-value-missing}

In this scenario, a request is sent without the `updated_from` query parameter. An HTTP status 400 Bad Request is returned with the appropriate error message.

#### Request {#request-37}

GET request sent to the `/../consumer-clarity/subscriptions/actions?{params}` endpoint with a `{params}` value of `limit=500&offset=0`.

#### Expected response {#expected-response-37}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "Required request parameter 'updated_from' for method parameter type String is not present."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Required limit parameter value missing {#tc-required-limit-parameter-value-missing}

For this test case, a request is sent without the `limit` query parameter. An HTTP status 400 Bad Request is returned with the appropriate error message.

#### Request {#request-38}

GET request sent to the `/../consumer-clarity/subscriptions/actions?{params}` endpoint with a `{params}` value of `updated_from=2024-08-29T06:32:45.155583732Z&offset=0`.

#### Expected response {#expected-response-38}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "Required request parameter 'limit' for method parameter type Integer is not present."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Required offset parameter value missing {#tc-required-offset-parameter-value-missing}

Here, a request is sent without the `offset` query parameter. An HTTP status 400 Bad Request is returned with the appropriate error message.

#### Request {#request-39}

GET request sent to the `/../consumer-clarity/subscriptions/actions?{params}` endpoint with a `{params}` value of `updated_from=2024-08-29T06:32:45.155583732Z&limit=500`.

#### Expected response {#expected-response-39}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "Required request parameter 'offset' for method parameter type Long is not present."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Listing request missing paymentIds field {#tc-listing-request-missing-paymentids-field}

In this scenario, the request includes the `paymentIds` field, but the field is null. A valid request must contain at least one and no more than five `paymentIds`.

#### Request: {#request-40}

```JSON
{
  "consumerId": "7a5805e3-5271-4004-8cf2-df58aeef5616"
}
```

#### Response: {#response}

```JSON
{
  "Errors":
  {
    "Error":
    [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "paymentIds: size must be between 1 and 5."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Listing request having empty paymentIds list field {#tc-listing-request-having-empty-paymentids-list-field}

For this test case, the request includes the `paymentIds` field, but the list is empty. A valid request must contain at least one and no more than five `paymentIds`.

#### Request: {#request-41}

```JSON
{
  "paymentIds": [],
  "consumerId": "7a5805e3-5271-4004-8cf2-df58aeef5616"
}
```

#### Response: {#response-1}

```JSON
{
  "Errors":
  {
    "Error":
    [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "paymentIds: size must be between 1 and 5."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Listing request having paymentIds list exceeding the allowed threshold {#tc-listing-request-having-paymentids-list-exceeding-the-allowed-threshold}

Here, a `paymentIds` field with a maximum of five values is required as part of the request but it contains more than five records.

#### Request: {#request-42}

```JSON
{
  "paymentIds":
  [
    "7590153551759461",
    "1842894200992420",
    "6406794700708716",
    "1808999552890543",
    "7642784206891375",
    "8164788463898638"
  ],
  "consumerId": "7a5805e3-5271-4004-8cf2-df58aeef5616"
}
```

#### Response: {#response-2}

```JSON
{
  "Errors":
  {
    "Error":
    [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "paymentIds: size must be between 1 and 5."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Listings request includes empty consumerId field {#tc-listings-request-includes-empty-consumerid-field}

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

#### Request: {#request-43}

```JSON
{
  "paymentIds":    ["7590153551759461"],
  "consumerId": ""
}
```

#### Response: {#response-3}

```JSON
{
  "Errors":
  {
    "Error":
    [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "consumerId: length must be between 1 and 128."
      },
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "consumerId: must not contain any non-printable characters (eg: C0 controls in Basic Latin, C1 controls in Latin-1 Supplement in Unicode blocks)."
      },
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "consumerId: must not be empty."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

### TC: Listing request issuer consumer key isn't onboarded with Subscription Overview (Listings) feature {#tc-listing-request-issuer-consumer-key-isnt-onboarded-with-subscription-overview-listings-feature}

In this scenario, the request is made using a consumer key that wasn't onboarded for the Subscription Overview (Listings) feature. The response returns the error message "Issuer's clientId: has insufficient permission for Listings."

#### Request: {#request-44}

```JSON
{
  "paymentIds":    [  "7590153551759461"],
  "consumerId": "7a5805e3-5271-4004-8cf2-df58aeef5616"
}
```

#### Response: {#response-4}

```JSON
{
  "Errors":
  {
    "Error":
    [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "Issuer's clientId: 100000000000000000000000000000000000000000000000 has insufficient permission for Listings."
      }
    ]
  }
}
```

[Back to top](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#subscription-identification-and-actions-test-cases)

## Next Steps {#next-steps}

* [Testing](https://developer.mastercard.com/consumer-clarity/documentation/testing/index.md) shows you where to find other types of test cases that you can run.
* [API Reference](https://developer.mastercard.com/consumer-clarity/documentation/api-reference/index.md#apis) provides details about all of the fields and values in the Consumer Clarity and Smart Subscriptions APIs.
* See [Code and Formats](https://developer.mastercard.com/consumer-clarity/documentation/code-and-formats/index.md) for detailed information about error response handling.
