---
title: "Cancel subscription"
method: POST
path: "/customers/{customerId}/subscriptions/{subscriptionId}/cancel"
tags: ["Subscriptions"]
---

# Cancel subscription

`POST /customers/{customerId}/subscriptions/{subscriptionId}/cancel`

Cancels the subscription.

If the subscription is in dunning, it'll be taken out of dunning.

If the shop has an actions set to trigger when a subscription is cancelled, they'll be triggered (example: email notifications).

*NOTE: If the request to cancel the subscription in Shopify fails, the subscription will still be cancelled in the Awtomic system to avoid future billing attempts.*

## Path parameters

- `customerId` string, required
- `subscriptionId` string, required

## Request body

- object
  - `details` string — customer provided details about the cancellation
  - `reason` string — shortcode reason for cancellation (used for analytics)

## Response `200`

Updated subscription

- SubscriptionDynamo
  - `SubscriptionId` string — Identifier
  - `SubscriptionStatus` string — Status
  - `NextBillingDate` string, date-time — Date of the next billing

## Other responses

- `401` — You do not have permission
- `404` — Not Found

---

[API](https://skmtc.net/awtomic/apis/awtomic-api.md) · [All operations](https://skmtc.net/awtomic/apis/awtomic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/awtomic/awtomic-api/revisions/dfe3dfce125c/schema)
