# 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)

* **TC9: Subscription cancellation flows with merchant retention offers**

  * [TC9.1: Cardholder declines subscription retention offer](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#tc91-cardholder-subscription-is-eligible-for-retention-offer-but-offer-is-declined)
  * [TC9.2: Cardholder accepts subscription retention offer](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#tc92-cardholder-subscription-is-eligible-for-retention-offer-and-offer-is-accepted)
  * [TC9.3: Error occurs when merchant processes retention offer](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#tc93-cardholder-subscription-is-eligible-for-retention-offer-but-error-occurred-when-applying-it)
* **TC10: Subscription cancellation flows with merchant alternative plan options**

  * [TC10.0: Cardholder selects an alternative plan option](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#tc100-cardholder-selects-an-alternative-plan-option-that-was-presented-to-them-in-your-banking-app)
  * [TC10.1: Cardholder selects invalid alternative plan option](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#tc101-cardholder-selects-an-invalid-alternative-plan-option-and-an-error-is-returned)
  * [TC10.2: Cardholder not eligible to select alternative plan option](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#tc102-cardholder-tries-to-select-an-alternative-plan-but-merchant-responds-with-ineligibility)
* [TC11: Issuer‑identified subscription for action management](https://developer.mastercard.com/consumer-clarity/documentation/testing/test-cases-subscription-controls/index.md#tc11-issueridentified-subscription-for-action-management)

* [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_Fn1GtuyqdkvD9w8VdVFNXk4wmlLq12VObpAhdI_29cpQeFrqG05vjoEGMJJF1KiQEkavsVc-jWqgmKoVH1HVANyLpQ3ar3A6SOvwpuJZZaFSvE22MIkRYCjpkvdaUDyyakKbKi_6zfYwlROf3__CBkGpOZG0m6jZUtTuMXOwMis3cBog3l_BzVnr2l0pMIgEFV1h1BfuoKTFYpeiCY9QE2qXmKYEEkyE5nlRiXNUmD_6a6jLuD7NxVCm2C4SqpsnK04RFQ7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9EpeEmW-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_8tln4Uw2VWBY5sXfl3xA12ylBT6oVEqIitwVz6jUicU4V3CNXFIhV8fdJM3aeXp8Q5Zs27HqV4Z5Hgey7TrkBoGkubzU1Qt6eoo1no3BSP_WDEm-vNgHezU3iRgRdnLmHSH2ckTG37Yc3I2q6fFIR95mYOXFGvSYdmmlOLic5RmVEnD_9Bza5FNYDIe0t2AEHyW2r9cbmgUVCzxdM6XcklY0tQRlQwrhCV9lmzJO2s783U0Zik1Da4apQCEhVjH_J1yH9m0Gicu6vlnCKBPtRs6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gzdTQwYjZiNjg3In0.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_4zSiaQFCEJKUk1i9vfxjw7qjvC0Cpk2IGf9_gaAcl2BiPAzmoysnkzTh4JneTnbghVcE6a_3Z-g8UkFfPsHN3RO9VnFDmGs6XBne9JOmyf34HxZkIWzNpRGcO3xSGuwq3wYINlEq4YRXRLGehVYjPb3XFnCi1MIpy_NWkS5mG5WylGMxiHB2M4_L8XBzuHAxYLL7Js?locale=en-US&access_token=eyJ4NXQjUzI1NiI6Ik1FbHpvRnQ0Ny00ZTNP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rNU5EPNFnKf0VZJX_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-YdD5K5wi76A-gF8MaDWkP2XzI3uTNxWss9_HPVfLxyWr1iyDCUJ3WpUFpu37n-0V8xRsP2qDaTFk_xQgRW--QW_DW3WiyxSSboYmOnZJJivWO6aqixITgHMK8N36AHoS6X0DwGDilqyUrGgvWDLbPmvgv1PA0KIHVfGHRxTm9D1n9jXNXw4zZFhExO-5xrzRKf_DyvXurvMn46g9nTaXG4ZgQmT3tqIInli-O5luNIQa4OZTfvwVfB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UpUd2RpVkp4UHgzdTQwYjZiNjg3In0.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_6N4mLCIWqiHU4s72V-o9HcH80cANhJacisrvKovVJdndW9W_Pus5JWVYa5ljRbfEiEeK6PSLC3Qs1_FSIrO5XnieR-wm9f8r?locale=en-US&access_token=eyJ4NXQjUzI1NiI6Ik1FbHpvRnQ0Ny00ZTNPQ1JhYW1kdHJBM0N5Zm9PTGFoM29XS0U3TzRBZmciLCJraWQiOiIyMDIwMDkyODExMjUwMC1TQUFULVRva2VuLUVuZ2luZSIsImN0eSI6Ik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13: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)

### TC9.1: Cardholder subscription is eligible for retention offer but offer is declined {#tc91-cardholder-subscription-is-eligible-for-retention-offer-but-offer-is-declined}

In this test case, a request is sent for a subscription cancellation that is eligible for a retention offer from the merchant, such as **DISCOUNT** . The cardholder is presented with the retention offer and an `actionOptionSurvey`. The action status is set to `WAITING_FOR_USER`.

The `actionOptionSurvey` is filled out with the cardholder declining the offer. The action is then set to `CANCEL` and the merchant processes the cancellation.

#### Step 1A- Initial request for subscription cancellation {#step-1a--initial-request-for-subscription-cancellation}

```JSON
{
  "action": "CANCEL",
  "serviceId": "00000000-0106-4000-8000-000000000001",
  "paymentId": "e693bd9a-3b18-4be3-9e05-fce039ea7beb",
  "locale": "en_US",
  "issuerId": "1234567890123456",
}
```

#### Step 1B Cancel initiation response: Cardholder is required to fill out the survey needed to submit cancellation request {#step-1b-cancel-initiation-response-cardholder-is-required-to-fill-out-the-survey-needed-to-submit-cancellation-request}

```JSON
{
  "actionId": "755655cd-2b2a-47e2-9987-d3b7f65c374f",
  "serviceId": "00000000-0106-4000-8000-000000000001",
  "subscriptionId": "7cd2b3af-5b80-4852-8fe8-63fb02c14d1f",
  "actionState": {
    "action": "CANCEL",
    "method": "AUTOMATED",
    "status": "INITIATED",
    "createdDate": "2026-04-15T13:27:40.78992433Z",
    "updatedDate": "2026-04-15T13:27:40.78992433Z"
  },
  "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_contactemail",
        "prompt": "Contact email"
      }
    ]
  }
}
```

#### Step 2A: First submit request: Cardholder has filled out the survey {#step-2a-first-submit-request-cardholder-has-filled-out-the-survey}

```JSON
{
  "actionId": "755655cd-2b2a-47e2-9987-d3b7f65c374f",
  "serviceId": "00000000-0106-4000-8000-000000000001",
  "action": "CANCEL",
  "paymentId": "e693bd9a-3b18-4be3-9e05-fce039ea7beb",
  "locale": "en-US",
  "issuerId": "1234567890123456",
  "surveyElementAnswer": {
    "elementAnswers": [
      {
        "surveyElementId": "que_fullname-txt_1001",
        "answer": "George"
      },
      {
        "surveyElementId": "que_fullname-txt_1002",
        "answer": "Johnson"
      },
      {
        "surveyElementId": "que_contactemail",
        "answer": "qa@test.com"
      }
    ]
  }
}
```

#### Step 2B: First submit response: Subscription is eligible for retention offer and cardholder presented with an offer and details {#step-2b-first-submit-response-subscription-is-eligible-for-retention-offer-and-cardholder-presented-with-an-offer-and-details}

```JSON
{
  "actionId": "755655cd-2b2a-47e2-9987-d3b7f65c374f",
  "serviceId": "00000000-0106-4000-8000-000000000001",
  "subscriptionId": "7cd2b3af-5b80-4852-8fe8-63fb02c14d1f",
  "actionState": {
    "action": "CANCEL",
    "method": "AUTOMATED",
    "status": "WAITING_FOR_USER",
    "flowState": "OFFER_EXTENDED",
    "createdDate": "2026-04-15T13:27:40.78992433Z",
    "updatedDate": "2026-04-15T13:30:40.764742729Z"
  },
  "offerDetails": {
    "offerId": "8a051e43-0e5a-49e4-ac97-f4cd85b42c53",
    "name": "30% off for 3 months",
    "type": "DISCOUNT",
    "offerPeriod": {
      "unit": "MONTHS",
      "period": 3
    },
    "expiresAt": "2026-04-15T13:30:40.764186679Z",
    "discount": {
      "type": "PERCENTAGE",
      "amount": "0.3",
      "currencyCode": "USD"
    },
    "terms": [],
    "additionalServices": [],
    "description": "Get 30% off your monthly subscription for 3 months, after this period your subscription will automatically renew"
  },
  "subscriptionChanges": {
    "serviceName": "Nexus Reach Offer 1",
    "billingStatus": "PAID",
    "billedThrough": "DIRECT",
    "contractType": "FLEXIBLE",
    "contractFrequency": "MONTHLY",
    "paymentsRemaining": 0,
    "nextBillingDate": "2026-05-15T00:00:00Z",
    "nextBillingAmount": "7",
    "billingCurrencyCode": "USD",
    "updatedDate": "2026-04-15T13:30:40.678912209Z"
  },
  "actionOptionsSurvey": {
    "surveyName": "Action Questionnaire",
    "elements": [
      {
        "surveyElementType": "OPTIONS",
        "multiselect": false,
        "options": [
          {
            "code": "N",
            "value": "No"
          },
          {
            "code": "Y",
            "value": "Yes"
          }
        ],
        "id": "que_acceptoffer",
        "prompt": "Do you accept the offer?"
      },
      {
        "surveyElementType": "OPTIONS",
        "multiselect": false,
        "options": [
          {
            "code": "N",
            "value": "No"
          },
          {
            "code": "Y",
            "value": "Yes"
          }
        ],
        "id": "que_abandon",
        "prompt": "Abandon?"
      }
    ]
  }
}
```

#### Step 3A: Second submit request: Cardholder declines the offer {#step-3a-second-submit-request-cardholder-declines-the-offer}

```JSON
{
  "actionId": "755655cd-2b2a-47e2-9987-d3b7f65c374f",
  "serviceId": "00000000-0106-4000-8000-000000000001",
  "action": "CANCEL",
  "paymentId": "e693bd9a-3b18-4be3-9e05-fce039ea7beb",
  "locale": "en-US",
  "issuerId": "1234567890123456"
  "actionOptionsSurveyAnswers": {
    "responses": [
      {
        "surveyElementId": "que_acceptoffer",
        "answer": "No"
      }
    ]
  }
}
```

#### Step 3B: Second (final) submit response: Cardholder's response is passed to the merchant, the offer is declined, and subscription is cancelled {#step-3b-second-final-submit-response-cardholders-response-is-passed-to-the-merchant-the-offer-is-declined-and-subscription-is-cancelled}

```JSON
{
  "actionId": "755655cd-2b2a-47e2-9987-d3b7f65c374f",
  "serviceId": "00000000-0106-4000-8000-000000000001",
  "subscriptionId": "7cd2b3af-5b80-4852-8fe8-63fb02c14d1f",
  "actionState": {
    "action": "CANCEL",
    "method": "AUTOMATED",
    "status": "SUCCESSFUL",
    "statusReasonCode": "PROCESSED",
    "statusReasonCodeDescription": "Action has been successfully processed",
    "flowState": "ACTION_APPLIED",
    "createdDate": "2026-04-15T13:27:40.78992433Z",
    "updatedDate": "2026-04-15T13:42:11.751937436Z",
    "effectiveDate": "2026-04-16T00:00:00Z"
  },
  "offerDetails": {
    "offerId": "8a051e43-0e5a-49e4-ac97-f4cd85b42c53",
    "name": "30% off for 3 months",
    "type": "DISCOUNT",
    "offerPeriod": {
      "unit": "MONTHS",
      "period": 3
    },
    "expiresAt": "2026-04-15T13:30:40.764186679Z",
    "discount": {
      "type": "PERCENTAGE",
      "amount": "0.3",
      "currencyCode": "USD"
    },
    "terms": [],
    "additionalServices": [],
    "description": "Get 30% off your monthly subscription for 3 months, after this period your subscription will automatically renew"
  },
  "subscriptionChanges": {
    "serviceName": "Nexus Reach Offer 1",
    "billingStatus": "PAID",
    "billedThrough": "DIRECT",
    "contractType": "FLEXIBLE",
    "contractFrequency": "MONTHLY",
    "paymentsRemaining": 0,
    "nextBillingAmount": "0",
    "billingCurrencyCode": "USD",
    "updatedDate": "2026-04-15T13:42:11.686789986Z"
  },
  "actionOptionsSurvey": {
    "surveyName": "Action Questionnaire",
    "elements": [
      {
        "surveyElementType": "OPTIONS",
        "multiselect": false,
        "options": [
          {
            "code": "N",
            "value": "No"
          },
          {
            "code": "Y",
            "value": "Yes"
          }
        ],
        "id": "que_acceptoffer",
        "prompt": "Do you accept the offer?"
      },
      {
        "surveyElementType": "OPTIONS",
        "multiselect": false,
        "options": [
          {
            "code": "N",
            "value": "No"
          },
          {
            "code": "Y",
            "value": "Yes"
          }
        ],
        "id": "que_abandon",
        "prompt": "Abandon?"
      }
    ]
  }
}
```

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

### TC9.2: Cardholder subscription is eligible for retention offer and offer is accepted {#tc92-cardholder-subscription-is-eligible-for-retention-offer-and-offer-is-accepted}

Here, a request is sent for a subscription cancellation that is eligible for a retention offer from the merchant, such as **DISCOUNT** . The cardholder is presented with the retention offer and an `actionOptionSurvey`. The action status is set to `WAITING_FOR_USER`.

In this case, the `actionOptionSurvey` is filled out with the cardholder accepting the offer. The `flowState` is then set to `OFFER_APPLIED` and the merchant will process the retention offer.

#### Step 1A - Initial request for subscription cancellation {#step-1a---initial-request-for-subscription-cancellation}

```JSON
{
  "action": "CANCEL",
  "serviceId": "00000000-0107-4000-8000-000000000001",
  "paymentId": "e693bd9a-3b18-4be3-9e05-fce039ea7beb",
  "locale": "en_US",
  "issuerId": "1234567890123456",
}
```

#### Step 1B response: Cardholder is required to fill out the survey needed to submit cancellation request {#step-1b-response-cardholder-is-required-to-fill-out-the-survey-needed-to-submit-cancellation-request}

```JSON
{
  "actionId": "755655cd-2b2a-47e2-9987-d3b7f65c374f",
  "serviceId": "00000000-0106-4000-8000-000000000001",
  "subscriptionId": "7cd2b3af-5b80-4852-8fe8-63fb02c14d1f",
  "actionState": {
    "action": "CANCEL",
    "method": "AUTOMATED",
    "status": "INITIATED",
    "createdDate": "2026-04-15T13:27:40.78992433Z",
    "updatedDate": "2026-04-15T13:27:40.78992433Z"
  },
  "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_contactemail",
        "prompt": "Contact email"
      }
    ]
  }
}
```

#### Step 2A: First submit request: Cardholder has filled out the survey {#step-2a-first-submit-request-cardholder-has-filled-out-the-survey-1}

```JSON
{
  "actionId": "755655cd-2b2a-47e2-9987-d3b7f65c374f",
  "serviceId": "00000000-0106-4000-8000-000000000001",
  "action": "CANCEL",
  "paymentId": "e693bd9a-3b18-4be3-9e05-fce039ea7beb",
  "locale": "en-US",
  "issuerId": "1234567890123456",
  "surveyElementAnswer": {
    "elementAnswers": [
      {
        "surveyElementId": "que_fullname-txt_1001",
        "answer": "George"
      },
      {
        "surveyElementId": "que_fullname-txt_1002",
        "answer": "Johnson"
      },
      {
        "surveyElementId": "que_contactemail",
        "answer": "qa@test.com"
      }
    ]
  }
}
```

#### Step 2B: First submit response: Subscription is eligible for a retention offer and cardholder is presented with an offer and details {#step-2b-first-submit-response-subscription-is-eligible-for-a-retention-offer-and-cardholder-is-presented-with-an-offer-and-details}

```JSON
{
  "actionId": "755655cd-2b2a-47e2-9987-d3b7f65c374f",
  "serviceId": "00000000-0106-4000-8000-000000000001",
  "subscriptionId": "7cd2b3af-5b80-4852-8fe8-63fb02c14d1f",
  "actionState": {
    "action": "CANCEL",
    "method": "AUTOMATED",
    "status": "WAITING_FOR_USER",
    "flowState": "OFFER_EXTENDED",
    "createdDate": "2026-04-15T13:27:40.78992433Z",
    "updatedDate": "2026-04-15T13:30:40.764742729Z"
  },
  "offerDetails": {
    "offerId": "8a051e43-0e5a-49e4-ac97-f4cd85b42c53",
    "name": "30% off for 3 months",
    "type": "DISCOUNT",
    "offerPeriod": {
      "unit": "MONTHS",
      "period": 3
    },
    "expiresAt": "2026-04-15T13:30:40.764186679Z",
    "discount": {
      "type": "PERCENTAGE",
      "amount": "0.3",
      "currencyCode": "USD"
    },
    "terms": [],
    "additionalServices": [],
    "description": "Get 30% off your monthly subscription for 3 months, after this period your subscription will automatically renew"
  },
  "subscriptionChanges": {
    "serviceName": "Nexus Reach Offer 1",
    "billingStatus": "PAID",
    "billedThrough": "DIRECT",
    "contractType": "FLEXIBLE",
    "contractFrequency": "MONTHLY",
    "paymentsRemaining": 0,
    "nextBillingDate": "2026-05-15T00:00:00Z",
    "nextBillingAmount": "7",
    "billingCurrencyCode": "USD",
    "updatedDate": "2026-04-15T13:30:40.678912209Z"
  },
  "actionOptionsSurvey": {
    "surveyName": "Action Questionnaire",
    "elements": [
      {
        "surveyElementType": "OPTIONS",
        "multiselect": false,
        "options": [
          {
            "code": "N",
            "value": "No"
          },
          {
            "code": "Y",
            "value": "Yes"
          }
        ],
        "id": "que_acceptoffer",
        "prompt": "Do you accept the offer?"
      },
      {
        "surveyElementType": "OPTIONS",
        "multiselect": false,
        "options": [
          {
            "code": "N",
            "value": "No"
          },
          {
            "code": "Y",
            "value": "Yes"
          }
        ],
        "id": "que_abandon",
        "prompt": "Abandon?"
      }
    ]
  }
}
```

#### Step 3A: Second submit request: Cardholder accepts the retention offer {#step-3a-second-submit-request-cardholder-accepts-the-retention-offer}

```JSON
{
  "actionId": "755655cd-2b2a-47e2-9987-d3b7f65c374f",
  "serviceId": "00000000-0106-4000-8000-000000000001",
  "action": "CANCEL",
  "paymentId": "e693bd9a-3b18-4be3-9e05-fce039ea7beb",
  "locale": "en-US",
  "issuerId": "1234567890123456"
  "actionOptionsSurveyAnswers": {
    "responses": [
      {
        "surveyElementId": "que_acceptoffer",
        "answer": "Yes"
      }
    ]
  }
}
```

#### Step 3B: Second (final) submit response: Cardholder's response is passed to the merchant, the offer is applied, and subscription is updated to reflect retention offer {#step-3b-second-final-submit-response-cardholders-response-is-passed-to-the-merchant-the-offer-is-applied-and-subscription-is-updated-to-reflect-retention-offer}

```JSON
{
  "actionId": "6b499ede-daae-4a64-a1f2-5751f75105f4",
  "serviceId": "00000000-0106-4000-8000-000000000001",
  "subscriptionId": "8d59810e-2aa8-40af-a28f-b83c851e181b",
  "actionState": {
    "action": "CANCEL",
    "method": "AUTOMATED",
    "status": "SUCCESSFUL",
    "statusReasonCode": "PROCESSED",
    "statusReasonCodeDescription": "Offer has been successfully applied",
    "flowState": "OFFER_APPLIED",
    "createdDate": "2026-04-14T18:30:02.094630774Z",
    "updatedDate": "2026-04-14T18:31:05.488858675Z",
    "effectiveDate": "2026-04-15T00:00:00Z"
  },
  "offerDetails": {
    "offerId": "d8771623-ccf3-4752-98be-203de86b0ff1",
    "name": "30% off for 3 months",
    "type": "DISCOUNT",
    "offerPeriod": {
      "unit": "MONTHS",
      "period": 3
    },
    "expiresAt": "2026-04-14T18:30:10.559466278Z",
    "discount": {
      "type": "PERCENTAGE",
      "amount": "0.3",
      "currencyCode": "USD"
    },
    "terms": [],
    "additionalServices": [],
    "acceptedAt": "2026-04-14T18:31:04.010273169Z",
    "description": "Get 30% off your monthly subscription for 3 months, after this period your subscription will automatically renew"
  },
  "subscriptionChanges": {
    "serviceName": "Nexus Reach Offer 1",
    "billingStatus": "PAID",
    "billedThrough": "DIRECT",
    "contractType": "FLEXIBLE",
    "contractFrequency": "MONTHLY",
    "paymentsRemaining": 0,
    "nextBillingDate": "2026-05-14T00:00:00Z",
    "nextBillingAmount": "7",
    "billingCurrencyCode": "USD",
    "updatedDate": "2026-04-14T18:31:05.429701555Z"
  }
}
```

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

### TC9.3: Cardholder subscription is eligible for retention offer but error occurred when applying it {#tc93-cardholder-subscription-is-eligible-for-retention-offer-but-error-occurred-when-applying-it}

In this scenario, a request is sent for a subscription cancellation that is eligible for a retention offer from the merchant **DISCOUNT** . The cardholder is presented with the retention offer and an `actionOptionSurvey`. The action status is set to `WAITING_FOR_USER`.

In this case, the `actionOptionSurvey` is filled out with the cardholder accepting the offer. An error occurs when the merchant processed the retention offer, so the original cancellation is applied as a fallback.

#### Step 1A - Initial request for subscription cancellation {#step-1a---initial-request-for-subscription-cancellation-1}

```JSON
{
  "locale": "en-US",
  "issuerId": "1234567890123456",
  "serviceId": "00000000-0115-4000-8000-000000000001",
  "action": "CANCEL",
  "paymentId": "e693bd9a-3b18-4be3-9e05-fce039ea7beb"
}
```

#### Step 1B response: Cardholder is required to fill out the survey needed to submit cancellation request {#step-1b-response-cardholder-is-required-to-fill-out-the-survey-needed-to-submit-cancellation-request-1}

```JSON
{
  "actionId": "65c06e1d-7ce2-4516-8e62-9f44370de7b6",
  "serviceId": "00000000-0115-4000-8000-000000000001",
  "subscriptionId": "1d8f4292-ac8e-40d6-bb87-2b73d35aa933",
  "actionState": {
    "action": "CANCEL",
    "method": "AUTOMATED",
    "status": "INITIATED",
    "createdDate": "2026-04-15T14:45:44.967783069Z",
    "updatedDate": "2026-04-15T14:45:44.967783069Z"
  },
  "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_contactemail",
        "prompt": "Contact email"
      }
    ]
  }
}
```

#### Step 2A: First submit request: Cardholder has filled out the survey {#step-2a-first-submit-request-cardholder-has-filled-out-the-survey-2}

```JSON
{
  "actionId": "65c06e1d-7ce2-4516-8e62-9f44370de7b6",
  "serviceId": "00000000-0115-4000-8000-000000000001",
  "action": "CANCEL",
  "paymentId": "e693bd9a-3b18-4be3-9e05-fce039ea7beb",
  "locale": "en-US",
  "surveyElementAnswer": {
    "elementAnswers": [
      {
        "surveyElementId": "que_fullname-txt_1001",
        "answer": "Edward"
      },
      {
        "surveyElementId": "que_fullname-txt_1002",
        "answer": "Smith"
      },
      {
        "surveyElementId": "que_contactemail",
        "answer": "user@demo.org"
      }
    ]
  }
}
```

#### Step 2B: First submit response: Subscription is eligible for a retention offer and the cardholder is presented with an offer and details {#step-2b-first-submit-response-subscription-is-eligible-for-a-retention-offer-and-the-cardholder-is-presented-with-an-offer-and-details}

```JSON
{
  "actionId": "65c06e1d-7ce2-4516-8e62-9f44370de7b6",
  "serviceId": "00000000-0115-4000-8000-000000000001",
  "subscriptionId": "1d8f4292-ac8e-40d6-bb87-2b73d35aa933",
  "actionState": {
    "action": "CANCEL",
    "method": "AUTOMATED",
    "status": "WAITING_FOR_USER",
    "flowState": "OFFER_EXTENDED",
    "createdDate": "2026-04-15T14:45:44.967783069Z",
    "updatedDate": "2026-04-15T14:52:33.187348229Z"
  },
  "offerDetails": {
    "offerId": "fcb30541-bdbd-40f5-b1d6-a430c4fbe911",
    "name": "30% off for 3 months",
    "type": "DISCOUNT",
    "offerPeriod": {
      "unit": "MONTHS",
      "period": 3
    },
    "expiresAt": "2026-04-15T14:52:33.18727848Z",
    "discount": {
      "type": "PERCENTAGE",
      "amount": "0.3",
      "currencyCode": "USD"
    },
    "terms": [],
    "additionalServices": [],
    "description": "Get 30% off your monthly subscription for 3 months, after this period your subscription will automatically renew"
  },
  "subscriptionChanges": {
    "serviceName": "Precision Offer Sync 1",
    "billingStatus": "PAID",
    "billedThrough": "DIRECT",
    "contractType": "FLEXIBLE",
    "contractFrequency": "MONTHLY",
    "paymentsRemaining": 0,
    "nextBillingDate": "2026-05-15T00:00:00Z",
    "nextBillingAmount": "7",
    "billingCurrencyCode": "USD",
    "updatedDate": "2026-04-15T14:52:33.118073318Z"
  },
  "actionOptionsSurvey": {
    "surveyName": "Action Questionnaire",
    "elements": [
      {
        "surveyElementType": "OPTIONS",
        "multiselect": false,
        "options": [
          {
            "code": "N",
            "value": "No"
          },
          {
            "code": "Y",
            "value": "Yes"
          }
        ],
        "id": "que_acceptoffer",
        "prompt": "Do you accept the offer?"
      },
      {
        "surveyElementType": "OPTIONS",
        "multiselect": false,
        "options": [
          {
            "code": "N",
            "value": "No"
          },
          {
            "code": "Y",
            "value": "Yes"
          }
        ],
        "id": "que_abandon",
        "prompt": "Abandon?"
      }
    ]
  }
}
```

#### Step 3A: Second submit request: Cardholder accepts the retention offer but the merchant encounters an error applying it {#step-3a-second-submit-request-cardholder-accepts-the-retention-offer-but-the-merchant-encounters-an-error-applying-it}

```JSON
{
  "actionId": "65c06e1d-7ce2-4516-8e62-9f44370de7b6",
  "issuerId": "1234567890123456",
  "actionOptionsSurveyAnswers": {
    "responses": [
      {
        "surveyElementId": "que_acceptoffer",
        "answer": "Yes"
      }
    ]
  }
}
```

#### Step 3B: Second (final) submit response: Cardholder's response is passed to the merchant, the offer couldn't be applied and subscription is cancelled {#step-3b-second-final-submit-response-cardholders-response-is-passed-to-the-merchant-the-offer-couldnt-be-applied-and-subscription-is-cancelled}

```JSON
{
  "actionId": "65c06e1d-7ce2-4516-8e62-9f44370de7b6",
  "serviceId": "00000000-0115-4000-8000-000000000001",
  "subscriptionId": "90bdde27-7436-4934-a8e0-4d907554b474",
  "actionState": {
    "action": "CANCEL",
    "method": "AUTOMATED",
    "status": "SUCCESSFUL",
    "statusReasonCode": "PROCESSED",
    "statusReasonCodeDescription": "Unable to apply the offer. The action has been successfully applied",
    "flowState": "OFFER_ERROR_ACTION_APPLIED",
    "createdDate": "2026-04-14T18:45:04.687535834Z",
    "updatedDate": "2026-04-14T18:46:13.992199751Z",
    "effectiveDate": "2026-04-15T00:00:00Z"
  },
  "offerDetails": {
    "offerId": "4226a75f-ab8d-4377-a187-69f853817dcc",
    "name": "30% off for 3 months",
    "type": "DISCOUNT",
    "offerPeriod": {
      "unit": "MONTHS",
      "period": 3
    },
    "expiresAt": "2026-04-14T18:45:15.341414334Z",
    "discount": {
      "type": "PERCENTAGE",
      "amount": "0.3",
      "currencyCode": "USD"
    },
    "terms": [],
    "additionalServices": [],
    "description": "Get 30% off your monthly subscription for 3 months, after this period your subscription will automatically renew"
  },
  "subscriptionChanges": {
    "serviceName": "Precision Offer Sync 1",
    "billingStatus": "PAID",
    "billedThrough": "DIRECT",
    "contractType": "FLEXIBLE",
    "contractFrequency": "MONTHLY",
    "paymentsRemaining": 0,
    "nextBillingAmount": "0",
    "billingCurrencyCode": "USD",
    "updatedDate": "2026-04-14T18:46:13.931887079Z"
  }
}
```

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

### TC10.0: Cardholder selects an alternative plan option that was presented to them in your banking app {#tc100-cardholder-selects-an-alternative-plan-option-that-was-presented-to-them-in-your-banking-app}

For this test case, the **Change Plan** flow consists of two steps: **Init** and **Submit** . The `action` field is set to `CHANGE_PLAN`. The initial response returns a survey that includes an `OPTIONS` element outlining the available plan choices. The selected plan option must then be provided in the **Submit** request for the merchant to action.

#### Step 1A- Initial request for changing subscription plan {#step-1a--initial-request-for-changing-subscription-plan}

```JSON
{
  "locale": "en-US",
  "issuerId": "1234567890123456",
  "serviceId": "00000000-0108-4000-8000-000000000001",
  "action": "CHANGE_PLAN",
  "paymentId": "e693bd9a-3b18-4be3-9e05-fce039ea7beb"
}
```

#### Step 1B response: Cardholder is required to fill out the survey needed to change plan {#step-1b-response-cardholder-is-required-to-fill-out-the-survey-needed-to-change-plan}

```JSON
{
  "actionId": "896c67ee-6ff9-4109-b68c-94aa5e52d62e",
  "serviceId": "00000000-0108-4000-8000-000000000001",
  "subscriptionId": "bad3d973-1fd7-45ce-b0ef-97f132dac4c1",
  "actionState": {
    "action": "CHANGE_PLAN",
    "method": "AUTOMATED",
    "status": "INITIATED",
    "createdDate": "2026-04-15T15:03:52.308866319Z",
    "updatedDate": "2026-04-15T15:03:52.308866319Z"
  },
  "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_contactemail",
        "prompt": "Contact email"
      }
    ]
  }
}
```

#### Step 2A: First submit request: Cardholder has filled out the survey {#step-2a-first-submit-request-cardholder-has-filled-out-the-survey-3}

```JSON
{
  "actionId": "896c67ee-6ff9-4109-b68c-94aa5e52d62e",
  "serviceId": "00000000-0108-4000-8000-000000000001",
  "action": "CHANGE_PLAN",
  "paymentId": "e693bd9a-3b18-4be3-9e05-fce039ea7beb",
  "locale": "en-US",
  "surveyElementAnswer": {
    "elementAnswers": [
      {
        "surveyElementId": "que_fullname-txt_1001",
        "answer": "Alice"
      },
      {
        "surveyElementId": "que_fullname-txt_1002",
        "answer": "Davis"
      },
      {
        "surveyElementId": "que_contactemail",
        "answer": "demo@test.com"
      }
    ]
  }
}
```

#### Step 2B: First submit response: Subscription is eligible for a plan change and the cardholder is presented with available plan options and relevant details {#step-2b-first-submit-response-subscription-is-eligible-for-a-plan-change-and-the-cardholder-is-presented-with-available-plan-options-and-relevant-details}

```JSON
{
  "actionId": "896c67ee-6ff9-4109-b68c-94aa5e52d62e",
  "serviceId": "00000000-0108-4000-8000-000000000001",
  "subscriptionId": "bad3d973-1fd7-45ce-b0ef-97f132dac4c1",
  "actionState": {
    "action": "CHANGE_PLAN",
    "method": "AUTOMATED",
    "status": "WAITING_FOR_USER",
    "flowState": "PLANS_EXTENDED",
    "createdDate": "2026-04-15T15:03:52.308866319Z",
    "updatedDate": "2026-04-15T15:10:53.316986513Z"
  },
  "planDetails": [
    {
      "id": "28456274",
      "name": "Standard Plan",
      "descriptions": [],
      "amount": "12.99",
      "amountDueToday": "0",
      "currencyCode": "USD",
      "planPeriod": {
        "unit": "MONTHS",
        "period": 1
      },
      "currentPlan": true,
      "contractType": "FLEXIBLE",
      "paymentsRemaining": 0,
      "terms": [
        {
          "header": "Terms of Conditions",
          "terms": "Detailed description of terms and condition"
        }
      ]
    },
    {
      "id": "397987458",
      "name": "Premium Plan",
      "descriptions": [],
      "amount": "22.99",
      "amountDueToday": "10",
      "currencyCode": "USD",
      "planPeriod": {
        "unit": "MONTHS",
        "period": 1
      },
      "currentPlan": false,
      "contractType": "FLEXIBLE",
      "paymentsRemaining": 0,
      "terms": [
        {
          "header": "Terms of Conditions",
          "terms": "Detailed description of terms and condition"
        }
      ]
    }
  ],
  "actionOptionsSurvey": {
    "surveyName": "Action Questionnaire",
    "elements": [
      {
        "surveyElementType": "OPTIONS",
        "options": [],
        "id": "que_changeplan",
        "prompt": "Select a Plan"
      },
      {
        "surveyElementType": "OPTIONS",
        "multiselect": false,
        "options": [
          {
            "code": "N",
            "value": "No"
          },
          {
            "code": "Y",
            "value": "Yes"
          }
        ],
        "id": "que_abandon",
        "prompt": "Abandon?"
      }
    ]
  }
}
```

#### Step 3A: Second submit request: Cardholder has filled out the action option survey and selected alternative plan {#step-3a-second-submit-request-cardholder-has-filled-out-the-action-option-survey-and-selected-alternative-plan}

```JSON
{
  "actionId": "896c67ee-6ff9-4109-b68c-94aa5e52d62e",
  "serviceId": "00000000-0108-4000-8000-000000000001",
  "action": "CHANGE_PLAN",
  "paymentId": "e693bd9a-3b18-4be3-9e05-fce039ea7beb",
  "locale": "en-US",
  "surveyElementAnswer": {
    "elementAnswers": [
      {
        "surveyElementId": "que_fullname-txt_1001",
        "answer": "Charlie"
      },
      {
        "surveyElementId": "que_fullname-txt_1002",
        "answer": "Williams"
      },
      {
        "surveyElementId": "que_merchantemail-txt_1008",
        "answer": "qa@example.com"
      }
    ]
  },
  "actionOptionsSurveyAnswers": {
    "responses": [
      {
        "surveyElementId": "que_changeplan",
        "answer": "397987458"
      }
    ]
  }
}
```

#### Step 3B: Second (final) submit response: Cardholder's response is passed to the merchant who applies the cardholder's new plan selection {#step-3b-second-final-submit-response-cardholders-response-is-passed-to-the-merchant-who-applies-the-cardholders-new-plan-selection}

```JSON
{
  "actionId": "896c67ee-6ff9-4109-b68c-94aa5e52d62e",
  "serviceId": "00000000-0108-4000-8000-000000000001",
  "subscriptionId": "bad3d973-1fd7-45ce-b0ef-97f132dac4c1",
  "actionState": {
    "action": "CHANGE_PLAN",
    "method": "AUTOMATED",
    "status": "SUCCESSFUL",
    "statusReasonCode": "PROCESSED",
    "statusReasonCodeDescription": "Plan selection has been applied successfully.",
    "flowState": "ACTION_APPLIED",
    "createdDate": "2026-04-15T15:03:52.308866319Z",
    "updatedDate": "2026-04-15T15:17:32.644217128Z",
    "effectiveDate": "2026-04-15T00:00:00Z"
  },
  "subscriptionChanges": {
    "serviceName": "Core Qualify Gate 1",
    "billingStatus": "PAID",
    "billedThrough": "DIRECT",
    "contractType": "FLEXIBLE",
    "contractFrequency": "MONTHLY",
    "paymentsRemaining": 0,
    "nextBillingDate": "2026-05-15T00:00:00Z",
    "nextBillingAmount": "22.99",
    "billingCurrencyCode": "USD",
    "updatedDate": "2026-04-15T15:17:32.553046141Z"
  },
  "actionOptionsSurvey": {
    "surveyName": "Action Questionnaire",
    "elements": [
      {
        "surveyElementType": "OPTIONS",
        "options": [
          {
            "code": "opt_397987458",
            "value": "opt_397987458"
          }
        ],
        "id": "que_changeplan",
        "prompt": "Select a Plan"
      },
      {
        "surveyElementType": "OPTIONS",
        "multiselect": false,
        "options": [
          {
            "code": "N",
            "value": "No"
          },
          {
            "code": "Y",
            "value": "Yes"
          }
        ],
        "id": "que_abandon",
        "prompt": "Abandon?"
      }
    ]
  }
}
```

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

### TC10.1: Cardholder selects an invalid alternative plan option and an error is returned {#tc101-cardholder-selects-an-invalid-alternative-plan-option-and-an-error-is-returned}

Here, the `action` field is set to `CHANGE_PLAN`. The initial response returns a survey that includes an `OPTIONS` element outlining the available plan choices. The selected plan option must then be provided in the **Submit** request for the merchant to act on. An option code not present in the initial response survey returns a 400 Bad Request along with valid options listed in the error details.

#### Step 1A -- Initial request for plan change {#step-1a--initial-request-for-plan-change}

```JSON
{
  "locale": "en-US",
  "issuerId": "1234567890123456",
  "serviceId": "00000000-0108-4000-8000-000000000001",
  "action": "CHANGE_PLAN",
  "paymentId": "e693bd9a-3b18-4be3-9e05-fce039ea7beb"
}
```

#### Step 1B response: Cardholder is required to fill out the survey needed to change plan {#step-1b-response-cardholder-is-required-to-fill-out-the-survey-needed-to-change-plan-1}

```JSON
{
  "actionId": "896c67ee-6ff9-4109-b68c-94aa5e52d62e",
  "serviceId": "00000000-0108-4000-8000-000000000001",
  "subscriptionId": "bad3d973-1fd7-45ce-b0ef-97f132dac4c1",
  "actionState": {
    "action": "CHANGE_PLAN",
    "method": "AUTOMATED",
    "status": "INITIATED",
    "createdDate": "2026-04-15T15:03:52.308866319Z",
    "updatedDate": "2026-04-15T15:03:52.308866319Z"
  },
  "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_contactemail",
        "prompt": "Contact email"
      }
    ]
  }
}
```

#### Step 2A: First submit request: Cardholder has filled out the survey {#step-2a-first-submit-request-cardholder-has-filled-out-the-survey-4}

```JSON
{
  "actionId": "896c67ee-6ff9-4109-b68c-94aa5e52d62e",
  "serviceId": "00000000-0108-4000-8000-000000000001",
  "action": "CHANGE_PLAN",
  "paymentId": "e693bd9a-3b18-4be3-9e05-fce039ea7beb",
  "locale": "en-US",
  "surveyElementAnswer": {
    "elementAnswers": [
      {
        "surveyElementId": "que_fullname-txt_1001",
        "answer": "Alice"
      },
      {
        "surveyElementId": "que_fullname-txt_1002",
        "answer": "Davis"
      },
      {
        "surveyElementId": "que_contactemail",
        "answer": "demo@test.com"
      }
    ]
  }
}
```

#### Step 2B: First submit response: Subscription qualifies for a plan change, the cardholder is notified of their options, and receives information about the new plan details {#step-2b-first-submit-response-subscription-qualifies-for-a-plan-change-the-cardholder-is-notified-of-their-options-and-receives-information-about-the-new-plan-details}

```JSON
{
  "actionId": "896c67ee-6ff9-4109-b68c-94aa5e52d62e",
  "serviceId": "00000000-0108-4000-8000-000000000001",
  "subscriptionId": "bad3d973-1fd7-45ce-b0ef-97f132dac4c1",
  "actionState": {
    "action": "CHANGE_PLAN",
    "method": "AUTOMATED",
    "status": "WAITING_FOR_USER",
    "flowState": "PLANS_EXTENDED",
    "createdDate": "2026-04-15T15:03:52.308866319Z",
    "updatedDate": "2026-04-15T15:10:53.316986513Z"
  },
  "planDetails": [
    {
      "id": "28456274",
      "name": "Standard Plan",
      "descriptions": [],
      "amount": "12.99",
      "amountDueToday": "0",
      "currencyCode": "USD",
      "planPeriod": {
        "unit": "MONTHS",
        "period": 1
      },
      "currentPlan": true,
      "contractType": "FLEXIBLE",
      "paymentsRemaining": 0,
      "terms": [
        {
          "header": "Terms of Conditions",
          "terms": "Detailed description of terms and condition"
        }
      ]
    },
    {
      "id": "397987458",
      "name": "Premium Plan",
      "descriptions": [],
      "amount": "22.99",
      "amountDueToday": "10",
      "currencyCode": "USD",
      "planPeriod": {
        "unit": "MONTHS",
        "period": 1
      },
      "currentPlan": false,
      "contractType": "FLEXIBLE",
      "paymentsRemaining": 0,
      "terms": [
        {
          "header": "Terms of Conditions",
          "terms": "Detailed description of terms and condition"
        }
      ]
    }
  ],
  "actionOptionsSurvey": {
    "surveyName": "Action Questionnaire",
    "elements": [
      {
        "surveyElementType": "OPTIONS",
        "options": [],
        "id": "que_changeplan",
        "prompt": "Select a Plan"
      },
      {
        "surveyElementType": "OPTIONS",
        "multiselect": false,
        "options": [
          {
            "code": "N",
            "value": "No"
          },
          {
            "code": "Y",
            "value": "Yes"
          }
        ],
        "id": "que_abandon",
        "prompt": "Abandon?"
      }
    ]
  }
}
```

#### Step 3A: Second submit request: Cardholder has filled out the action option survey and selected an invalid option {#step-3a-second-submit-request-cardholder-has-filled-out-the-action-option-survey-and-selected-an-invalid-option}

```JSON
{
  "actionId": "e9b9cd7a-6eb5-4907-bfab-23ae08785b11",
  "serviceId": "00000000-0108-4000-8000-000000000001",
  "action": "CHANGE_PLAN",
  "paymentId": "e693bd9a-3b18-4be3-9e05-fce039ea7beb",
  "locale": "en-US",
  "actionOptionsSurveyAnswers": {
    "responses": [
      {
        "surveyElementId": "que_changeplan",
        "answer": "Test option"
      }
    ]
  }
}
```

#### Step 3B: Second (final) submit response: The error response provides the cardholder with appropriate options to select a valid choice {#step-3b-second-final-submit-response-the-error-response-provides-the-cardholder-with-appropriate-options-to-select-a-valid-choice}

```JSON
{
  "Errors": {
    "Error": [
      {
        "Source": "SUBSCRIPTION_CONTROL_SERVICE",
        "ReasonCode": "BAD_REQUEST",
        "Description": "Invalid Request",
        "Recoverable": false,
        "Details": "Unable to handle provided request."
      }
    ]
  }
}
```

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

### TC10.2: Cardholder tries to select an alternative plan but merchant responds with ineligibility {#tc102-cardholder-tries-to-select-an-alternative-plan-but-merchant-responds-with-ineligibility}

For this test case, the cardholder tries to change their plan in your banking app, but the request is unsuccessful because they aren't eligible. For example, their subscription bundle doesn't allow other plan options. You receive a `NOT_ELIGIBLE` response code.

#### Step 1A -- Initial request for plan change {#step-1a--initial-request-for-plan-change-1}

```JSON
{
  "locale": "en-US",
  "issuerId": "1234567890123456",
  "serviceId": "00000000-0108-4000-8000-000000000001",
  "action": "CHANGE_PLAN",
  "paymentId": "e693bd9a-3b18-4be3-9e05-fce039ea7beb"
}
```

#### Step 1B response: Cardholder is required to fill out the survey needed to change plan {#step-1b-response-cardholder-is-required-to-fill-out-the-survey-needed-to-change-plan-2}

```JSON
{
  "actionId": "896c67ee-6ff9-4109-b68c-94aa5e52d62e",
  "serviceId": "00000000-0108-4000-8000-000000000001",
  "subscriptionId": "bad3d973-1fd7-45ce-b0ef-97f132dac4c1",
  "actionState": {
    "action": "CHANGE_PLAN",
    "method": "AUTOMATED",
    "status": "INITIATED",
    "createdDate": "2026-04-15T15:03:52.308866319Z",
    "updatedDate": "2026-04-15T15:03:52.308866319Z"
  },
  "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_contactemail",
        "prompt": "Contact email"
      }
    ]
  }
}
```

#### Step 2A: First submit request: Cardholder has filled out the survey {#step-2a-first-submit-request-cardholder-has-filled-out-the-survey-5}

```JSON
{
  "actionId": "896c67ee-6ff9-4109-b68c-94aa5e52d62e",
  "serviceId": "00000000-0108-4000-8000-000000000001",
  "action": "CHANGE_PLAN",
  "paymentId": "e693bd9a-3b18-4be3-9e05-fce039ea7beb",
  "locale": "en-US",
  "surveyElementAnswer": {
    "elementAnswers": [
      {
        "surveyElementId": "que_fullname-txt_1001",
        "answer": "Alice"
      },
      {
        "surveyElementId": "que_fullname-txt_1002",
        "answer": "Davis"
      },
      {
        "surveyElementId": "que_contactemail",
        "answer": "demo@test.com"
      }
    ]
  }
}
```

#### Step 2B: First submit response: Subscription qualifies for a plan change, the cardholder is notified of their options, and receives information about the new plan details {#step-2b-first-submit-response-subscription-qualifies-for-a-plan-change-the-cardholder-is-notified-of-their-options-and-receives-information-about-the-new-plan-details-1}

```JSON
{
  "actionId": "896c67ee-6ff9-4109-b68c-94aa5e52d62e",
  "serviceId": "00000000-0108-4000-8000-000000000001",
  "subscriptionId": "bad3d973-1fd7-45ce-b0ef-97f132dac4c1",
  "actionState": {
    "action": "CHANGE_PLAN",
    "method": "AUTOMATED",
    "status": "WAITING_FOR_USER",
    "flowState": "PLANS_EXTENDED",
    "createdDate": "2026-04-15T15:03:52.308866319Z",
    "updatedDate": "2026-04-15T15:10:53.316986513Z"
  },
  "planDetails": [
    {
      "id": "28456274",
      "name": "Standard Plan",
      "descriptions": [],
      "amount": "12.99",
      "amountDueToday": "0",
      "currencyCode": "USD",
      "planPeriod": {
        "unit": "MONTHS",
        "period": 1
      },
      "currentPlan": true,
      "contractType": "FLEXIBLE",
      "paymentsRemaining": 0,
      "terms": [
        {
          "header": "Terms of Conditions",
          "terms": "Detailed description of terms and condition"
        }
      ]
    },
    {
      "id": "397987458",
      "name": "Premium Plan",
      "descriptions": [],
      "amount": "22.99",
      "amountDueToday": "10",
      "currencyCode": "USD",
      "planPeriod": {
        "unit": "MONTHS",
        "period": 1
      },
      "currentPlan": false,
      "contractType": "FLEXIBLE",
      "paymentsRemaining": 0,
      "terms": [
        {
          "header": "Terms of Conditions",
          "terms": "Detailed description of terms and condition"
        }
      ]
    }
  ],
  "actionOptionsSurvey": {
    "surveyName": "Action Questionnaire",
    "elements": [
      {
        "surveyElementType": "OPTIONS",
        "options": [],
        "id": "que_changeplan",
        "prompt": "Select a Plan"
      },
      {
        "surveyElementType": "OPTIONS",
        "multiselect": false,
        "options": [
          {
            "code": "N",
            "value": "No"
          },
          {
            "code": "Y",
            "value": "Yes"
          }
        ],
        "id": "que_abandon",
        "prompt": "Abandon?"
      }
    ]
  }
}
```

#### Step 3A: Second submit request: Cardholder has filled out the action option survey and selected an invalid option {#step-3a-second-submit-request-cardholder-has-filled-out-the-action-option-survey-and-selected-an-invalid-option-1}

```JSON
{
  "actionId": "896c67ee-6ff9-4109-b68c-94aa5e52d62e",
  "issuerId": "1234567890123456",
  "actionOptionsSurveyAnswers": {
    "responses": [
      {
        "surveyElementId": "que_changeplan",
        "answer": "397987458"
      }
    ]
  }
}
```

#### Step 3B: Second (final) submit response: The error response provides the cardholder with appropriate options to select a valid choice {#step-3b-second-final-submit-response-the-error-response-provides-the-cardholder-with-appropriate-options-to-select-a-valid-choice-1}

```JSON
{
  "actionId": "09092c20-14c5-4350-a1da-3650a13d7a96",
  "serviceId": "00000000-0108-4000-8000-000000000001",
  "subscriptionId": "3784afd1-9d31-4b4b-8b6e-ea77c5a33389",
  "actionState": {
    "action": "CHANGE_PLAN",
    "method": "AUTOMATED",
    "status": "UNSUCCESSFUL",
    "statusReasonCode": "USER_NOT_ELIGIBLE",
    "createdDate": "2026-04-14T18:21:11.589458086Z",
    "updatedDate": "2026-04-14T18:21:21.861283909Z"
  }
}
```

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

### TC11: Issuer‑identified subscription for action management {#tc11-issueridentified-subscription-for-action-management}

In this scenario, you perform subscription identification externally and submit the identified subscription details as part of the request using the `recurringPaymentCriteria` object.

Smart Subscriptions doesn't perform subscription detection for this transaction. Instead, it uses the issuer‑provided subscription details to determine whether subscription management actions are available.

When the merchant is supported for subscription management:

* The `subscriptionControls` object is returned in the response.
* The `serviceId` and `recurringPaymentType` fields are populated.
* The `supportedActions` array is returned and populated (for example, **CANCEL**), indicating available subscription management actions.

#### Request {#request-12}

```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"
        }
      },
      "recurringPaymentCriteria": {
        "recurringPaymentType": "SUBSCRIPTION",
        "merchantName": "StreamLine",
        "serviceName": "StreamLine",
        "frequency": "MONTHLY"
      }
    }
  ]
}
```

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

```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_8tln4Uw2VWBY5sXfl3xA12ylBT6oVEqIitwVz6jUicU4V3CNXFIhV8fdJM3aeXp8Q5Zs27HqV4Z5Hgey7TrkBoGkubzU1Qt6eoo1no3BSP_WDEm-vNgHezU3iRgRdnLmHSH2ckTG37Yc3I2q6fFIR95mYOXFGvSYdmmlOLic5RmVEnD_9Bza5FNYDIe0t2AEHyW2r9cbmgUVCzxdM6XcklY0tQRlQwrhCV9lmzJO2s783U0Zik1Da4apQCEhVjH_J1yH9m0Gicu6vlnCKBPtRs6h9RMVOB2P4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Njg3In0.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)

## 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-13}

```JSON
{
  "locale": "en-US",
  "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": "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-14}

```JSON
{
  "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: 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-15}

```JSON
{
  "locale": "en-CA",
  "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: 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-16}

```JSON
{
  "locale": "",
  "action": "CANCEL",
  "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": "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-17}

```JSON
{
  "locale": "en-US",
  "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: 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-18}

```JSON
{
  "locale": "en-US",
  "action": "CANCE",
  "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: 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-19}

```JSON
{
  "locale": "en-US",
  "action": "",
  "paymentId": "d4096abb-75d1-4711-baed-90b0f8a0024f",
  "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": "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-20}

```JSON
{
  "locale": "en-US",
  "action": "CANCEL",
  "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: 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-21}

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

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

```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-22}

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

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

```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-23}

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

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

```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-24}

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

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

```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-25}

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

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

```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-26}

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

#### 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 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-27}

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

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

```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-28}

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

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

```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-29}

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

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

```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-30}

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

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

```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-31}

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-31}

```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-32}

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-32}

```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-33}

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-33}

```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-34}

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-34}

```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-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=499&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 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-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=5001&offset=0`.

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

```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-37}

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-37}

```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-38}

GET request sent to the `/../consumer-clarity/subscriptions/actions?{params}` endpoint with a `{params}` value of `limit=500&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 '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-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&offset=0`.

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

```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-40}

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-40}

```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-41}

