# Terminates a subscription

<a id="flute-v1-put-sub-api-subscriptions-subscriptionId-terminate"></a>
<span class="api-endpoint">PUT {{<a href="#urlbases">baseURL</a>}}/sub-api/v1/subscriptions/{{subscriptionId}}/terminate</span>
This endpoint terminates, or cancels, an active subscription.
This action occurs immediately and cannot be undone.
<span class="api-seealso">See Also:</span><br>
To list a merchant's subscriptions, see <a href="/api-reference/subscription/sub_api_v1_list_subscriptions" style="text-decoration: underline;">GET /sub-api/v1/subscriptions</a>.<br>
To create a subscription, see <a href="/api-reference/subscription/sub_api_v1_create_subscriptions" style="text-decoration: underline;">POST /sub-api/v1/subscriptions</a>.<br>
To retrieve a subscription by ID, see <a href="/api-reference/subscription/flute-v1-get-sub-api-subscriptions-subscriptionid" style="text-decoration: underline;">GET /sub-api/v1/subscriptions/{subscriptionId}</a>.<br>
To retrieve a subscription's payment history, see <a href="/api-reference/subscription/flute-v1-get-sub-api-subscriptions-subscriptionid-payments" style="text-decoration: underline;">GET /sub-api/v1/subscriptions/{subscriptionId}/payments</a>.<br>

Endpoint: PUT /sub-api/v1/subscriptions/{subscriptionId}/terminate
Version: V1
Security: Bearer

## Path parameters:

  - `subscriptionId` (string, required)
    <br>Specifies the subscription identifier.

## Response 200 fields (application/json):

  - `id` (string)
    Indicates the subscription identifier.

Example: 79c0d1e2-3f4a-4b5c-6d7e-8f9a0b1c2d58

  - `statusId` (integer)
    Indicates the subscription status identifier.
Possible values:
| Value | Meaning |
|  --- | --- |
| 1 | Active |
| 2 | Completed |
| 3 | Suspended |
| 4 | Delinquent |
| 5 | Terminated |
| 6 | Deleted |

Example: 2
    Example: 2

  - `status` (string)
    Indicates the subscription status.
Possible values:
| Value | Meaning |
|  --- | --- |
| Active | 1 |
| Completed | 2 |
| Suspended | 3 |
| Delinquent | 4 |
| Terminated | 5 |
| Deleted | 6 |

Example: Completed
    Example: Completed

  - `message` (string)
    Indicates a message with additional details.

Example: Subscription is terminated. Future payments will no longer be processed. This action is permanent.
    Example: Subscription is terminated. Future payments will no longer be processed. This action is permanent

## Response 400 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Validation failed: -- Email: 'Email' is not a valid email address. Severity: Error
    Example: Validation failed: -- Email: 'Email' is not a valid email address. Severity: Error

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.

Example: FluteOpsDeveloper.MSG322
    Example: FluteOpsDeveloper.MSG322

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
Example:
null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

## Response 404 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Entity with ID 'aa6cfcd0-0295-4a4c-b074-8c901f114fef' was not found.
    Example: Entity with ID 'aa6cfcd0-0295-4a4c-b074-8c901f114fef' was not found.

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.

Example: FluteOpsDeveloper.MSG322
    Example: FluteOpsDeveloper.MSG322

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: System.Collections.Generic.KeyNotFoundException
    Example: System.Collections.Generic.KeyNotFoundException

  - `correlationId` (string)
    Indicates the correlation identifier.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
Example:
null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

## Response 500 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: An unexpected error occurred while processing the request.
    Example: An unexpected error occurred while processing the request.

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: (Service)

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: System.Exception
    Example: System.Exception

  - `correlationId` (string)
    Indicates the correlation identifier.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
Example:
null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

