> For the complete documentation index, see [llms.txt](https://docs.sensepass.com/sensepay/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sensepass.com/sensepay/transaction-api/payment-flows/subscription/update-a-subscription.md).

# Update a subscription

Update the subscription item to pause, resume or cancel its due payments.

{% hint style="info" %}
Subscription with status `canceled` can't be updated.
{% endhint %}

### Status

These are the available values for the `status` parameter in the request body.

| status   | description                                               |
| -------- | --------------------------------------------------------- |
| active   | default value that sets the subscription to active status |
| paused   | pauses the subscription untill set back to active         |
| canceled | canceles the subscription indefinitly                     |

{% hint style="info" %}
Only one header key is required for the request in the example below
{% endhint %}

## Update subscription's status

<mark style="color:purple;">`PATCH`</mark> `https://api.sensepass.com/api/subscription/:subscriptionUid`

available status values are: `active`, `paused`, `canceled`

#### Path Parameters

| Name            | Type   | Description                                                                                                                                                  |
| --------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| subscriptionUid | string | <p>bf8b7e01-466d-4996-b9a2-fc0880923359.</p><p>subscription ID received from the <a href="/pages/msIKzcRIXZuPsh0wetqD">Create a Transaction </a>response</p> |

#### Headers

| Name                                             | Type   | Description                                                                                          |
| ------------------------------------------------ | ------ | ---------------------------------------------------------------------------------------------------- |
| deviceId<mark style="color:red;">\*</mark>       | string | 2ooeww5ufzg3nkuf8a10g15i5epu8o58jv1rznif3o1tr6xsb1rm                                                 |
| branchApiKey<mark style="color:red;">\*</mark>   | string | mQzMLLSpqjRZfWBgQcAej5Dus7HHvmRsSsrN6FYoeWWUAehm3RjD596pZb9gfrxx4jQOP2MCQgoLaaU9SAdlzVsWnR63ZETqALpn |
| merchantApiKey<mark style="color:red;">\*</mark> | string | xvRKKxOWAYbTH2yKQLlzkta2eovvkzlzTW98NcA9KVfwrOF22GA7bBOHHAeooQrmKelv0TU3Q7c8wiJgTQweKCbXR5ohC6JtCygJ |

#### Request Body

| Name                                     | Type   | Description            |
| ---------------------------------------- | ------ | ---------------------- |
| status<mark style="color:red;">\*</mark> | string | active,paused,canceled |

{% tabs %}
{% tab title="200: OK " %}

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Refer to the Subscritption entity at [Subscription Model](/sensepay/transaction-api/models/subscription-model.md) for additional information.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sensepass.com/sensepay/transaction-api/payment-flows/subscription/update-a-subscription.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