```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-42}

```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-43}

```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-44}

```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-45}

```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)

### TC: Issuer‑identified subscription with unsupported merchant {#tc-issueridentified-subscription-with-unsupported-merchant}

Here, you perform subscription identification externally and submit the identified subscription details in the `recurringPaymentCriteria` object. However, the merchant associated with the transaction isn't supported for Smart Subscriptions action management. As a result:

* Smart Subscriptions doesn't return the `subscriptionControls` object in the response.
* No subscription management actions are available, even though the subscription was identified.

#### Request: {#request-46}

```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": "7.99",
          "currencyCode": "USD"
        }
      }
      "recurringPaymentCriteria": {
        "recurringPaymentType": "SUBSCRIPTION",
        "merchantName": "Ethoca Chairs",
        "serviceName": "Ethoca Chairs",
        "frequency": "MONTHLY"
      }
    }
  ]
}
```

#### Response: {#response-5}

```JSON
{
  "searchResults": [
    {
      "recordId": "0.ebd6d717.1776423176.e9085d4-01",
      "resultStatus": {
        "code": "OK",
        "message": "OK."
      },
      "merchantResult": {
        "merchantName": "Ethoca Chairs",
        "address": {},
        "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": 400,
            "width": 400,
            "url": "https://content.ethoca.com/b/merchant/2d6f0329-e6d2-4062-8b23-09dcb22a45d5.png?size=400",
            "type": "MERCHANT",
            "altTextTag": "Ethoca Chairs Logo"
          },
          {
            "height": 200,
            "width": 200,
            "url": "https://content.ethoca.com/b/merchant/2d6f0329-e6d2-4062-8b23-09dcb22a45d5.png?size=200",
            "type": "MERCHANT",
            "altTextTag": "Ethoca Chairs Logo"
          }
        ],
        "dataPolicy": {
          "cacheable": true,
          "cacheExpiry": "2026-04-18T10:52:56.901+0000"
        },
        "resultStatus": {
          "code": "MERCHANT_FOUND",
          "message": "Merchant results provided."
        }
      },
      "purchaseReceipt": {
        "resultStatus": {
          "code": "MISSING_FIELD_VALUE",
          "message": "Purchase Receipt cannot be obtained due to missing transaction criteria."
        },
        "url": "https://api.ethocaweb.com/ethoca/receipt/1776423176/11361aa6-2098-4c37-a6bd-182b66b61285/UKpMq4ts_nmxhzP-9grx-g/Jw7SGb7NPyzAcgGtQ7y54N50sjU4jcpWlCrqbbN7Lyp_8IDzDMrk3zF4tCwGcGJ41cVqzRHcM4hHQeihNIKo6vxFq5M3p2J-mVTlGE0fzq7lU6hnvQnBJxFDraZPs9-6drXHha0LphnfFVceFchycuIx2FArC4R8GwJ54nOgVFIESJuoTFEoDlVaSiF7oJH7dwyRX9av8PgKbx1qBsOCfOd_u72T4Bfxy1lmKQQaNUEtAngoaTi-Kg573XQjNZRwZrgOyzCLdF1KkUvX8H56Wc90G_M_XbvsF9MnQ1ozW88tkwI8fvBTJP7VtOFlG7wBmk_YgFugB2Sis2c9zERW3WszrN3qMDjkT6jH3p8h5cY2O9nyMsukoOrGZeR4e6LnNuArAgEiuRK3j7-QxmCIP2JUSIh7ST1-EWCNtu7JDmWpT1drqnufnFbAoRKJq2cxr61nP0zlS1-bEc_et2Av9SGH1E--CpcRtZU1D-9WaF7RybR82JuN76SyLBwDrmw_iwQSVRXTy3gIBp8vxXad1zleaD-edcJH5yQNJ-sjhGrkYpKxLa3ZW3Y6yx2btc6PZCU14yQ0RMS43GFNiHXvIWrdReXRebRzQfb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N0YwODJDNUI0M0M0RTYyODMzNTJDQTIyNTg5ODA2RjIzMUFBQTZCQTk3NjQxOUY0QkRCRTExQjhFOUYiLCJjaWQiOiJldTQ1MjJnc2pmS3ZCZ1R3SWJTV09ueDdneDRNWS1jcVRCUWVJcEttNjRjYTdlNjAifQ.TpxjRF2F-na-qByJTESFgXVTXTF1_ti9rO05ny11yW55MdndXjbLkemr6gwwXZlh-qsq4kq83LZ40zvo7v6ql6qcZYWLQf1Z9f2aSfNqNpXPI-Tyr1e4rKGKUqcm9VrT4vHMppbSzWX5UQBlgMDGM1s97JXMbocK5wY21PJZPy0m4-OpKH-VOnrMK6uzhUSOkOZ1UG4gVI6wjF0_33E_Qz6Uz1TOZ3ppSiIQJYF0jw5GI9EiuNFqJsiS62mNEPoZmyZnMJDk4b9rvk3GTbEYgdjc2XpTq2xUdEjKGz1sEPZ64ydCciZSSmsRdkXyYlDqFjc3alMokkGDrm4JS8kz7w%22",
        "contentType": "MERCHANT_DETAILS",
        "expiresOn": "2026-04-17T11:07:56+00:00"
      },
      "transactionData": {
        "resultStatus": {
          "code": "MISSING_FIELD_VALUE",
          "message": "Transaction details cannot be obtained due to missing transaction criteria."
        },
        "url": "https://api.ethocaweb.com/ethoca/consumer-clarity/transaction-data-link?locale=en-US&ts=1776423176&key=1ee44626-fcc8-484c-b9f5-bec53cb72ad5&iv=sH0eDwWaC6Wf5o8QWb9j0A&data=cfGPUPkFe7hhtuVGYPB3wGoaQ6h9igNCLYz3JLgb3CouuXc4ABj8E10xVW_L3yB4IqW0fi4T3Bgrl8t-9NTtIeklSn-lf1TrGMofMm17Lvn9mNRrCIOj0FH039XY9oLxhTT-S-eyY9V8_yrwUyelyM_FwRHX_b3TnvAstefjbobUC8atKk-f_rQehFnm5Bs2fCCB_22TGOFfmFX1Itb4M9B88gwo9iYKbrNk86eA5HwrWwxO2a11i2HSi2E6smO5rDR7Ry7Q7a-vJ1mXYnkDwkIM1f8jvpwxeGtEBJJ5aBRrcnwSuuDGv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vzc190b2tlbiIsInRpZCI6Im5vdF9hdmFpbGFibGUiLCJhdWQiOiJFdGhvY2FFbnJpY2hlZFRyYW5zYWN0aW9ucyxFdGhvY2FEaWdpdGFsUmVjZWlwdHMiLCJuYmYiOjE3NzY0MjMxNjYsImdyYW50X3R5cGUiOiJjbGllbnRfY3JlZGVudGlhbHMiLCJleHAiOjE3NzY0MjQwNzYsImF1dGhUeXBlIjoiT0F1dGgyIiwib25lX3RpbWUiOiJmYWxzZSIsImlhdCI6MTc3NjQyMzE3NiwianRpIjoiMTg3NzMzMjFDQTgyMkE2RjA1MDA1NEQ3RDcwQ0IyNTU0MTdEQzlBRTQwN0I5MEI1NzBFRkU5MEU3MzYzMUQ4OCIsImNpZCI6ImV1NDUyMmdzamZLdkJnVHdJYlNXT254N2d4NE1ZLWNxVEJRZUlwS202NGNhN2U2MCJ9.h_QuEyjhM1IbavXOict5HQ-U4ZDOmbDd2WLGZcQ3n5G_6_Dd6g0EoMlv7xxX5wdNfNDD07v4DlZ8h_I9g8K2dKLkxkbRnIX7JrGPAJkHAYLQiyVGctIP6DsF-8MNBN-9V6jW0vK2McW-XSr_8XsotxIxPVWQ2z77lA2VJqSS_j3fKDwIXsRhDMdn2H81Pm2J-ibPATi2jw3qjyUvaetIwUNI4vAv9ApHikcTWP14kHA9uColsiV8IdwSu4mxllGdCvU7xuSkOW6gvPjxTOpS5VjKUHVPwcC1NhP3038BuBn4xO9ANY5XmzmqwlVPHYpIiiPLHezddOHoh7zh9ONUOw%22",
        "contentType": "MERCHANT_DETAILS",
        "expiresOn": "2026-04-17T11:07:56+00:00"
      },
      "carbonFootprint": {
        "carbonEmissionInGrams": 1360.93,
        "carbonEmissionInOunces": 48.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)

## 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.
